Syntax for adding BSpline Surface
Hello Gmsh team, I am trying to create a simple square B Spline surface using the Python API . I have extracted the parameters from the IGES and trying to recreate in Gmsh. The code is as follows
import gmsh
model=gmsh.model
gmsh.initialize()
gmsh.option.setNumber("General.Terminal", 1)
gmsh.option.setNumber("Mesh.SaveAll", 1)
gmsh.model.add("Trimmed_Surface")
lc =float(input("Enter Mesh Size in mm \n"))
print("Available Mesh algorithms for 2D are 1: \n 2D mesh algorithm 1: MeshAdapt\n 2: Automatic\n 5: Delaunay\n 6: Frontal-Delaunay\n 7: BAMG\n 8: Frontal-Delaunay for Quads\n 9: Packing of Parallelograms\n")
Algo= int(input("Please enter mesh Algorithm\n"))
gmsh.option.setNumber("Mesh.Algorithm", Algo)
model.occ.addPoint(2000,2000,0, lc,1)
model.occ.addPoint(2000,0,0, lc,2)
model.occ.addPoint(0,2000,0, lc,3)
model.occ.addPoint(0,0,0, lc,4)
KnotsU=[0,0,1,1]
KnotsV=[0,0,1,1]
pointTags=[1,2,3,4]
weights=[1,1,1,1]
degreeU=1
degreeV=1
gmsh.model.occ.addBSplineSurface(pointTags, 2 , 1, degreeU, degreeV, weights, KnotsU, KnotsV )
gmsh.model.addPhysicalGroup(2, 1, 2)
gmsh.model.mesh.generate(2)
gmsh.write(B_Spline.msh)
While executing the code , Gmsh returns Value error in the function gmsh.model.occ.addBSplineSurface() . Can you please help me out to rectify the syntax/ values ?
Thank you