C3D Toolkit  Kernel - 110050, Vision - 2.5.0.18

The polygonal geometric object - Mesh. More...

#include <mesh.h>

+ Inheritance diagram for MbMesh:
+ Collaboration diagram for MbMesh:

Public Member Functions

 MbMesh (bool _exact=false)
 Constructor without parameters.
 
virtual ~MbMesh ()
 Destructor.
 
virtual MbeSpaceType IsA () const
 Get the type of the object.
 
virtual MbSpaceItemDuplicate (MbRegDuplicate *=NULL) const
 Create a copy of the object. More...
 
virtual void Transform (const MbMatrix3D &, MbRegTransform *=NULL)
 Convert the object according to the matrix. More...
 
virtual void Move (const MbVector3D &, MbRegTransform *=NULL)
 Move an object along a vector. More...
 
virtual void Rotate (const MbAxis3D &, double angle, MbRegTransform *=NULL)
 Rotate an object around an axis at a given angle. More...
 
virtual bool IsSame (const MbSpaceItem &other, double accuracy=LENGTH_EPSILON) const
 Determine whether an object is equal. More...
 
virtual bool SetEqual (const MbSpaceItem &init)
 Make objects equal if they are similar. More...
 
virtual double DistanceToPoint (const MbCartPoint3D &) const
 Determine the distance to the point. More...
 
virtual void AddYourGabaritTo (MbCube &r) const
 Expand sent bounding box (a.k.a. gabarit), so that it included the object. More...
 
virtual void CalculateLocalGabarit (const MbMatrix3D &into, MbCube &cube) const
 To compute bounding box in a local coordinate system. More...
 
virtual void CalculateMesh (const MbStepData &stepData, const MbFormNote &note, MbMesh &mesh) const
 Build polygonal copy mesh. More...
 
virtual MbPropertyCreateProperty (MbePrompt n) const
 Create your own property with the name.
 
virtual void GetProperties (MbProperties &properties)
 Outstanding properties of the object. More...
 
virtual void SetProperties (const MbProperties &properties)
 Change the properties of an object. More...
 
virtual void GetBasisPoints (MbControlData3D &) const
 Get control points of object.
 
virtual void SetBasisPoints (const MbControlData3D &)
 Change the object by control points.
 
virtual MbItemCreateMesh (const MbStepData &stepData, const MbFormNote &note, MbRegDuplicate *iReg) const
 Create polygonal object. More...
 
virtual bool AddYourMesh (const MbStepData &stepData, const MbFormNote &note, MbMesh &mesh) const
 Add polygonal object. More...
 
virtual MbItemCutMesh (const MbPlacement3D &cutPlace, double distance) const
 Cut the polygonal object by one or two parallel planes. More...
 
virtual bool NearestMesh (MbeSpaceType sType, MbeTopologyType tType, MbePlaneType pType, const MbAxis3D &axis, double maxDistance, bool gridPriority, double &t, double &dMin, MbItem *&find, SimpleName &findName, MbRefItem *&element, SimpleName &elementName, MbPath &path, MbMatrix3D &from) const
 Find the nearest object or name of the nearest object. More...
 
bool LineIntersection (const MbFloatAxis3D &line, MbFloatPoint3D &crossPnt, float &tRes)
 Find the intersection of a straight line with the polygonal object. More...
 
Function of polygonal object.
bool IsAPointMesh () const
 Whether the polygonal object is approximation of point.
 
bool IsACurveMesh () const
 Whether the polygonal object is approximation of curve.
 
bool IsASurfaceMesh () const
 Whether the polygonal object is approximation of surface.
 
bool IsASolidMesh () const
 Whether the polygonal object is approximation of solid.
 
bool IsComplete () const
 Whether containers of mesh contain data.
 
void GridsReserve (size_t cnt, bool fill=false)
 Reserve space for the plates.
 
void PolygonsReserve (size_t cnt)
 Reserve space for the polygons.
 
void ApexReserve (size_t cnt)
 Reserve space for the apexes.
 
void Flush ()
 Set object data to null.
 
void Adjust ()
 Free the unnecessary memory.
 
size_t GridsCount () const
 Get the number of triangulations.
 
void AddGrid (MbGrid &gr)
 Add triangulation.
 
MbGridAddGrid ()
 Add new empty triangulation and give it to fill.
 
MbGridDetachGrid (size_t i)
 Detach triangulation with a given number.
 
template<class GridsVector >
void DetachAllGrids (GridsVector &gridsVector)
 Detach all triangulations.
 
