Mon, 03/04/2024 - 17:18
Here is my code:
gp_Ax2 circleAxis(gp_Pnt(0, 0, 0), gp_Vec(1, 0, 0));
Handle(Geom_Circle) circle = new Geom_Circle(circleAxis, 20.0);
TopoDS_Edge circleEdge = BRepBuilderAPI_MakeEdge(circle);
BRepBuilderAPI_MakeWire wireMaker;
wireMaker.Add(circleEdge);
TopoDS_Wire circleWire = wireMaker.Wire();
TopoDS_Shape circleShape = circleWire;
gp_Pnt startPoint(0.0, 0.0, 0.0);
...
TopoDS_Edge line1 = BRepBuilderAPI_MakeEdge(startPoint, secondPoint);
...
BRepBuilderAPI_MakeWire wireMaker2;
wireMaker2.Add(line1);
...
TopoDS_Wire wire = wireMaker2.Wire();
//another wire witch defines the direction of the normal
...
...
BRepOffsetAPI_MakePipeShell pipeShellMaker(wire);
pipeShellMaker.SetMode(wireNormal);
pipeShellMaker.Add(circleShape);
pipeShellMaker.Build();
TopoDS_Shape resultShapeShell = pipeShellMaker.Shape();