C3D Toolkit
Kernel - 117958, Vision - 2.7.6.12
|
Solid solid. More...
#include <solid.h>
Public Types | |
enum | MultiState { ms_Undefined = 0 , ms_Single , ms_Multiple } |
The solid connection type. More... | |
Public Member Functions | |
MbSolid (MbFaceShell *shell, MbCreator *creator) | |
Constructor by shell and creator. | |
MbSolid (MbFaceShell &shell, MbCreator &creator) | |
Constructor by shell and creator. | |
MbSolid (MbFaceShell &shell, RPArray< MbCreator > &creators, bool sameCreators, MbRegDuplicate *iReg) | |
Constructor by shell and set of creators, flag of creators copying and registrator of objects duplicating. | |
MbSolid (MbFaceShell &shell, c3d::CreatorsVector &creators, bool sameCreators, MbRegDuplicate *iReg) | |
Constructor by shell and set of creators, flag of creators copying and registrator of objects duplicating. | |
MbSolid (MbFaceShell &shell, c3d::CreatorsSPtrVector &creators, bool sameCreators, MbRegDuplicate *iReg) | |
Constructor by shell and set of creators, flag of creators copying and registrator of objects duplicating. | |
MbSolid (MbFaceShell &shell, const MbSolid &solid, MbCreator &creator) | |
Constructor by shells, creator and solid which has creators. | |
MbSolid (MbFaceShell &shell, const MbSolid &solid, MbCreator *creator) | |
Constructor by shells, creator and solid which has creators. | |
virtual | ~MbSolid () |
Destructor. | |
MbeSpaceType | IsA () const override |
Get the type of the object. | |
MbSpaceItem & | Duplicate (MbRegDuplicate *iReg=nullptr) const override |
Create a copy of the object. More... | |
void | Transform (const MbMatrix3D &, MbRegTransform *iReg=nullptr) override |
Convert the object according to the matrix. More... | |
void | Move (const MbVector3D &, MbRegTransform *iReg=nullptr) override |
Move an object along a vector. More... | |
void | Rotate (const MbAxis3D &, double angle, MbRegTransform *iReg=nullptr) override |
Rotate an object around an axis at a given angle. More... | |
bool | IsSame (const MbSpaceItem &, double accuracy=LENGTH_EPSILON) const override |
Determine whether an object is equal. More... | |
bool | IsSimilar (const MbSpaceItem &) const override |
Determine whether an object is similar. More... | |
bool | SetEqual (const MbSpaceItem &) override |
Make objects equal if they are similar. More... | |
double | DistanceToPoint (const MbCartPoint3D &) const override |
Determine the distance to the point. More... | |
void | AddYourGabaritTo (MbCube &) const override |
Expand sent bounding box (a.k.a. gabarit), so that it included the object. More... | |
void | Refresh () override |
Translate all the time (mutable) data objects in an inconsistent (initial) state. | |
void | CalculateMesh (const MbStepData &stepData, const MbFormNote ¬e, MbMesh &mesh) const override |
Build polygonal copy mesh. More... | |
MbProperty & | CreateProperty (MbePrompt) const override |
Create your own property with the name. | |
void | GetProperties (MbProperties &) override |
Outstanding properties of the object. More... | |
void | SetProperties (const MbProperties &) override |
Change the properties of an object. More... | |
void | GetBasisItems (RPArray< MbSpaceItem > &) override |
Outstanding reference objects in a container sent. | |
void | GetBasisPoints (MbControlData3D &) const override |
Get control points of object. | |
void | SetBasisPoints (const MbControlData3D &) override |
Change the object by control points. | |
bool | RebuildItem (MbeCopyMode copyMode, RPArray< MbSpaceItem > *items, IProgressIndicator *progInd) override |
Reconstruct object according to the history tree. More... | |
MbItem * | CreateMesh (const MbStepData &stepData, const MbFormNote ¬e, MbRegDuplicate *iReg) const override |
Create polygonal object. More... | |
Functions of solid. | |
virtual void | CalculateGabarit (MbCube &cube) const |
Calculate bounding box. More... | |
const MbCube | GetCube () const |
Get bounding box. More... | |
bool | GetCreators (RPArray< MbCreator > &creators) const override |
Add your own creators to the given array. More... | |
bool | GetCreators (c3d::CreatorsSPtrVector &creators) const override |
Add your own creators to the given array. More... | |
void | CalculateGrid (const MbStepData &stepData, MbMesh &mesh) const |
Create a polygonal copy of the solid and put its data to the given object. More... | |
void | SetShell (MbFaceShell *shell) |
Replace the shell of the solid by the given one. | |
MbFaceShell * | DetachShell () |
Detach the shell. | |
MbFaceShell * | GetShell () const |
Get the shell. | |
bool | IsShellBuild () const |
Is there a shell? | |
void | MakeRight () |
Reinstall pointers to mating faces in edges. | |
bool | IsRight () const |
Are the pointers in edges to the faces connected by them set correctly? | |
size_t | GetFacesCount () const |
Get the count of faces. | |
template<class VerticesVector > | |
void | GetVertices (VerticesVector &vertices) const |
Fill container by solid vertices. | |
template<class EdgesVector > | |
void | GetEdges (EdgesVector &edges) const |
Fill container by oriented edges of the solid. | |
template<class VerticesVector , class EdgesVector > | |
void | GetItems (VerticesVector &vertices, EdgesVector &edges) const |
Fill containers by vertices and edges of the solid. | |
template<class FacesVector > | |
void | GetFaces (FacesVector &faces) const |
Fill container by solid faces. | |
template<class FacesSet > | |
void | GetFacesSet (FacesSet &faces) const |
Fill container by solid faces. | |
template<class TopologyItemsVector > | |
void | GetItems (TopologyItemsVector &items) const |
Fill container by vertices, edges and faces of the solid. | |
MbVertex * | GetVertex (size_t index) const |
Get vertex by its index. | |
MbCurveEdge * | GetEdge (size_t index) const |
Get edge by its index. | |
MbFace * | GetFace (size_t index) const |
Get face by its index. | |
size_t | GetVertexIndex (const MbVertex &) const |
Get the vertex index. | |
size_t | GetEdgeIndex (const MbCurveEdge &) const |
Get the edge index. | |
size_t | GetFaceIndex (const MbFace &) const |
Get the face index. | |
size_t | GetShellCount () const |
Get the count of connected shells of the solid. | |
bool | Reverse () |
Revert the solid - reorientation of the whole set of faces. | |
MbeItemLocation | PointClassification (const MbCartPoint3D &p, double epsilon=Math::metricRegion) const |
Classify point. More... | |
MbeItemLocation | SolidClassification (const MbSolid &solid, double epsilon=Math::metricRegion) const |
Classify solid. More... | |
bool | FindFacesIndexByFaces (RPArray< MbFace > &faces, SArray< size_t > &indices) const |
Find indices of faces. More... | |
bool | FindFacesIndexByEdges (RPArray< MbCurveEdge > &edges, SArray< MbEdgeFacesIndexes > &indices) const |
Find indices of edges and faces connected by them. More... | |
const MbVertex * | FindNearestVertex (const MbCartPoint3D &p) const |
Get the nearest vertex to point. | |
void | FindEdgesForVertex (const MbVertex &vertex, RPArray< MbCurveEdge > &findEdges) const |
Find mating edges of the solid at the vertex. More... | |
void | FindFacesForVertex (const MbVertex &vertex, RPArray< MbFace > &findFaces) const |
Find mating faces of the solid at the vertex. More... | |
bool | FindEdgeNumbers (const MbCurveEdge &edge, size_t &faceN, size_t &loopN, size_t &edgeN) const |
Find a face index for the edge, loop index and edge index in the loop. More... | |
const MbVertex * | FindVertexByName (const MbName &) const |
Find vertex by name. | |
const MbCurveEdge * | FindEdgeByName (const MbName &) const |
Find edge by name. | |
const MbFace * | FindFaceByName (const MbName &) const |
Find face by name. | |
MbVertex * | FindVertexByName (const MbName &) |
Find vertex by name. | |
MbCurveEdge * | FindEdgeByName (const MbName &) |
Find edge by name. | |
MbFace * | FindFaceByName (const MbName &) |
Find face by name. | |
const MbVertex * | FindVertexByHash (const SimpleName h) const |
Find vertex by hash of a name. | |
const MbCurveEdge * | FindEdgeByHash (const SimpleName h) const |
Find edge by hash of a name. | |
const MbFace * | FindFaceByHash (const SimpleName h) const |
Find face by hash of a name. | |
SPtr< MbSNameMaker > | GetYourNameMaker () const |
Create name-maker of solid. | |
void | SetOwnChangedThrough (MbeChangedType) |
Set flag of changes for all the faces, edges and vertices. | |
bool | IsClosed () const |
Is solid closed (it has not boundary)? | |
bool | IsMultiSolid () const |
Is a solid composed of several parts (is a multibody solid)? | |
bool | SetMultiSolidState (bool ms, bool setDirectly=false) const |
Set flag of multibody with minimal checks. More... | |
void | ResetMultiSolidState () const |
Reset flag of multibody solid. | |
MultiState | GetMultiSolidState () const |
Get current state of multibody flag. | |
void | CalculateLocalGabarit (const MbMatrix3D &into, MbCube &cube) const override |
Calculate bounding box relative to the local coordinate system which is given by the matrix 'matrToLocal ' of transformation to it. | |
void | CalculateLocalGabarit (const MbPlacement3D &localPlace, MbCube &cube) const |
Calculate bounding box relative to the local coordinate system. | |
void | BreakToBasisItem (size_t c, RPArray< MbSpaceItem > &s) |
Get the base objects of history tree. | |
void | Math3DSelectSolid () const |
Assign the pointer to global variable Math::selectSolid = this (for debugging). | |
![]() | |
MbItem () | |
Constructor. | |
virtual | ~MbItem () |
Destructor. | |
MbeSpaceType | Type () const override |
Get the group object type. | |
MbeSpaceType | Family () const override |
Get family of objects. | |
MbeImplicationType | ImplicationType () const override |
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 | AddYourMesh (const MbStepData &stepData, const MbFormNote ¬e, MbMesh &mesh) const |
Add polygonal object. More... | |
virtual MbItem * | CutMesh (const MbPlacement3D &cutPlace, double distance, const MbSNameMaker *names=nullptr) 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... | |
virtual bool | GetItems (MbeSpaceType type, const MbMatrix3D &from, std::vector< SPtr< MbItem >> &items, std::vector< MbMatrix3D > &matrs) |
Get all objects by the type. 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 MbItem * | GetItemByPath (const MbPath &path, size_t ind, MbMatrix3D &from, size_t currInd=0) const |
Get the object by its path. More... | |
virtual const MbItem * | FindItem (const MbSpaceItem *s, MbPath &path, MbMatrix3D &from) const |
Find object by geometric object. More... | |
virtual const MbItem * | FindItem (const MbPlaneItem *s, MbPath &path, MbMatrix3D &from) const |
Find object by geometric object. More... | |
virtual const MbItem * | FindItem (const MbItem *s, MbPath &path, MbMatrix3D &from) const |
Find object by object of geometric model. More... | |
virtual const MbItem * | GetItemByName (SimpleName n, MbPath &path, MbMatrix3D &from) const |
Find object by name. More... | |
virtual void | TransformSelected (const MbMatrix3D &matr, MbRegTransform *iReg=nullptr) |
Transform selected object according to the matrix. More... | |
virtual void | MoveSelected (const MbVector3D &to, MbRegTransform *iReg=nullptr) |
Move selected object along a vector. More... | |
virtual void | RotateSelected (const MbAxis3D &axis, double angle, MbRegTransform *iReg=nullptr) |
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? | |
![]() | |
virtual | ~MbSpaceItem () |
Destructor. | |
void | PrepareWrite () const |
Register object. More... | |
MbeRefType | RefType () const override |
Get a registration type (for copying, duplication). | |
bool | IsFamilyRegistrable () const override |
Whether the object belongs to a registrable family. | |
void | CalculateWire (const MbStepData &stepData, MbMesh &mesh) const |
void | CalculateWire (double sag, MbMesh &mesh) const |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
MbTransactions () | |
Constructor without parameters. | |
template<class Creators > | |
MbTransactions (const Creators &creators) | |
Constructor by creators. | |
virtual | ~MbTransactions () |
Destructor. | |
void | CreatorsCopy (MbTransactions &other, MbRegDuplicate *iReg=nullptr) 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 *=nullptr) |
Transform the creators according to the matrix. | |
void | CreatorsMove (const MbVector3D &, MbRegTransform *=nullptr) |
Move creators along the vector. | |
void | CreatorsRotate (const MbAxis3D &, double angle, MbRegTransform *=nullptr) |
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 MbCreator * | GetCreator (size_t ind) const |
Get constructor by its index. | |
MbCreator * | SetCreator (size_t ind) |
Get constructor by its index with possibility of editing. | |
template<class CreatorsVector > | |
bool | GetCreatorsCopies (CreatorsVector &creators, MbRegDuplicate *iReg) 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. | |
template<class CreatorsVector > | |
void | AddCreators (const CreatorsVector &creators) |
Add creators to the history tree. | |
MbCreator * | DetachCreator (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. | |
![]() | |
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, uint rgb=0) |
Set visual properties of the object. | |
bool | GetVisual (float &a, float &d, float &sp, float &sh, float &t, float &e, uint rgb=0) 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. | |
bool | RemoveAttributes (bool onDeleteOwner=false) |
Delete all attributes from container. | |
MbAttribute * | AddAttribute (MbAttribute *attr, bool checkSame=true) |
Add attribute in container. More... | |
MbAttribute * | AddAttribute (const MbAttribute &attr, bool checkSame=true) |
Add attribute in container (adds a copy of the attribute if it can be added). More... | |
void | GetAttributes (c3d::AttrVector &attrs, MbeAttributeType aFamily, MbeAttributeType subType) const |
Get attributes of a given type or family. More... | |
void | GetAttributes (c3d::AttrVector &attrs, MbeAttributeType aType) const |
Get attributes of a given type. More... | |
void | GetCommonAttributes (c3d::AttrVector &, const c3d::string_t &samplePrompt, MbeAttributeType subType=at_Undefined, bool firstFound=false) 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 MbAttribute * | GetSimpleAttribute (MbeAttributeType) const |
Get a simple attribute of a given subtype. | |
MbAttribute * | SetSimpleAttribute (MbeAttributeType) |
Get a simple attribute of a given subtype. | |
MbAttribute * | SetSimpleAttribute (MbAttribute *simpAttr) |
Set a simple attribute of a given subtype. | |
MbAttribute * | SetSimpleAttribute (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. | |
MbAttribute * | DetachSimpleAttribute (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 *=nullptr) |
Perform actions when transforming the attributes. | |
void | AttributesMove (const MbVector3D &, MbRegTransform *=nullptr) |
Perform actions when moving the attributes. | |
void | AttributesRotate (const MbAxis3D &, double angle, MbRegTransform *=nullptr) |
Perform actions when rotating the attributes. | |
void | AttributesCopy (MbAttributeContainer &other, MbRegDuplicate *=nullptr) 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. | |
![]() | |
void | Lock () const |
Switch lock on (locking happens only in parallel region). | |
void | Unlock () const |
Switch lock off if locking has been set. | |
Protected Attributes | |
MbFaceShell * | outer |
Shell of solid. | |
MultiState | multiState |
The solid connection type. | |
Additional Inherited Members | |
![]() | |
static MbUserAttribute * | ReduceUserAttrib (const MbExternalAttribute &) |
Convert user attribute to "system" one. | |
static MbExternalAttribute * | AdvanceUserAttrib (const MbUserAttribute &) |
Convert "system" attribute to user one. | |
![]() | |
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. | |
![]() | |
MbSpaceItem () | |
Default constructor. | |
![]() | |
MbRefItem () | |
Constructor without parameters. | |
![]() | |
MbTransactions (const MbTransactions &, MbRegDuplicate *iReg) | |
Copy-constructor with registrator. | |
![]() | |
MbAttributeContainer (const MbAttributeContainer &, MbRegDuplicate *) | |
Copy-constructor with the registrator. | |
Solid solid.
Solid solid or solid is object of geometric model. Solid consists of face set MbFaceShell.
Data structure of solid contains pointer to face set outer and type of solid connectivity multiState. The solid can describe one or more sets of points. Connection type multiState informs that the solid describes one connected set of points or that the solid describes some connected sets of points and can be split into multiple solids.
Face set of solid outer->faceSet describes one or some homogeneous shells. Depending on the attribute of outer->closed shell closedness the solid can describe two principally different sets of points.
If all the shells of solid are closed, then the solid describes a set of points which are located on
the inside of one external and several internal shells located inside outer shell in combination with points of these shells.
If shells of solid are closed, then the solid describes a set of points belonging to the faces of these shells.
Depending on the closedness of shells the solid is called closed or non-closed. In the special case when all the shells are closed, the solid is closed. In the general case shells of solid can be unclosed, the solid is unclosed.
Closed solid and unclosed solid operate with different sets of points and this difference affects on boolean other operations with solids.
Certain set of actions can be performed with solids. These actions are recorded to history tree of solid, elements of which are creators of shells MbCreator.
Solid can have attributes MbAttribute.
enum MbSolid::MultiState |
The solid connection type.
The solid can consist of one or several connected sets of points.
|
overridevirtual |
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.
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
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.
[in] | matr | - Transformation matrix. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
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.
[in] | to | - Shift vector. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
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.
[in] | axis | - The axis of rotation. |
[in] | angle | - Rotation. |
[in] | iReg | - Registrator. |
Implements MbSpaceItem.
|
overridevirtual |
Determine whether an object is equal.
Still considered objects of the same type, all data is the same (equal).
[in] | item | - The object to compare. |
[in] | accuracy | - The accuracy to compare. |
Implements MbSpaceItem.
|
overridevirtual |
Determine whether an object is similar.
Such are considered the same objects whose data are similar.
[in] | item | - The object to compare. |
Reimplemented from MbSpaceItem.
|
overridevirtual |
Make objects equal if they are similar.
You can still make only a similar objects.
[in] | item | - The object to initialize. |
Implements MbSpaceItem.
|
overridevirtual |
Determine the distance to the point.
Determine the distance to the point.
[in] | point | - Point. |
Implements MbSpaceItem.
Expand sent bounding box (a.k.a. gabarit), so that it included the object.
Expand sent bounding box, so that it included the object.
[in,out] | cube | - The bounding box to expand. |
Implements MbSpaceItem.
|
overridevirtual |
Build polygonal copy mesh.
Build a polygonal copy of the object that is represented by polygons or/and fasets.
[in] | stepData | - Data for еру step calculation for polygonal object. |
[in] | note | - Way for polygonal object constructing. |
[in,out] | mesh | - The builded polygonal object. |
Implements MbSpaceItem.
|
overridevirtual |
Outstanding properties of the object.
Issue internal data (properties) of the object for viewing and modification.
[in] | properties | - Container for the internal data of the object. |
Reimplemented from MbItem.
|
overridevirtual |
Change the properties of an object.
Changing the internal data (properties) of the object you are copying the corresponding values from the sent object.
[in] | properties | - Container for the internal data of the object. |
Reimplemented from MbItem.
|
overridevirtual |
Reconstruct object according to the history tree.
Create object by the history tree.
[in] | sameShell | - Whether to perform complete copying of elements while constructing. |
[out] | items | - Container for the elements of not performed constructions (can be nullptr). |
Reimplemented from MbItem.
|
overridevirtual |
Create polygonal object.
Create a polygonal object - a polygonal copy of the given object.
[in] | stepData | - Data for step calculation during triangulation. |
[in] | note | - Way for polygonal object constructing. |
Implements MbItem.
Calculate bounding box.
Calculate bounding box of solid.
[out] | cube | - Calculated bounding box. |
const MbCube MbSolid::GetCube | ( | ) | const |
Get bounding box.
Get bounding box of solid.
Add your own creators to the given array.
If there are no creators, then creates a creator without history and adds it to the given container and to empty history tree.
[out] | creators | - Container for adding of its creators. |
Reimplemented from MbTransactions.
|
overridevirtual |
Add your own creators to the given array.
If there are no creators, then creates a creator without history and adds it to the given container and to empty history tree.
[out] | creators | - Container for adding of its creators. |
Reimplemented from MbTransactions.
void MbSolid::CalculateGrid | ( | const MbStepData & | stepData, |
MbMesh & | mesh | ||
) | const |
Create a polygonal copy of the solid and put its data to the given object.
Polygonal copy of the solid is created only by triangulating the faces.
[in] | stepData | - Data for step calculation during triangulation. |
[out] | mesh | - Polygonal copy of the object. |
MbeItemLocation MbSolid::PointClassification | ( | const MbCartPoint3D & | p, |
double | epsilon = Math::metricRegion |
||
) | const |
Classify point.
Classification consists in determining the point position relative to the solid.
[in] | p | - Classified point. |
[in] | epsilon | - Classification tolerance. |
MbeItemLocation MbSolid::SolidClassification | ( | const MbSolid & | solid, |
double | epsilon = Math::metricRegion |
||
) | const |
Classify solid.
Classification consists in determining a solid position relative to the this solid.
[in] | solid | - Classified solid. |
[in] | epsilon | - Classification tolerance. |
Find indices of faces.
Find indices of faces and fill the second container in accordance with the first.
[in] | faces | - A set of faces. |
[out] | indices | - Found set of indices of these faces in the solid. |
bool MbSolid::FindFacesIndexByEdges | ( | RPArray< MbCurveEdge > & | edges, |
SArray< MbEdgeFacesIndexes > & | indices | ||
) | const |
Find indices of edges and faces connected by them.
Find indices of edges and fill the second container in accordance with the first.
[in] | edges | - A set of edges. |
[out] | indices | - Found set of combined indices of edges and faces connected by them. |
void MbSolid::FindEdgesForVertex | ( | const MbVertex & | vertex, |
RPArray< MbCurveEdge > & | findEdges | ||
) | const |
Find mating edges of the solid at the vertex.
Find edges of the solid for which this vertex is start or end.
[in] | vertex | - Vertex. |
[out] | findEdges | - Mating edges at the vertex. |
Find mating faces of the solid at the vertex.
Find edges of the solid for which this vertex is end.
[in] | vertex | - Vertex. |
[out] | findFaces | - Mating faces at the vertex. |
bool MbSolid::FindEdgeNumbers | ( | const MbCurveEdge & | edge, |
size_t & | faceN, | ||
size_t & | loopN, | ||
size_t & | edgeN | ||
) | const |
Find a face index for the edge, loop index and edge index in the loop.
Find face index for the edge, loop index and edge index in the loop. If the indices are not found, then indices remain the same.
[in] | edge | - Edge. |
[out] | faceN | - Found face index. |
[out] | loopN | - Found index of face loop. |
[out] | edgeN | - Found index of the edge in the loop. |
bool MbSolid::SetMultiSolidState | ( | bool | ms, |
bool | setDirectly = false |
||
) | const |
Set flag of multibody with minimal checks.
Set flag of multibody with minimal checks. Improper flag setting can lead to unpredictable results after operations with the solid.
[in] | ms | - Assumed that solid is multibody if ms==true. |
[in] | setDirectly | - Set without any checks. |