const MbGridGetGrid (size_t i) const
 Return pointer to triangulation by it number.
 
MbGridSetGrid (size_t i)
 Return the pointer to triangulation by its number to be modified.
 
template<class GridsVector >
void GetGrids (GridsVector &gridsVector) const
 Get pointers to triangulations.
 
size_t PolygonsCount () const
 Get the number of polygons.
 
void AddPolygon (MbPolygon3D &)
 Add polygon.
 
MbPolygon3DAddPolygon ()
 Add new empty polygon and give it to fill.
 
MbPolygon3DDetachPolygon (size_t i)
 Detach polygon with a given number.
 
template<class PolygonsVector >
void DetachAllPolygons (PolygonsVector &polyVector)
 Detach all polygons.
 
const MbPolygon3DGetPolygon (size_t i) const
 Return the pointer to polygon by its number.
 
MbPolygon3DSetPolygon (size_t i)
 Return the pointer to polygon by its number.
 
template<class PolygonsVector >
void GetPolygons (PolygonsVector &polyVector) const
 Get pointers to polygons.
 
size_t ApexesCount () const
 Get the number of apexes.
 
void AddApex (MbApex3D &ap)
 Add new apex.
 
MbApex3DAddApex ()
 Add new empty apex and give it to fill.
 
MbApex3DDetachApex (size_t i)
 Detach apex with a given number.
 
template<class ApexesVector >
void DetachAllApexes (ApexesVector &peakVector)
 Detach all apexes.
 
const MbApex3DGetApex (size_t i) const
 Return the pointer to apex by its number.
 
MbApex3DSetApex (size_t i)
 Return the pointer to apex by its number to be modified.
 
template<class ApexesVector >
void GetApexes (ApexesVector &peakVector) const
 Get pointers to apexes.
 
MbMeshCreateMeshByExistingItem (const MbRefItem &) const
 
void InitMesh (const MbMesh &)
 Initialize an object.
 
bool AddMesh (const MbMesh &, bool checkSamePointers)
 Add objects of mesh from a given mesh.
 
const MbSpaceItemSpaceItem () const
 Get a spatial object for which a polygonal object is constructed.
 
const MbPlaneItemPlaneItem () const
 Get a two-dimensional object for which a polygonal object is constructed.
 
const MbItemItem () const
 Get a model geometric object for which a polygonal object is constructed.
 
const MbRefItemGetRefItem () const
 Get an object for which a polygonal object is constructed.
 
void SetRefItem (const MbRefItem *g)
 Remember an object for which a polygonal object is constructed.
 
void ResetRefItems ()
 Reset all reference objects.
 
void SetMeshType (MbeSpaceType t)
 Set a type of polygonal object.
 
MbeSpaceType GetMeshType () const
 Get a type of polygonal object.
 
void SetGridName (SimpleName n)
 Set the name of all triangulations.
 
void SetPolygonName (SimpleName n)
 Set the name of all polygons.
 
void SetApexName (SimpleName n)
 Set the name of all apexes.
 
bool IsClosed () const
 Object closedness.
 
void SetClosed (bool c)
 Set object (un-) closedness.
 
bool IsExact () const
 Objects on double data.
 
MbeItemLocation GetLocation (const MbPlacement3D &pl, double eps, bool onlyInItem=false) const
 Define the object position relative to the plane. More...
 
bool InsideLocation (const MbPlacement3D &place, MbRect &rect, double eps) const
 Define the object position relative to the tube. More...
 
void ConvertAllToTriangles ()
 Convert all objects to triangles and equalize the number of points and normals.
 
size_t AllTrianglesCount () const
 The total number of all (adjacent and nonadjacent) triangles.
 
size_t AllQuadranglesCount () const
 The total number of all (adjacent and nonadjacent) quadrangles.
 
size_t AllPointsCount () const
 The total number of all points of triangulations.
 
size_t AllNormalsCount () const
 The total number of all normals of triangulations.
 
size_t AllParamsCount () const
 The total number of all parameters of triangulations.
 
size_t AllPolyPointsCount () const
 The total number of all points of poligons.
 
- Public Member Functions inherited from MbItem
 MbItem ()
 Constructor.
 
virtual ~MbItem ()
 Destructor.
 
virtual MbeSpaceType Type () const
 Get the group object type.
 
virtual MbeSpaceType Family () const
 Get family of objects.
 
virtual MbeImplicationType ImplicationType () const
 Get attribute container type.
 
