Adding a Polygonal Object
The virtual method of geometric model objects
bool MbItem::AddYourMesh( const MbStepData & stepData,
const MbFormNote & note,
MbMesh & mesh ) const;
constructs and adds its own polygonal copy to the supplied polygonal object mesh.
The input parameters of the method are:
stepData – data for calculating the approximation step;
note – method of constructing the polygonal object.
The output parameter of the method is the polygonal object mesh.
If the method succeeds, it returns true.
The method is declared in the item.h file and in the header files of MbItem inheritors.
This method approximates model objects by polygonal copies and adds them to the supplied mesh object. For an insertion, the method creates a polygonal copy of the insertion content, transforms it into the global coordinate system and adds it to the supplied mesh object. For an assembly unit, the method creates a polygonal copy of the assembly unit content, transforms it into the global coordinate system and adds it to the supplied mesh object.
As in the CalculateMesh() method, the stepData parameter controls the density of the polygonal object mesh, and the note parameter defines the method of constructing the polygonal object. The stepData and note parameters are described in the Triangulation_Calculation_Control paragraph. Unlike the above-mentioned method, this method creates a single polygonal object for complex objects. Fig. 1 shows a polygonal object of the assembly unit shown in Fig. 3, constructed by this method:
Fig. 1