|You have computed the threading's wires. The threading will be a solid shape, so you must now compute the faces of the wires, the faces allowing you to join the wires, the shell out of these faces and then the solid itself. This can be a lengthy operation.|
|There are always faster ways to build a solid when the base topology is defined. You would like to create a solid out of two wires. Open CASCADE Technology provides a quick way to do this by building a loft: a shell or a solid passing through a set of wires in a given sequence.|
The loft function is implemented in the BRepOffsetAPI_ThruSections class, which you use as follows:
- Initialize the algorithm by creating an instance of the class. The first parameter of this constructor must be specified if you want to create a solid. By default, BRepOffsetAPI_ThruSections builds a shell.
- Add the successive wires using the AddWire method.
- Use the CheckCompatibility method to activate (or deactivate) the option that checks if the
wires have same number of edges. In this case, wires have two edges each, so you can deactivate this option.
- Ask for the resulting loft shape with the Shape method.
TopoDS_Shape myThreading = aTool.Shape();
You are almost done building the bottle. Use the TopoDS_Compound and BRep_Builder classes to
build single shape from myBody and myThreading:
aBuilder.Add (aRes, myBody);
aBuilder.Add (aRes, myThreading);
Congratulations! your bottle is complete. We hope that this tutorial has provided you with a feel for the industrial strength power of Open CASCADE Technology.
If you want to know more and develop major projects using Open CASCADE Technology, we invite you to study our training, support, and consulting services at http://www.opencascade.com/support. Our professional services can maximize the power of your Open CASCADE Technology applications.