virtual void GetBasisPoints (MbControlData &) const
 
virtual void SetBasisPoints (const MbControlData &)
 
virtual bool GetPlacement (MbPlacement3D &p) const
 Get the coordinate system of an item if it is exist. More...
 
virtual bool SetPlacement (const MbPlacement3D &)
 Set the coordinate system of an item if it is possible.
 
virtual bool RebuildItem (MbeCopyMode sameShell, RPArray< MbSpaceItem > *items, IProgressIndicator *progInd)
 Reconstruct object according to the history tree. More...
 
virtual bool GetItems (MbeSpaceType type, const MbMatrix3D &from, RPArray< MbItem > &items, SArray< MbMatrix3D > &matrs)
 Get all objects by type. More...
 
virtual bool GetUniqItems (MbeSpaceType type, CSSArray< const MbItem *> &items) const
 Get all unique objects by type. More...
 
virtual const MbItemGetItemByPath (const MbPath &path, size_t ind, MbMatrix3D &from, size_t currInd=0) const
 Get the object by its path. More...
 
virtual const MbItemFindItem (const MbSpaceItem *s, MbPath &path, MbMatrix3D &from) const
 Find object by geometric object. More...
 
virtual const MbItemFindItem (const MbPlaneItem *s, MbPath &path, MbMatrix3D &from) const
 Find object by geometric object. More...
 
virtual const MbItemFindItem (const MbItem *s, MbPath &path, MbMatrix3D &from) const
 Find object by object of geometric model. More...
 
virtual const MbItemGetItemByName (SimpleName n, MbPath &path, MbMatrix3D &from) const
 Find object by name. More...
 
virtual void TransformSelected (const MbMatrix3D &matr, MbRegTransform *iReg=NULL)
 Transform selected object according to the matrix. More...
 
virtual void MoveSelected (const MbVector3D &to, MbRegTransform *iReg=NULL)
 Move selected object along a vector. More...
 
virtual void RotateSelected (const MbAxis3D &axis, double angle, MbRegTransform *iReg=NULL)
 Rotate selected object by a given angle about an axis. More...
 
virtual bool GetMatrixFrom (MbMatrix3D &from) const
 Get transform matrix from local coordinate system of object.
 
virtual bool GetMatrixInto (MbMatrix3D &into) const
 Get transform matrix into local coordinate system of object.
 
void Assign (const MbItem &other)
 Copy creators and attributes.
 
void CopyItemName (const MbItem &other)
 Copy the name of an object.
 
SimpleName GetItemName () const
 Get name of object.
 
void SetItemName (SimpleName n)
 Set name of the object.
 
bool IsAttributeEqual (int attribute)
 Whether a sign attribute matches an object?
 
- Public Member Functions inherited from MbSpaceItem
virtual ~MbSpaceItem ()
 Destructor.
 
void PrepareWrite () const
 Register object. More...
 
virtual MbeRefType RefType () const
 Get a registration type (for copying, duplication).
 
virtual bool IsFamilyRegistrable () const
 Whether the object belongs to a registrable family.
 
virtual bool IsSimilar (const MbSpaceItem &item) const
 Determine whether an object is similar. More...
 
virtual void Refresh ()
 Translate all the time (mutable) data objects in an inconsistent (initial) state.
 
void CalculateWire (const MbStepData &stepData, MbMesh &mesh) const
 
void CalculateWire (double sag, MbMesh &mesh) const
 
virtual void GetBasisItems (RPArray< MbSpaceItem > &)
 Outstanding reference objects in a container sent.
 
- Public Member Functions inherited from TapeBase
 TapeBase (RegistrableRec regs=noRegistrable)
 Constructor.
 
 TapeBase (const TapeBase &)
 Copy-constructor.
 
virtual ~TapeBase ()
 Destructor.
 
RegistrableRec GetRegistrable () const
 Whether the stream class is registrable.
 
void SetRegistrable (RegistrableRec regs=registrable) const
 Set the state of registration of the stream class.
 
virtual const char * GetPureName (const VersionContainer &) const
 Get the class name.
 
- Public Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 
refcount_t GetUseCount () const
 Get count of references (get count of owners of an object).
 
refcount_t AddRef () const
 Increase count of references by one.
 
refcount_t DecRef () const
 Decrease count of references by one.
 
refcount_t Release () const
 Decrease count of references by one and if count of references became zero, then remove itself.
 
