.. role:: blue :class: blue Adding a Polygonal Object ========================= .. _Adding_a_Polygonal_Object_: .. kernel version: The virtual method of geometric model objects .. code-block:: cpp 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 :blue:`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 :blue:`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 :ref:`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 :ref:`Fig. 3 `, constructed by this method: .. figure:: ../../pictures/R.1.3.1.png :width: 9cm :align: center Fig. 1