.. role:: blue :class: blue Two-Dimensional Geometric Object MbPlaneItem =========================================== .. _MbPlaneItem_Two-Dimensional_Geometrical_Object_: .. kernel version: 118060 The :blue:`MbPlaneItem` class is declared in the *plane_item.h* file. The :blue:`MbPlaneItem` class is derived from the :ref:`MbRefItem ` and :blue:`TapeBase` classes and is the parent class for all two-dimensional geometric objects. The two-dimensional geometric objects of the C3D kernel include curves, multiline and region: .. figure:: /MODELER/GEOMETRICAL_OBJECTS/pictures/O.2.4.1.png :width: 12cm :align: center The following families of two-dimensional geometric objects are derived from :blue:`MbPlaneItem`: :ref:`MbCurve ` – two-dimensional curve; :ref:`MbMultiline ` – multiline; :ref:`MbRegion ` – region. The main methods of two-dimensional geometric objects are: .. code-block:: cpp virtual void Move( const MbVector & to, MbRegTransform * iReg = nullptr, const MbSurface * newSurface = nullptr ); virtual void Rotate( const MbCartPoint & pnt, const MbDirection & angle, MbRegTransform * iReg = nullptr, const MbSurface * newSurface = nullptr ) = 0; virtual void Transform( const MbMatrix & matr, MbRegTransform * iReg = nullptr, const MbSurface * newSurface = nullptr ); serving the transformation of a two-dimensional geometric object. During the transformation, the registrator :blue:`MbRegTransform` is used to prevent multiple transformation of nested objects. If an object contains pointers or references to other objects, then the nested objects are also transformed. The registrator must be used if it is necessary to sequentially transform several interrelated objects whose connection is determined by the presence of pointers or references to common objects in them. When transforming without a registrator, one can obtain multiple transformation of common nested objects. In addition, all geometric objects have methods providing duplication, checking for equality, checking the possibility of making them equal, and making objects equal: .. code-block:: cpp MbPlaneItem & Duplicate( MbRegDuplicate * iReg = nullptr ); bool IsSame( const MbPlaneItem & item, double accuracy = LENGTH_EPSILON ); bool IsSimilar( const MbPlaneItem & item ); bool SetEqual( const MbPlaneItem & item ); When creating a copy, the registrator :blue:`MbRegDuplicate` is used to prevent multiple copying of nested objects. If an object contains pointers or references to other objects, then the nested objects are also copied. The registrator must be used if it is necessary to sequentially copy several interrelated objects whose connection is determined by the presence of pointers or references to common objects in them. When copying without a registrator, one can obtain a set of copies of the same nested object instead of a single copy of it. For type identification, geometric objects are equipped with methods .. code-block:: cpp MbePlaneType IsA(); MbePlaneType Type(); MbePlaneType Family(); returning the type from the enumeration of two-dimensional geometric objects. The methods .. code-block:: cpp MbProperty & CreateProperty( MbePrompt name ); void GetProperties( MbProperties & properties ); void SetProperties( MbProperties & properties ); provide retrieval and editing of internal data of geometric objects. The :blue:`GetProperties`\() method adds the object data to the **properties** set in the form of classes derived from :blue:`MbProperty`.