- Public Member Functions inherited from MbTransactions
 MbTransactions ()
 Constructor without parameters.
 
template<class Creators >
 MbTransactions (const Creators &creators)
 Constructor by creators.
 
virtual ~MbTransactions ()
 Destructor.
 
void CreatorsCopy (MbTransactions &other, MbRegDuplicate *iReg=NULL) const
 Clear the given history tree and copy the creators to it.
 
void CreatorsAssign (const MbTransactions &other)
 Clear the history tree and copy the creators from the given history tree to it.
 
bool SetCreatorsEqual (const MbTransactions &other)
 Make the creators equal to the creators from the given history tree if the creators are similar.
 
bool IsCreatorsSimilar (const MbTransactions &other) const
 Check whether the corresponding creators of the given history tree are similar.
 
void CreatorsTransform (const MbMatrix3D &, MbRegTransform *=NULL)
 Transform the creators according to the matrix.
 
void CreatorsMove (const MbVector3D &, MbRegTransform *=NULL)
 Move creators along the vector.
 
void CreatorsRotate (const MbAxis3D &, double angle, MbRegTransform *=NULL)
 Rotate the creators about the axis by the given angle.
 
size_t GetCreatorsCount () const
 Get the creators count.
 
void Reserve (size_t count)
 Reserve space for creators.
 
const MbCreatorGetCreator (size_t ind) const
 Get constructor by its index.
 
MbCreatorSetCreator (size_t ind)
 Get constructor by its index with possibility of editing.
 
virtual bool GetCreators (RPArray< MbCreator > &) const
 Add your own creators to the given array.
 
virtual bool GetCreators (c3d::CreatorsSPtrVector &) const
 Add your own creators to the given array.
 
bool GetCreatorsCopies (RPArray< MbCreator > &) const
 Add copies of your own creators to the given array.
 
bool GetCreatorsCopies (c3d::CreatorsSPtrVector &) const
 Add copies of your own creators to the given array.
 
size_t FindCreator (const MbCreator *creator)
 Find the number of creators in the history tree or return SYS_MAX_T if it is absent.
 
bool AddCreator (const MbCreator &, bool addSame=false)
 Add the constructor (addSame = false) or its copy (addSame = true) to the history tree.
 
bool AddCreator (const MbCreator *, bool addSame=false)
 Add the constructor (addSame = false) or its copy (addSame = true) to the history tree.
 
void AddCreators (const RPArray< MbCreator > &)
 Add creators to the history tree.
 
MbCreatorDetachCreator (size_t ind)
 Remove the constructor with the specified index from the history tree and return it.
 
bool DeleteCreator (size_t ind)
 Delete the constructor with the specified index and remove it from the history tree.
 
void DeleteCreators ()
 Delete all the creators and clear the history tree.
 
int GetCreatorStatus (size_t ind) const
 Get the status of creator with the specified index.
 
bool SetCreatorStatus (size_t ind, MbeProcessState)
 Set status to creator with the specified index.
 
size_t GetActiveCreatorsCount () const
 Get the active creators count.
 
bool SetActiveCreatorsCount (size_t activeCount)
 Set the count of active creators from the beginning to the given index.
 
void BreakCreatorsToBasisItem (size_t c, RPArray< MbSpaceItem > &)
 Get the object created by the specified number of creators and the basis items of the other creators.
 
void GetCreatorsBasisItems (RPArray< MbSpaceItem > &)
 Get the basis items of the creators.
 
void GetCreatorsBasisPoints (MbControlData3D &) const
 Get the basis points of the creators.
 
void SetCreatorsBasisPoints (const MbControlData3D &)
 Change the object by control points.
 
void GetProperties (MbProperties &, bool sameCreators=false)
 Get properties of the creators (using original creators or their copies).
 
void SetProperties (const MbProperties &)
 Set properties of the creators.
 
void CreatorsRead (reader &in)
 Read creators from the stream.
 
void CreatorsWrite (writer &out) const
 Write creators to the stream.
 
- Public Member Functions inherited from MbAttributeContainer
 MbAttributeContainer ()
 Constructor without parameters.
 
 MbAttributeContainer (MbAttribute &)
 Constructor by attribute.
 
virtual ~MbAttributeContainer ()
 Destructor.
 
void AttributesRead (reader &)
 Read attributes from stream.
 
void AttributesWrite (writer &) const
 Writing attributes to stream.
 
void GetProperties (MbProperties &)
 Get properties of attributes.
 
