|As you did when creating the base profile of the bottle, you can now:|
- compute the edges of the neck's threading.
- compute two wires out if these edges.
Previously, you built:
- two cylindrical surfaces of the threading
- three curves defining the threading's base geometry
To compute the edges out of these curves, you again use the BRepBuilderAPI_MakeEdge class.
One of its constructors allows you to build an edge out of a curve described in the 2D parametric space of a surface.
TopoDS_Edge aEdge1OnSurf1 = BRepBuilderAPI_MakeEdge(aArc1 , aCyl1);
TopoDS_Edge aEdge2OnSurf1 = BRepBuilderAPI_MakeEdge(aSegment , aCyl1);
TopoDS_Edge aEdge1OnSurf2 = BRepBuilderAPI_MakeEdge(aArc2 , aCyl2);
TopoDS_Edge aEdge2OnSurf2 = BRepBuilderAPI_MakeEdge(aSegment , aCyl2);
And now, you can create the two threading's profiles lying on each surface.
TopoDS_Wire threadingWire1 = BRepBuilderAPI_MakeWire(aEdge1OnSurf1 ,
TopoDS_Wire threadingWire2 = BRepBuilderAPI_MakeWire(aEdge1OnSurf2 ,
Remember that these wires were built out of a surface and 2D curves.
One important data item on these wires is missing: there is no information on the 3D curves.
Fortunately, you do not need to compute this by yourself, which can be a major task as the mathematics can be quite complex.
When a shape contains all the necessary information except 3D curves, Open CASCADE Technology provides a tool to build them automatically. In the BRepLib tool package, you can use the BuildCurves3d method to
compute 3D curves for all the edges of a shape.