Sample demonstrating revolution geometry definition using BRepPrimAPI_MakeRevol algorithm.
pload MODELING VISUALIZATION
# Make a toroidal face by a series of shape revolves.
# Make a starting vertex at [-1.0, 0, 0].
set aVertPos {-1.0 0.0 0.0}
vertex v {*}$aVertPos
# Make a circular Edge by revolting Vertex around
# an axis DY positioned at [-1.5, 0.0, 0.0] on angle 360 degrees
set aRevBase {-1.5 0.0 0.0}
set aDirDY {0 1 0}
set anAngle 360
revol e v {*}$aRevBase {*}$aDirDY $anAngle
# Make a toroidal face by revolting Edge
# around DZ axis on 2*Pi angle.
set aZero {0 0 0}
set aDirDZ {0 0 1}
revol f e {*}$aZero {*}$aDirDZ $anAngle
# display results
vinit View1
vdisplay -dispMode 1 f
vdisplay -dispMode 0 v e
vsetcolor e GREEN
vsetcolor f RED
vfit
// Make a toroidal face by a series of shape revolves.// Make a starting vertex at [-1.0, 0, 0].TopoDS_ShapeaVertex=BRepBuilderAPI_MakeVertex(gp_Pnt(-1.0,0.0,0.0));// Make a circular edge by revolting aVertex around// an axis Y positioned at [-1.5, 0.0, 0.0] on 2*Pi anglegp_Ax1anAxis1(gp_Pnt(-1.5,0.0,0.0),gp::DY());TopoDS_ShapeanEdge=BRepPrimAPI_MakeRevol(aVertex,anAxis1);myResult<<"Circular edge was created in yellow"<<std::endl;// Make a toroidal face by revolting anEdge around// Z axis on 2*Pi angle.TopoDS_ShapeaFace=BRepPrimAPI_MakeRevol(anEdge,gp::OZ());myResult<<"Toroidal face was created in red"<<std::endl;Handle(AIS_Axis)anAisAxis1=newAIS_Axis(newGeom_Axis1Placement(anAxis1));Handle(AIS_Axis)anAisAxis2=newAIS_Axis(newGeom_Axis1Placement(gp::OZ()));Handle(AIS_Shape)anAisVertex=newAIS_Shape(aVertex);Handle(AIS_ColoredShape)anAisEdge=newAIS_ColoredShape(anEdge);Handle(AIS_ColoredShape)anAisFace=newAIS_ColoredShape(aFace);anAisEdge->SetColor(Quantity_Color(Quantity_NOC_GREEN));anAisEdge->SetWidth(1.5);anAisAxis1->SetColor(Quantity_NOC_GREEN);anAisFace->SetColor(Quantity_Color(Quantity_NOC_RED));anAisAxis2->SetColor(Quantity_NOC_RED);myObject3d.Append(anAisVertex);myObject3d.Append(anAisEdge);myObject3d.Append(anAisFace);