void SetProperties (const MbProperties &)
 Set properties of attributes.
 
void SetDensity (double)
 Set density of an object.
 
double GetDensity () const
 Get density of an object.
 
void SetVisual (float a, float d, float sp, float sh, float t, float e)
 Set visual properties of the object.
 
bool GetVisual (float &a, float &d, float &sp, float &sh, float &t, float &e) const
 Get visual properties of the object. More...
 
bool IsColored () const
 
void SetColor (uint32)
 Change color of the object.
 
void SetColor (int R, int G, int B)
 Change color of the object (0-255).
 
uint32 GetColor () const
 Get color of an object.
 
void SetWidth (int)
 Set thickness of lines for object's representation.
 
int GetWidth () const
 Get thickness of lines for object's representation.
 
void SetStyle (int)
 Set style of lines for object's representation.
 
int GetStyle () const
 Get style of lines for object's representation.
 
void SetSelected (bool s=true)
 To allocate or not to allocate an object.
 
bool IsSelected () const
 Is the object selected.
 
bool ReverseSelected ()
 Invert object selection.
 
void SetChanged (bool c=true)
 Set: the object is changed or isn't changed.
 
bool IsChanged () const
 Is the object changed?
 
void SetVisible (bool)
 Set visibility.
 
bool IsVisible () const
 Is the object visible?
 
bool IsInvisible () const
 Is the object invisible?
 
void AttributesAssign (const MbAttributeContainer &)
 Duplicate attributes of a given object, release existing attributes.
 
size_t AttributesCount () const
 Get the number of objects.
 
void RemoveAttributes (bool onDeleteOwner=false)
 Delete all attributes from container.
 
MbAttributeAddAttribute (MbAttribute *, bool checkSame=true)
 Add attribute in container.
 
MbAttributeAddAttribute (const MbAttribute &, bool checkSame=true)
 Add attribute in container (always copies the attribute).
 
void GetAttributes (c3d::AttrVector &, MbeAttributeType aFamily, MbeAttributeType subType) const
 Get attributes of a given family.
 
void GetAttributes (c3d::AttrVector &, MbeAttributeType aType) const
 Get attributes of a given type.
 
void GetCommonAttributes (c3d::AttrVector &, const c3d::string_t &samplePrompt, MbeAttributeType subType=at_Undefined) const
 Get attributes using sample of description string.
 
void GetStringAttributes (c3d::AttrVector &, const c3d::string_t &sampleContent) const
 Get string attributes using sample of contents of the string.
 
bool RemoveAttribute (const MbAttribute *, bool checkAccuracySame=false, double accuracy=LENGTH_EPSILON)
 Get an attribute of a given type, the first one is returned if there are many. More...
 
bool RemoveAttributes (MbeAttributeType type, MbeAttributeType subType)
 Delete attributes of a given type.
 
const MbAttributeGetSimpleAttribute (MbeAttributeType) const
 Get a simple attribute of a given subtype.
 
MbAttributeSetSimpleAttribute (MbeAttributeType)
 Get a simple attribute of a given subtype.
 
MbAttributeSetSimpleAttribute (MbAttribute *simpAttr)
 Set a simple attribute of a given subtype.
 
MbAttributeSetSimpleAttribute (const MbAttribute &simpAttr)
 Set a simple attribute of a given subtype (always copies the attribute).
 
void RemoveSimpleAttribute (MbeAttributeType)
 Delete simple attributes (one or more) of a given subtype.
 
MbAttributeDetachSimpleAttribute (MbeAttributeType)
 Detach a simple attribute of a given subtype.
 
void GetUserAttributes (std::vector< MbUserAttribute *> &attrs, const MbUserAttribType &type) const
 Get a user attribute of a given subtype.
 
void RemoveUserAttributes (const MbUserAttribType &type)
 Delete user attributes (one or more) of a given subtype.
 
void DetachUserAttributes (std::vector< MbUserAttribute *> &attrs, const MbUserAttribType &type)
 Detach a user attribute of a given subtype.
 
void AttributesChange ()
 Perform actions when changing the attributes.
 
void AttributesConvert (MbAttributeContainer &other) const
 Perform actions when converting the attributes.
 
void AttributesTransform (const MbMatrix3D &, MbRegTransform *=NULL)
 Perform actions when transforming the attributes.
 
void AttributesMove (const MbVector3D &, MbRegTransform *=NULL)
 Perform actions when moving the attributes.
 
