Re: [Pythonocc-users] STEP and Geom
Occ.dataexchange.utils offers a nice shortcut, file_to_shape and shape_to_file provide nice short hands for writing to Brep, stl IGES and step files, and reading from these files. Jelle > On 22 apr. 2014, at 15:32, Dalton wrote: > > Charles Sharman writes: > >> >> Hi Dalton, > > Hi, Charles! Really sorry the late reply, had some issues at my work last > weeks... :) > >> >> I missed a small nuance in your code in my last two posts: >> >> TopoDS_Face(... >> >> Should be >> >> TopoDS_face(... >> >> Note the lower-case "face". Can you try it and confirm you no longer get > an >> error? I'd like to make sure there is no pythonOCC/OCC issue here. >> >> After analyzing the OCC documentation, BRepBuilderAPI_MakeFace returns a >> TopoDS_Face. Therefore, my original directions to convert with > TopoDS_face >> before sending it to stepwriter were unnecessary. (I'm learning something >> here too.) So, I believe your latest/greatest code is fine, and there is > no >> error in your surface. Could you still try TopoDS_face(..., though, to > ice >> this off? >> >> Thanks, >> Charles > > Well, just changing the case and it worked properly too! Here are the > lines added/modified, so you can check if we did the right thing: > > from OCC.TopoDS import TopoDS_face > (...) > stepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, stepuknots, > stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0) > stepnurbs = TopoDS_face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e- > 6).Shape()) > stepwriter = STEPControl_Writer() > stepwriter.Transfer(stepnurbs, STEPControl_AsIs) > stepwriter.Write(arquivosaida) > > Thanks for the help again! > > > > > > ___ > Pythonocc-users mailing list > Pythonocc-users@gna.org > https://mail.gna.org/listinfo/pythonocc-users ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Hi Dalton, Thanks for checking. I'm glad it all works. - Charles ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Charles Sharman writes: > > Hi Dalton, Hi, Charles! Really sorry the late reply, had some issues at my work last weeks... :) > > I missed a small nuance in your code in my last two posts: > > TopoDS_Face(... > > Should be > > TopoDS_face(... > > Note the lower-case "face". Can you try it and confirm you no longer get an > error? I'd like to make sure there is no pythonOCC/OCC issue here. > > After analyzing the OCC documentation, BRepBuilderAPI_MakeFace returns a > TopoDS_Face. Therefore, my original directions to convert with TopoDS_face > before sending it to stepwriter were unnecessary. (I'm learning something > here too.) So, I believe your latest/greatest code is fine, and there is no > error in your surface. Could you still try TopoDS_face(..., though, to ice > this off? > > Thanks, > Charles > > Well, just changing the case and it worked properly too! Here are the lines added/modified, so you can check if we did the right thing: from OCC.TopoDS import TopoDS_face (...) stepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, stepuknots, stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0) stepnurbs = TopoDS_face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e- 6).Shape()) stepwriter = STEPControl_Writer() stepwriter.Transfer(stepnurbs, STEPControl_AsIs) stepwriter.Write(arquivosaida) Thanks for the help again! ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Hi Dalton, I missed a small nuance in your code in my last two posts: TopoDS_Face(... Should be TopoDS_face(... Note the lower-case "face". Can you try it and confirm you no longer get an error? I'd like to make sure there is no pythonOCC/OCC issue here. After analyzing the OCC documentation, BRepBuilderAPI_MakeFace returns a TopoDS_Face. Therefore, my original directions to convert with TopoDS_face before sending it to stepwriter were unnecessary. (I'm learning something here too.) So, I believe your latest/greatest code is fine, and there is no error in your surface. Could you still try TopoDS_face(..., though, to ice this off? Thanks, Charles ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Charles Sharman writes: Hi, Charles! > > Hi Dalton, > > Does python tell you which line it doesn't like? > > From the TypeError, it seems like it would be this line: > > steptopo = TopoDS_Face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e- > 6).Shape()) > Well, I did what you said, except the command TopoDS_Face, as below stepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, stepuknots, stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0) stepnurbs = BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e-6).Shape() stepwriter = STEPControl_Writer() stepwriter.Transfer(stepnurbs, STEPControl_AsIs) stepwriter.Write(arquivosaida) and it worked. The STEP file was written, I opened it on IDA Step and Rhinoceros and they read the file correctly. So my last question is: omitting the TopoDS_Face command "harm" my code in any way? Dalton > If so, try breaking the line into parts: > > brep = BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e-6).Shape() > steptopo = TopoDS_Face(brep) > > I would imagine the error would then be on the second of these lines. If so, > try displaying brep with the simpleGUI to make sure it looks like a face (a > surface bounded by a wire). If the display doesn't look right, there's > something wrong with your surface. > > Let me know what you find, and we'll go from there. > > - Charles > > ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Hi Dalton, Does python tell you which line it doesn't like? >From the TypeError, it seems like it would be this line: steptopo = TopoDS_Face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e- 6).Shape()) If so, try breaking the line into parts: brep = BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e-6).Shape() steptopo = TopoDS_Face(brep) I would imagine the error would then be on the second of these lines. If so, try displaying brep with the simpleGUI to make sure it looks like a face (a surface bounded by a wire). If the display doesn't look right, there's something wrong with your surface. Let me know what you find, and we'll go from there. - Charles ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Charles Sharman writes: Hi, Charles! > > Hi Dalton, > > Is arquivosaida the name of the file? It should be. Yes, it is. It is a input parameter. > > What is steptopo? I don't see it defined in your example code. > > If this is exactly what you're running, try changing this: > > TopoDS_Face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e- > 6).Shape()) > > to this: > > steptopo = TopoDS_Face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), > 1e-6).Shape()) What you said is exactly what I do, I just copy the lines wrongly here, sorry. So, this is the part of my code supposed to write the STEP file stepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, stepuknots, stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0) steptopo = TopoDS_Face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e- 6).Shape()) stepcontroller = STEPControl_Controller() stepcontroller.Init() stepwriter = STEPControl_Writer() stepwriter.Transfer(steptopo, STEPControl_AsIs) stepwriter.Write(arquivosaida) and the error for running it TypeError: in method 'new_TopoDS_Face', argument 1 of type 'TopoDS_Face const' > > - Charles > > ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Hi Dalton, Is arquivosaida the name of the file? It should be. What is steptopo? I don't see it defined in your example code. If this is exactly what you're running, try changing this: TopoDS_Face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e- 6).Shape()) to this: steptopo = TopoDS_Face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e-6).Shape()) - Charles ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Hi, Charles, thanks for your attention and patience! > > Hi Dalton, > > Sorry my github example wasn't clear. I'm not sure exactly what you sent to > TopoDS_face and BRepBuilderAPI_MakeFace, but I got it to work. I > used the BSplineSurface in src/examples/Geometry/geometry_demos.py and > successfully wrote a STEP file. My changes have a #CSS comment nearby. > See below, particularly the topodsface line. > > I suspect you didn't use the .GetHandle() method or the .Shape() method, > but I can't be sure without seeing your code. > > - Charles I had already done almost everything you told me before you wrote. But, even with the "add-ons", I still can't get it to work. The piece of my code that is intend to write the STEP file is below. I tried to explain/comment at most, to make it as clear as possible. def arquivostep(melhor, parordem, arquivosaida): ### BEGIN: allocating variables uknots = melhor[2] vknots = melhor[3] pesos = melhor[4] ptosctrl = melhor[5] # Defining the NURBS orders k = int(parordem[0]) l = int(parordem[1]) # Casting uknots from np.array to TColStd_Array1OfReal aux = np.unique(uknots) tam = np.size(aux) stepuknots = TColStd_Array1OfReal(0,tam-1) for i in range(0,tam): stepuknots.SetValue(i, aux[i]) # Defining UMults stepumults = TColStd_Array1OfInteger(0,tam-1) stepumults.SetValue(0,k) stepumults.SetValue(tam-1,k) for i in range(1,tam-1): stepumults.SetValue(i,1) # Casting vknots from np.array to TColStd_Array1OfReal aux = np.unique(vknots) tam = np.size(aux) stepvknots = TColStd_Array1OfReal(0,tam-1) for i in range(0,tam): stepvknots.SetValue(i, aux[i]) # Defining VMults stepvmults = TColStd_Array1OfInteger(0,tam-1) stepvmults.SetValue(0,l) stepvmults.SetValue(tam-1,l) for i in range(1,tam-1): stepvmults.SetValue(i,1) # np.shape(pesos) = np.shape(ptosctrl) [p,q] = np.shape(pesos) # Casting pesos from np.array to TColStd_Array2OfReal steppesos = TColStd_Array2OfReal(0,p-1,0,q-1) for j in range(0,q): for i in range(0,p): steppesos.SetValue(i, j, pesos[i][j]) # Casting ptosctrl from np.array to TColgp_Array2OfPnt stepptosctrl = TColgp_Array2OfPnt(0,p-1,0,q-1) for j in range(0,q): for i in range(0,p): stepptosctrl.SetValue(i, j, gp_Pnt(ptosctrl[i][j] [0], ptosctrl[i][j][1], ptosctrl[i][j][2])) ### END: allocating variables ### BEGIN: constructing NURBS surface stepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, stepuknots, stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0) TopoDS_Face(BRepBuilderAPI_MakeFace(stepnurbs.GetHandle(), 1e- 6).Shape()) ### END: constructing NURBS surface ### BEGIN: writing STEP file stepcontroller = STEPControl_Controller() stepcontroller.Init() stepwriter = STEPControl_Writer() stepwriter.Transfer(steptopo, STEPControl_AsIs) stepwriter.Write(arquivosaida) ### END: writing STEP file Even then, I get the error TypeError: in method 'new_TopoDS_Face', argument 1 of type 'TopoDS_Face const' I guess it is a detail my noobie eyes cannot figure out, but for you who are experient it may be easy. :) BR, Dalton ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Hi Dalton, Sorry my github example wasn't clear. I'm not sure exactly what you sent to TopoDS_face and BRepBuilderAPI_MakeFace, but I got it to work. I used the BSplineSurface in src/examples/Geometry/geometry_demos.py and successfully wrote a STEP file. My changes have a #CSS comment nearby. See below, particularly the topodsface line. I suspect you didn't use the .GetHandle() method or the .Shape() method, but I can't be sure without seeing your code. - Charles """ Modification of src/examples/Geometry/geometry_demos.py to demonstrate STEP conversion of Geom_BSplineSurface """ from OCC.gp import * from OCC.Geom import * from OCC.TColGeom import * from OCC.TColgp import * from OCC.GeomConvert import * from OCC.BRepBuilderAPI import * from OCC.TopoDS import * from OCC.STEPControl import * def bezier_surfaces(event=None): #display.EraseAll() # CSS array1 = TColgp_Array2OfPnt (1,3,1,3) array2 = TColgp_Array2OfPnt (1,3,1,3) array3 = TColgp_Array2OfPnt (1,3,1,3) array4 = TColgp_Array2OfPnt (1,3,1,3) array1.SetValue(1,1,gp_Pnt(1,1,1)) array1.SetValue(1,2,gp_Pnt(2,1,2)) array1.SetValue(1,3,gp_Pnt(3,1,1)) array1.SetValue(2,1,gp_Pnt(1,2,1)) array1.SetValue(2,2,gp_Pnt(2,2,2)) array1.SetValue(2,3,gp_Pnt(3,2,0)) array1.SetValue(3,1,gp_Pnt(1,3,2)) array1.SetValue(3,2,gp_Pnt(2,3,1)) array1.SetValue(3,3,gp_Pnt(3,3,0)) array2.SetValue(1,1,gp_Pnt(3,1,1)) array2.SetValue(1,2,gp_Pnt(4,1,1)) array2.SetValue(1,3,gp_Pnt(5,1,2)) array2.SetValue(2,1,gp_Pnt(3,2,0)) array2.SetValue(2,2,gp_Pnt(4,2,1)) array2.SetValue(2,3,gp_Pnt(5,2,2)) array2.SetValue(3,1,gp_Pnt(3,3,0)) array2.SetValue(3,2,gp_Pnt(4,3,0)) array2.SetValue(3,3,gp_Pnt(5,3,1)) array3.SetValue(1,1,gp_Pnt(1,3,2)) array3.SetValue(1,2,gp_Pnt(2,3,1)) array3.SetValue(1,3,gp_Pnt(3,3,0)) array3.SetValue(2,1,gp_Pnt(1,4,1)) array3.SetValue(2,2,gp_Pnt(2,4,0)) array3.SetValue(2,3,gp_Pnt(3,4,1)) array3.SetValue(3,1,gp_Pnt(1,5,1)) array3.SetValue(3,2,gp_Pnt(2,5,1)) array3.SetValue(3,3,gp_Pnt(3,5,2)) array4.SetValue(1,1,gp_Pnt(3,3,0)) array4.SetValue(1,2,gp_Pnt(4,3,0)) array4.SetValue(1,3,gp_Pnt(5,3,1)) array4.SetValue(2,1,gp_Pnt(3,4,1)) array4.SetValue(2,2,gp_Pnt(4,4,1)) array4.SetValue(2,3,gp_Pnt(5,4,1)) array4.SetValue(3,1,gp_Pnt(3,5,2)) array4.SetValue(3,2,gp_Pnt(4,5,2)) array4.SetValue(3,3,gp_Pnt(5,5,1)) BZ1, BZ2, BZ3, BZ4 = Geom_BezierSurface(array1),Geom_BezierSurface(array2),Geom_BezierSurface(arr ay3),Geom_BezierSurface(array4) bezierarray = TColGeom_Array2OfBezierSurface(1,2,1,2) bezierarray.SetValue(1,1,BZ1.GetHandle()) bezierarray.SetValue(1,2,BZ2.GetHandle()) bezierarray.SetValue(2,1,BZ3.GetHandle()) bezierarray.SetValue(2,2,BZ4.GetHandle()) BB = GeomConvert_CompBezierSurfacesToBSplineSurface(bezierarray) if BB.IsDone(): poles = BB.Poles().GetObject().Array2() uknots = BB.UKnots().GetObject().Array1() vknots = BB.VKnots().GetObject().Array1() umult = BB.UMultiplicities().GetObject().Array1() vmult = BB.VMultiplicities().GetObject().Array1() udeg = BB.UDegree() vdeg = BB.VDegree() BSPLSURF = Geom_BSplineSurface( poles, uknots, vknots, umult, vmult, udeg, vdeg, 0, 0 ) BSPLSURF.Translate(gp_Vec(0,0,2)) #display.DisplayShape(make_face(BSPLSURF.GetHandle()), update=True ) # CSS # Start CSS topodsface = TopoDS_face(BRepBuilderAPI_MakeFace(BSPLSURF.GetHandle(), 1e-6).Shape()) c = STEPControl_Controller() c.Init() w = STEPControl_Writer() okay = w.Transfer(topodsface, STEPControl_AsIs) w.Write('surface.stp') # End CSS if __name__ == '__main__': bezier_surfaces() ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Damir writes: > > Hi Dalton, > I was successfully using the commands below for exporting a solid into a > step file. > > file="test.stp" > exporter=STEPExporter(file) > exporter.add_shape(ent.Shape()) > exporter.write_file() > > Good luck. > Regards > Damir Hi, Damir, thanks for the reply and the help! I've tried to use these command lines you mentioned, from the example files, but without success. STEPExporter asks a Topo object, I guess, and I am working with a Geom object. I am, now, trying to translate my Geom_BSplineSurface into a TopoDS_Face. Hope this is the right way. BR, Dalton ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Hi Dalton, I was successfully using the commands below for exporting a solid into a step file. file="test.stp" exporter=STEPExporter(file) exporter.add_shape(ent.Shape()) exporter.write_file() Good luck. Regards Damir On Thu, 2014-04-03 at 19:00 +0200, Tomáš Létal wrote: > Hi Dalton, > > > you could try to change the line "stepexporter.Write(arquivosaida)" to > "stepexporter.Write(arquivosaida.Shape())", I hope it helps. > > > Best regards > > > > -- Původní zpráva -- > Od: Dalton > Komu: pythonocc-users@gna.org > Datum: 3. 4. 2014 15:49:19 > Předmět: [Pythonocc-users] STEP and Geom > > > Hi! I'm building an algorithm to construct a NURBS surface > with pythonnocc > and need to export it to a STEP file. > > I construct a Geom_BSplineSurface with the command line > > stepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, > stepuknots, > stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0) > > where all the parameters are already defined and it works > well. Then I try > to write it to a STEP file with the following lines > > stepexporter = STEPControl_Writer() > stepexporter.Transfer(stepnurbs, STEPControl_AsIs) > stepexporter.Write(arquivosaida) > > and I get the message error > > TypeError: in method 'STEPControl_Writer_Transfer', argument 2 > of type > 'TopoDS_Shape const' > > At GitHub, I was told to execute the command > > TopoDS_face(BRepBuilderAPI_MakeFace(stepnurbs, ... > > but I still get a message error as below > > TypeError: in method 'new_BRepBuilderAPI_MakeFace', argument 1 > of type > 'TopoDS_Wire const' > > Sorry if this may seems a noobie question, but I am not an > specialist in > python or opencascade, just starting to learn. :) > > Best regards. > > > ___ > Pythonocc-users mailing list > Pythonocc-users@gna.org > https://mail.gna.org/listinfo/pythonocc-users > ___ > Pythonocc-users mailing list > Pythonocc-users@gna.org > https://mail.gna.org/listinfo/pythonocc-users ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Nope, the error's still there... Tomáš Létal writes: > > Hi Dalton, > you could try to change the line "stepexporter.Write(arquivosaida)" to "stepexporter.Write(arquivosaida.Shape())", I hope it helps. > > Best regards > > > -- Původní zpráva --Od: Dalton Komu: pythonocc-users- 8nu/KwtRnEU@public.gmane.orgDatum: 3. 4. 2014 15:49:19Předmět: [Pythonocc- users] STEP and Geom > Hi! I'm building an algorithm to construct a NURBS surface with pythonnocc and need to export it to a STEP file.I construct a Geom_BSplineSurface with the command linestepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, stepuknots, stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0)where all the parameters are already defined and it works well. Then I try to write it to a STEP file with the following linesstepexporter = STEPControl_Writer()stepexporter.Transfer(stepnurbs, STEPControl_AsIs)stepexporter.Write(arquivosaida)and I get the message errorTypeError: in method 'STEPControl_Writer_Transfer', argument 2 of type 'TopoDS_Shape const'At GitHub, I was told to execute the commandTopoDS_face(BRepBuilderAPI_MakeFace(stepnurbs, ...but I still get a message error as belowTypeError: in method 'new_BRepBuilderAPI_MakeFace', argument 1 of type 'TopoDS_Wire const'Sorry if this may seems a noobie question, but I am not an specialist in python or opencascade, just starting to learn. :)Best regards.___Pythonocc-users mailing listPythonocc-users- 8nu/KwtRnEU@public.gmane.orghttps://mail.gna.org/listinfo/pythonocc-users > > > > Hi Dalton, > you could try to change the line "stepexporter.Write(arquivosaida)" to "stepexporter.Write(arquivosaida.Shape())", I hope it helps. > > Best regards > > > -- Původní zpráva --Od: DaltonKomu: pythonocc-users@...Datum: 3. 4. 2014 15:49:19Předmět: [Pythonocc-users] STEP and Geom > Hi! I'm building an algorithm to construct a NURBS surface with pythonnocc and need to export it to a STEP file.I construct a Geom_BSplineSurface with the command linestepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, stepuknots, stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0)where all the parameters are already defined and it works well. Then I try to write it to a STEP file with the following linesstepexporter = STEPControl_Writer() stepexporter.Transfer(stepnurbs, STEPControl_AsIs) stepexporter.Write(arquivosaida)and I get the message error TypeError: in method 'STEPControl_Writer_Transfer', argument 2 of type 'TopoDS_Shape const'At GitHub, I was told to execute the commandTopoDS_face(BRepBuilderAPI_MakeFace(stepnurbs, ...but I still get a message error as belowTypeError: in method 'new_BRepBuilderAPI_MakeFace', argument 1 of type 'TopoDS_Wire const'Sorry if this may seems a noobie question, but I am not an specialist in python or opencascade, just starting to learn. :) Best regards. ___Pythonocc-users mailing listPythonocc-users@... https://mail.gna.org/listinfo/pythonocc-users > > > ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users
Re: [Pythonocc-users] STEP and Geom
Hi Dalton, you could try to change the line "stepexporter.Write(arquivosaida)" to "stepexporter.Write(arquivosaida.Shape())", I hope it helps. Best regards -- Původní zpráva -- Od: Dalton Komu: pythonocc-users@gna.org Datum: 3. 4. 2014 15:49:19 Předmět: [Pythonocc-users] STEP and Geom "Hi! I'm building an algorithm to construct a NURBS surface with pythonnocc and need to export it to a STEP file. I construct a Geom_BSplineSurface with the command line stepnurbs = Geom_BSplineSurface(stepptosctrl, steppesos, stepuknots, stepvknots, stepumults, stepvmults, k-1, l-1, 0, 0) where all the parameters are already defined and it works well. Then I try to write it to a STEP file with the following lines stepexporter = STEPControl_Writer() stepexporter.Transfer(stepnurbs, STEPControl_AsIs) stepexporter.Write(arquivosaida) and I get the message error TypeError: in method 'STEPControl_Writer_Transfer', argument 2 of type 'TopoDS_Shape const' At GitHub, I was told to execute the command TopoDS_face(BRepBuilderAPI_MakeFace(stepnurbs, ... but I still get a message error as below TypeError: in method 'new_BRepBuilderAPI_MakeFace', argument 1 of type 'TopoDS_Wire const' Sorry if this may seems a noobie question, but I am not an specialist in python or opencascade, just starting to learn. :) Best regards. ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users"; ___ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users