surface of revolution creation

Can't find an example in documentation, so, please, post here code of creation surface of revolution (any code language).

Rob Bachrach's picture

You should check out the TopologyPrimitives sample program that comes with OCC. This is a portion of the code displayed by the program:

--- Revol of an edge -> result is a face ---
TopoDS_Edge E = BRepBuilderAPI_MakeEdge(gp_Pnt(-120.,-120,0.), gp_Pnt(-120.,-120,100.));
axe = gp_Ax1(gp_Pnt(-100.,-100.,0.),gp_Dir(0.,0.,1.));
TopoDS_Shape S2 = BRepPrimAPI_MakeRevol(E,axe);