void AttributesRotate (const MbAxis3D &, double angle, MbRegTransform *=NULL)
 Perform actions when rotating the attributes.
 
void AttributesCopy (MbAttributeContainer &other, MbRegDuplicate *=NULL) const
 Perform actions when copying the attributes.
 
void AttributesMerge (MbAttributeContainer &other)
 Perform actions when merging the attributes.
 
void AttributesReplace (MbAttributeContainer &other)
 Perform actions when replacing the attributes.
 
void AttributesSplit (const std::vector< MbAttributeContainer *> &others)
 Perform actions when splitting the attributes.
 
void AttributesDelete ()
 Perform actions when deleting the attributes.
 
- Public Member Functions inherited from MbSyncItem
void Lock () const
 Switch lock on (locking happens only in parallel region).
 
void Unlock () const
 Switch lock off if locking has been set.
 

Additional Inherited Members

- Static Public Member Functions inherited from MbAttributeContainer
static MbUserAttributeReduceUserAttrib (const MbExternalAttribute &)
 Convert user attribute to "system" one.
 
static MbExternalAttributeAdvanceUserAttrib (const MbUserAttribute &)
 Convert "system" attribute to user one.
 
- Protected Member Functions inherited from MbItem
 MbItem (const MbItem &, MbRegDuplicate *)
 Copy-constructor with duplication registrator.
 
void LockItem () const
 Catch object if multithreading mode is on.
 
void UnlockItem () const
 Release object if multithreading mode is on.
 
- Protected Member Functions inherited from MbSpaceItem
 MbSpaceItem ()
 Default constructor.
 
- Protected Member Functions inherited from MbTransactions
 MbTransactions (const MbTransactions &, MbRegDuplicate *iReg)
 Copy-constructor with registrator.
 
- Protected Member Functions inherited from MbAttributeContainer
 MbAttributeContainer (const MbAttributeContainer &, MbRegDuplicate *)
 Copy-constructor with the registrator.
 

Detailed Description

The polygonal geometric object - Mesh.

Mesh is an object of geometric model (subclass MbItem) which is the set of primitives MbPrimitive which approximate some geometric object for speed up rendering, calculation of inertial characteristics, collision detection and other calculations.
For example, the mesh can be create on the basis of a point set obtained measurements of the real physical solid. Polygonal object contains a set of points which are nodes (vertices) in the data structures: a set of pointers to triangulations MbGrid (sets of mating triangular and quadrangular plates), a set of pointers to polygons MbPolygon3D (sets of points which describe the polylines), a set of pointers to apexes MbApex3D (points wich describe the position of vertices or objects-points).

Usage
The mesh is used to represent geometric objects in a polygonal form,
for visualization of geometric objects,
for calculations of geometry objects collisions,
for calculation of the mass-inertial properties.
If the mesh approximates the solid MbSolid then polygonal object as a solid can be closed or unclosed.

Member Function Documentation

◆ Duplicate()

virtual MbSpaceItem& MbMesh::Duplicate ( MbRegDuplicate iReg = NULL) const
virtual

Create a copy of the object.

Create a copy of an object using the registrator. Registrator is used to prevent multiple copy of the object. If the object contains references to the other objects, then nested objects are copied as well. It is allowed not to pass registrator into the function. Then new copy of object will be created. While copying of single object or set of not connected objects, it is allowed not to use registrator. Registrator should be used if it is required to copy several connected objects. It is possible, that objects connection is based on the references to common objects. Then, while copying without using of registrator, it is possible to obtain set of copies, that contain references to the different copies of the same nested object, that leads to loss of connection between copies.

Parameters
[in]iReg- Registrator.
Returns
A copy of the object.

Implements MbItem.

◆ Transform()

virtual void MbMesh::Transform ( const MbMatrix3D matr,
MbRegTransform iReg = NULL 
)
virtual

Convert the object according to the matrix.

Convert the original object according to the matrix using the registrator. If object contains references to the other geometric objects, then nested objects are transformed according to the matrix. Registrator is needed to prevent multiple object copying. It is allowed to use function without registrator, if it is needed to transform single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be transformed.

Parameters
[in]matr- Transformation matrix.
[in]iReg- Registrator.

Implements MbItem.

◆ Move()

virtual void MbMesh::Move ( const MbVector3D to,
MbRegTransform iReg = NULL 
)
virtual

Move an object along a vector.

Move an object along a geometric vector using the registrator. If object contains references to the other geometric objects then the move operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be moved.

Parameters
[in]to- Shift vector.
[in]iReg- Registrator.

Implements MbItem.

◆ Rotate()

virtual void MbMesh::Rotate ( const MbAxis3D axis,
double  angle,
MbRegTransform iReg = NULL 
)
virtual

Rotate an object around an axis at a given angle.

Rotate an object around an axis at a given angle with the registrator. If object contains references to the other geometric objects then the rotation operation is applied to the nested objects. Registrator is needed to prevent multiple copying of the object. It is allowed to use function without registrator, if it is needed to transform a single object. If it is needed to transform a set of connected objects, then one should use registrator to prevent repeating transformation of nested objects, because of the possible situation when several objects contain references to the same common objects, that require to be rotated.

Parameters
[in]axis- The axis of rotation.
[in]angle- Rotation.
[in]iReg- Registrator.

Implements MbItem.

◆ IsSame()

virtual bool MbMesh::IsSame ( const MbSpaceItem other,
double  accuracy = LENGTH_EPSILON 
) const
virtual

Determine whether an object is equal.

Still considered objects of the same type, all data is the same (equal).

Parameters
[in]item- The object to compare.
[in]accuracy- The accuracy to compare.
Returns
Whether the objects are equal.

Implements MbItem.

◆ SetEqual()

virtual bool MbMesh::SetEqual ( const MbSpaceItem item)
virtual

Make objects equal if they are similar.

You can still make only a similar objects.

Parameters
[in]item- The object to initialize.
Returns
Object is changed.

Implements MbItem.

◆ DistanceToPoint()

virtual double MbMesh::DistanceToPoint ( const MbCartPoint3D point) const
virtual

Determine the distance to the point.

Determine the distance to the point.

Parameters
[in]point- Point.
Returns
Distance to point

Implements MbItem.

◆ AddYourGabaritTo()

virtual void MbMesh::AddYourGabaritTo ( MbCube cube) const
virtual

Expand sent bounding box (a.k.a. gabarit), so that it included the object.

Expand sent bounding box, so that it included the object.

Parameters
[in,out]cube- The bounding box to expand.

Implements MbItem.

◆ CalculateLocalGabarit()

virtual void MbMesh::CalculateLocalGabarit ( const MbMatrix3D into,
MbCube cube 
) const
virtual

To compute bounding box in a local coordinate system.

To obtain bounding box of object with regar to a local coordinate system, sent box is made to be empty. Then it is computed bounding box of object in a local coordinate system \ and it is stored in box 'cube'

Parameters
[in]into- Transformation matrix from object's current coordinate system to a local coordinate system
[in,out]cube- Information on bounding box

Implements MbItem.

◆ CalculateMesh()

virtual void MbMesh::CalculateMesh ( const MbStepData stepData,
const MbFormNote note,
MbMesh mesh 
) const
virtual

Build polygonal copy mesh.

Build a polygonal copy of the object that is represented by polygons or/and fasets.

Parameters
[in]stepData- Data for еру step calculation for polygonal object.
[in]note- Way for polygonal object constructing.
[in,out]mesh- The builded polygonal object.

Implements MbItem.

◆ GetProperties()

virtual void MbMesh::GetProperties ( MbProperties properties)
virtual

Outstanding properties of the object.

Issue internal data (properties) of the object for viewing and modification.

Parameters
[in]properties- Container for the internal data of the object.

Reimplemented from MbItem.

◆ SetProperties()

virtual void MbMesh::SetProperties ( const MbProperties properties)
virtual

Change the properties of an object.

Changing the internal data (properties) of the object you are copying the corresponding values from the sent object.

Parameters
[in]properties- Container for the internal data of the object.

Reimplemented from MbItem.

◆ CreateMesh()

virtual MbItem* MbMesh::CreateMesh ( const MbStepData stepData,
const MbFormNote note,
MbRegDuplicate iReg 
) const
virtual

Create polygonal object.

Create a polygonal object - a polygonal copy of the given object.

Parameters
[in]stepData- Data for step calculation during triangulation.
[in]note- Way for polygonal object constructing.
Returns
Created polygonal object.

Implements MbItem.

◆ AddYourMesh()

virtual bool MbMesh::AddYourMesh ( const MbStepData stepData,
const MbFormNote note,
MbMesh mesh 
) const
virtual

Add polygonal object.

Add your own polygonal copy to the given polygonal object.

Parameters
[in]stepData- Data for step calculation during triangulation.
[in]note- Way for polygonal object constructing.
[out]mesh- Given polygonal object.
Returns
Whether the object is added.

Reimplemented from MbItem.

◆ CutMesh()

virtual MbItem* MbMesh::CutMesh ( const MbPlacement3D cutPlace,
double  distance 
) const
virtual

Cut the polygonal object by one or two parallel planes.

Create polygonal object from a part of source polygonal object which located under XY-plane of local coordinate system at given distance.
Function 'cuts' only MbMesh polygonal object. Function 'cuts' the object by two planes: XY plane of 'place' local coordinate system and plane parallel to it and located at 'distance' distance below it. If 'distance' is less than or equal to zero, then the function "cuts" an object only by one XY plane of local coordinate system.
Contents of an object that are necessary for creation of cut object and not affected by cutting planes are added to returned cut object without copying.

Parameters
[in]place- A local coordinate system which XY plane defines a cutting plane.
[in]distance- Distance to a parallel cutting plane is measured in negative direction of Z-axis of local coordinate system.
Returns
Returns new polygonal object that located under XY-plane of local coordinate system at given distance.

Reimplemented from MbItem.

◆ NearestMesh()

virtual bool MbMesh::NearestMesh ( MbeSpaceType  sType,
MbeTopologyType  tType,
MbePlaneType  pType,
const MbAxis3D axis,
double  maxDistance,
bool  gridPriority,
double &  t,
double &  dMin,
MbItem *&  find,
SimpleName findName,
MbRefItem *&  element,
SimpleName elementName,
MbPath path,
MbMatrix3D from 
) const
virtual

Find the nearest object or name of the nearest object.

Find the nearest three-dimensional object or its name by type of object and component of the required object or its name by topological or two-dimensional type of the element (on demand) at distance from line less than or equal to the given value. Function is intended for identification of a geometric object which is begetter of a polygonal object. The real search is performed for MbMesh polygonal object's MbPrimitive elements from which the information is taken about geometric object which is begetter of the primitive.

Parameters
[in]sType- Type of required object.
[in]tType- Topological type of the required object's component.
[in]pType- Two-dimensional type of the required object's component.
[in]axis- Line of search.
[in]maxDistance- Distance from the line on which the object is looked for.
[in]gridPriority- Increased priority triangulation grid when searching.
[out]t- Parameter of found point on line.
[out]dMin- Found distance from line to an object.
[out]find- Found object.
[out]findName- Name of the found object.
[out]element- Found component of the object.
[out]elementName- Name of found component of the object.
[out]path- Object's path in the model.
[out]from- Transformation matrix of the found object to the global coordinate system.
Returns
Whether the object or its name is found.

Reimplemented from MbItem.

◆ GetLocation()

MbeItemLocation MbMesh::GetLocation ( const MbPlacement3D pl,
double  eps,
bool  onlyInItem = false 
) const

Define the object position relative to the plane.

Define the object position relative to the plane XY of a local coordinate system.

Parameters
[in]pl- A local coordinate system which defines a plane.
[in]eps- A metric tolerance.
[in]onlyInItem- Whether the object position relative to the XY-plane of a local coordinate system is interested only.
Returns
Iloc_OnItem - object intersects the XY-plane of a local coordinate system,
iloc_InItem - object is located over the XY plane of a local coordinate system,
iloc_OutOfItem - object is located under the XY plane of a local coordinate system.

◆ InsideLocation()

bool MbMesh::InsideLocation ( const MbPlacement3D place,
MbRect rect,
double  eps 
) const

Define the object position relative to the tube.

Define whether the object is inside the tube of rectangular section, given by a rectangle in the XY plane of a local coordinate system.

Parameters
[in]place- A local coordinate system in the XY plane of which a tube section is located.
[in]rect- A rectangle which defines a tube section.
[in]eps- A metric tolerance.
[in]onlyInItem- Whether the object position relative to the tube is interested only.
Returns
Returns true if the object is inside the tube.

◆ LineIntersection()

bool MbMesh::LineIntersection ( const MbFloatAxis3D line,
MbFloatPoint3D crossPnt,
float &  tRes 
)

Find the intersection of a straight line with the polygonal object.

For all the triangles the intersection with the straight line is determined and the minimum value of the intersection point parameter on the secant straight line is calculated.

Parameters
[in]line- Straight line to calculate the intersection of triangulation with.
[out]crossPnt- The intersection point.
[out]tRes- Parameter of the intersection point on the line.
Returns
Whether the intersection is found (true if success).

The documentation for this class was generated from the following file: