C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

Shell or set of faces. More...

#include <topology_faceset.h>

+ Inheritance diagram for MbFaceShell:
+ Collaboration diagram for MbFaceShell:

Classes

struct  MbFaceShellAuxiliaryData
 Auxiliary data for a face set. More...
 

Public Member Functions

 MbFaceShell ()
 Constructor without parameters.
 
template<class FacesVector >
 MbFaceShell (const FacesVector &initFaces)
 Constructor by a set of faces.
 
 MbFaceShell (const MbFace &face)
 Constructor by face.
 
 MbFaceShell (const MbFaceShell &init)
 Constructor by faces of other shell.
 
virtual ~MbFaceShell ()
 Destructor.
 
MbeTopologyType IsA () const override
 Functions of shell.
 
MbFaceShellCopy (MbeCopyMode sameShell, MbShellHistory *history=nullptr, MbRegDuplicate *iReg=nullptr)
 Create a copy. More...
 
MbFaceShellDuplicate (MbRegDuplicate *iReg=nullptr) const
 Create a copy. More...
 
bool IsClosed () const
 Is shell closed?
 
void SetClosed (bool c)
 Set shell (un-) closedness.
 
size_t GetFacesCount () const
 Get the number of faces.
 
ptrdiff_t GetFacesMaxIndex () const
 Get the maximum index of a face.
 
void AddFace (const MbFace &)
 Add a face into a shell.
 
template<class FacesVector >
void AddFaces (const FacesVector &newFaces, bool justAdd)
 Add faces into a shell.
 
void InsertFace (size_t index, const MbFace &)
 Insert a face before the face with the given index.
 
bool ChangeFace (size_t index, const MbFace &)
 Replace a face with the given index.
 
bool DeleteFace (size_t index)
 Delete a face at the given index.
 
bool DeleteFace (const MbFace *)
 Delete a face.
 
MbFaceDetachFace (size_t index)
 Detach a face from a shell with the given index.
 
void DetachFace (const MbFace *)
 Detach face.
 
void DeleteFaces ()
 Delete all faces of shell.
 
void DetachFaces ()
 Detach all faces from shell.
 
template<class FacesVector >
void DetachFaces (FacesVector &detachFaces)
 Detach all faces from shell.
 
bool ExchangeFaces (size_t i1, size_t i2)
 Swap shell faces.
 
void MakeRight (bool setBounds=false)
 Set the correct (the current) information in edges about the connected by them faces and parameters of surfaces by loops of faces (setBounds = true).
 
bool IsRight () const
 Are the pointers in edges to the connected by them faces correctly set?
 
void SetNullToFace (const MbFace *delFace)
 Set to null in edges the pointers to a face which is absent face.
 
void Transform (const MbMatrix3D &matr, MbRegTransform *iReg=nullptr)
 Transform according to the matrix. More...
 
void Move (const MbVector3D &to, MbRegTransform *iReg=nullptr)
 Move along a vector. More...
 
void Rotate (const MbAxis3D &axis, double angle, MbRegTransform *iReg=nullptr)
 Rotate around an axis. More...
 
double DistanceToPoint (const MbCartPoint3D &to) const
 Calculate the distance to a point.
 
void Reverse ()
 Revert the shell - reorientation of the whole set of faces.
 
bool IsSame (const MbFaceShell &faces, double accuracy) const
 Determine whether objects are equal.
 
bool IsSameFaces (const MbFaceShell &faces, double accuracy) const
 Whether shells contains identical faces.
 
void SetLabelThrough (MbeLabelState, void *=nullptr) const
 Set labels for all objects which have them.
 
void SetLabelThrough (MbeLabelState, void *, bool) const
 Set labels for all objects which have them.
 
void RemovePrivateLabelThrough (void *) const
 Remove private labels for all objects which have them.
 
void SetOwnChangedThrough (MbeChangedType n)
 Set flags that objects have been changed.
 
void ResetFlags (void *=nullptr)
 Set flags to initial state.
 
bool UnionWith (MbFaceShell &faces, c3d::FacesSet *sharedSet=nullptr)
 Move a set of faces to the shell from another shell.

 
size_t SetVerticesLabel (MbeLabelState, void *=nullptr) const
 Set the given label for all vertices of the shell.
 
size_t SetEdgesLabel (MbeLabelState, void *=nullptr) const
 Set the given label for all edges of the shell.
 
void SetFacesLabel (MbeLabelState, void *=nullptr) const
 Set the given label for all faces of the shell.
 
template<class VerticesVector >
void GetVertices (VerticesVector &) const
 Get a set of vertices of the shell.
 
template<class EdgesSet >
void GetEdgesSet (EdgesSet &edges) const
 Get a set of edges of the shell.
 
template<class EdgesVector , class EdgesSet >
void GetEdges (EdgesVector &edges, EdgesSet &edgesCache) const
 Get a set of unique edges of the shell.
 
template<class EdgesVector >
void GetEdges (EdgesVector &edges) const
 Get a set of edges of the shell.
 
template<class FacesVector >
void GetFaces (FacesVector &faces) const
 Get a set of faces of the shell.
 
template<class FacesSet >
void GetFacesSet (FacesSet &faces) const
 Get a set of faces of the shell.
 
template<class VerticesVector , class EdgesVector >
void GetItems (VerticesVector &vertices, EdgesVector &edges) const
 Get a set of vertices and a set of edges of the shell.
 
template<class TopologyItemsVector >
void GetItems (TopologyItemsVector &) const
 Get a set of vertices, a set of edges and a set of faces of the shell.
 
MbVertexGetVertex (size_t index) const
 Get a vertex by an index.
 
MbCurveEdgeGetEdge (size_t index) const
 Get an edge by an index.
 
MbFaceGetFace (size_t index) const
 Get a face by an index.
 
MbFace_GetFace (size_t index) const
 Get a face by an index without a check of index correctness.
 
const MbSurfaceGetSurface (size_t index) const
 Give a surface of a face by an index.
 
size_t GetVertexIndex (const MbVertex &vertex) const
 Get an index of a vertex.
 
size_t GetEdgeIndex (const MbCurveEdge &edge) const
 Get an index of an edge.
 
size_t GetFaceIndex (const MbFace &face) const
 Get an index of a face.
 
size_t Find (const MbFace *face) const
 Find an index of a face in the shell.
 
size_t GetShellCount () const
 Define the number of connected faces describing by the shell.
 
bool DistanceToShell (const MbFaceShell &shell, double lowerLimitDistance, bool tillFirstLowerLimit, double epsilon, std::vector< MbShellsDistanceData > &shellsDistanceData) const
 Calculate the nearest distance to a shell. More...
 
bool DistanceToBound (const MbCartPoint3D &pnt, double accuracy, MbPntLoc &finFaceData, MbeItemLocation &rShell) const
 Define the distance from a point to the shell. More...
 
bool PointClassification (const MbCartPoint3D &pnt, double accuracy, MbCartPoint3D &shellPoint, MbVector3D &shellNormal, MbeItemLocation &rShell) const
 Define the point location relative to the shell. More...
 
bool PointClassification (const MbCartPoint3D &pnt, double accuracy, MbCartPoint3D &shellPoint, MbVector3D &shellNormal, MbPntLoc &rShell) const
 Define the point location relative to the shell. More...
 
void PointOn (size_t n, double &u, double &v, MbCartPoint3D &p) const
 Calculate a point of the shell. More...
 
void Normal (size_t n, double &u, double &v, MbVector3D &p) const
 Calculate a normal of the shell. More...
 
void NearPointProjection (const MbCartPoint3D &p, SArray< size_t > &nums, SArray< MbCartPoint > &uv) const
 Find the point projection to the shell. More...
 
bool NearPointProjection (const MbCartPoint3D &p, size_t &faceIndex, double &u, double &v) const
 Find nearest point projection to the shell. More...
 
void DirectPointProjection (const MbCartPoint3D &p, const MbVector3D &vect, SArray< size_t > &nums, SArray< MbCartPoint > &uv) const
 Find the point projection to the shell along a vector in either of two directions. More...
 
bool NearDirectPointProjection (const MbCartPoint3D &p, size_t &faceIndex, const MbVector3D &vect, double &u, double &v, bool onlyPositiveDirection=false) const
 Find nearest point projection to the shell in the direction of the vector. More...
 
bool DirectPointProjection (const MbCartPoint3D &p, const MbVector3D &vect) const
 Does the projection in direction of the vector exist? More...
 
void CurveIntersection (const MbCurve3D &curve, SArray< size_t > &nn, SArray< MbCartPoint > &uv, SArray< double > &tt) const
 Intersection between a shell and a curve. More...
 
void AddYourGabaritTo (MbCube &gab, c3d::IndexCubeVector *extTolCubes=nullptr) const
 Add your own bounding box into bounding cube. More...
 
void CalculateGabarit (MbCube &) const
 Calculate bounding box of the shell.
 
void CalculateLocalGabarit (const MbMatrix3D &matrToLocal, MbCube &cube) const
 Calculate bounding box in 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 in the local coordinate system 'localPlace'.
 
void CalculateMesh (const MbStepData &stepData, const MbFormNote &note, MbMesh &mesh) const
 Construct a polygonal copy of the shell. More...
 
void GetProperties (MbProperties &)
 Get properties of the object.
 
void SetProperties (const MbProperties &)
 Set properties of the object.
 
void SetItemsMainName (const MbSNameMaker &newNameMaker, bool addOldMainName)
 Set the main name and insert an old name to the copy index. More...
 
void SetNamesCopyIndex (SimpleName index)
 Insert copying index. More...
 
void SetNamesCopyIndex (SimpleName index, const MbSNameMaker &newNameMaker)
 Replace main name by new one, insert old main name and given copy index into name copy indices. More...
 
void MakeItemsNewNames (const MbSNameMaker &, SimpleName modifier)
 Set the main name and modify names of faces, edges and vertices for the shell-copy in order to prevent coincidence of several copies names.
 
void MakeFacesNewNames (const MbSNameMaker &, SimpleName modifier)
 Set the main name and modify names of faces for the shell-copy in order to prevent coincidence of several copies names.
 
void SetShellNames (const MbSNameMaker &)
 Rename faces, edges and vertices of the shell.
 
void SetShellNames (const MbFaceShell &)
 Name shell elements by names of the shell 's'.
 
void ClearShellNames ()
 Clear all shell names. More...
 
void ClearEdgesNames (bool clearVerticesNames=true)
 Clear all shell edges names. More...
 
MbResultType CheckTopology (MbCheckTopologyParams &checkParams)
 Validation of the shell: vertices (deletion of coincident and extra), edges (with merge). More...
 
void CheckClosed (bool checkChangedOnly=false)
 Check shell closedness with flag modification.
 
bool MakeBoundaryCurve ()
 Find the boundary edges, make their curve boundary.
 
template<class ConstEdgesVector >
bool GetBoundaryEdges (ConstEdgesVector &) const
 Get boundary edges of the shell.
 
template<class CurvesArray , class IndexesArray >
bool FindFacesIndexByEdges (const CurvesArray &init, IndexesArray &indexes, bool any=false) const
 For a set of edges find their indices and indices of their faces.
 
bool FindFacesIndexByEdges (const RPArray< MbCurveEdge > &init, SArray< MbEdgeFacesIndexes > &indexes, bool any=false) const
 For a set of edges find their indices and indices of their faces.
 
bool FindFacesIndexByEdges (const SArray< MbEdgeFunction > &init, RPArray< MbFunction > &functions, RPArray< MbCurve3D > &slideways, SArray< MbEdgeFacesIndexes > &indexes) const
 For a set of structures (edges, functions of radii changing, and suppoirt curves for fillets) find indices of edges and their faces. More...
 
template<class EdgeFuncsArray , class FuncsArray , class CurvesArray , class IndexesArray >
bool FindFacesIndexByEdges (const EdgeFuncsArray &init, FuncsArray &functions, CurvesArray &slideways, IndexesArray &indexes) const
 For a set of structures (edges, functions of radii changing, and suppoirt curves for fillets) find indices of edges and their faces.
 
bool FindEdgesByFacesIndex (const SArray< MbEdgeFacesIndexes > &indexes, const RPArray< MbFunction > *functions, const RPArray< MbCurve3D > *slideways, RPArray< MbCurveEdge > &eEdges, RPArray< MbFunction > &eFunctions, RPArray< MbCurve3D > &eSlideways) const
 Для множества номеров ребер и номеров смежных граней найти ребра. For a set of edge indices and indices of their faces find edges. More...
 
bool FindFacesIndexByEdge (const MbCurveEdge &edge, size_t &ind1, size_t &ind2, bool any=false) const
 Find faces indices by the edge.
 
bool FindFacesIndexByFaces (const RPArray< MbFace > &init, SArray< size_t > &ind0) const
 For a set of faces find a set of their indices.
 
template<class FacesPointersVector , class ItemIndices >
bool FindIndexByFaces (const FacesPointersVector &, ItemIndices &, size_t mapThreshold=50) const
 For a set of faces find a set of their combined indices.
 
template<class FacesPointersVector , class ItemIndices >
bool FindIndexBySameFaces (const FacesPointersVector &, ItemIndices &, double accuracy=LENGTH_EPSILON) const
 For a set of faces find a set of their combined indices.
 
template<class ItemIndices , class ConstFacesPointersVector >
bool FindConstFacesByIndex (const ItemIndices &, ConstFacesPointersVector &) const
 Find a set of faces by a set of combined indices.
 
template<class ConstVertexPointers , class ItemIndices >
bool FindIndexByVertices (const ConstVertexPointers &init, ItemIndices &indexes) const
 For a set of vertices find a set of their combined indices.
 
bool FindVerticesByIndex (const SArray< MbItemIndex > &indexes, RPArray< MbVertex > &init) const
 Find a set of vertices by a set of combined indices.
 
bool FindIndexByFace (const MbFace &, MbItemIndex &) const
 Find combined index of a face.
 
const MbFaceFindFaceByIndex (MbItemIndex &) const
 Find a face by combined index.
 
MbFaceFindFaceByIndex (MbItemIndex &)
 Find a face by combined index.
 
const MbCurveEdgeFindEdgeByIndex (MbItemIndex &) const
 Find an edge by combined index.
 
MbCurveEdgeFindEdgeByIndex (MbItemIndex &)
 Find an edge by combined index.
 
bool FindEdgesByIndex (const std::vector< MbItemIndex > &indexes, std::vector< MbCurveEdge * > &initCurves) const
 Find edges by the indices.
 
void FindEdgesForVertex (const MbVertex &vertex, RPArray< MbCurveEdge > &findEdges) const
 Find a set of edges with the common given vertex.
 
void FindFacesForVertex (const MbVertex &vertex, RPArray< MbFace > &findFaces) const
 Find a set of faces with the common given vertex.
 
bool FindEdgeNumbers (const MbCurveEdge &edge, size_t &faceN, size_t &loopN, size_t &edgeN) const
 For the edge 'edge' find an index of face, an index of loop and an index of edge in this loop.
 
const MbVertexFindVertexByName (const MbName &) const
 Find vertex by name.
 
const MbCurveEdgeFindEdgeByName (const MbName &) const
 Find edge by name.
 
const MbFaceFindFaceByName (const MbName &) const
 Find face by name.
 
MbVertexFindVertexByName (const MbName &)
 Find vertex by name.
 
MbCurveEdgeFindEdgeByName (const MbName &)
 Find edge by name.
 
MbFaceFindFaceByName (const MbName &)
 Find face by name.
 
const MbVertexFindVertexByHash (const SimpleName h) const
 Find vertex by hash of a name.
 
const MbCurveEdgeFindEdgeByHash (const SimpleName h) const
 Find edge by hash of a name.
 
const MbFaceFindFaceByHash (const SimpleName h) const
 Find face by hash of a name.
 
bool MergeSimilarFaces (SimpleName simMainName=c3d::SIMPLENAME_MAX)
 Merge similar faces. More...
 
bool IsTemporal () const
 Is a temporary object for the maintenance created?
 
void RemoveTemporal (bool removeFacesTemporal=false) const
 Delete a temporary maintenance object.
 
const MbFaceSetTemp * CreateTemporal (bool keepExisting) const
 Create new temporary maintenance object.
 
bool UpdateTemporal (bool changedOnly=false) const
 Update a temporary maintenance object of a face. changedOnly = true can only be used intact shell (after cutting edges).
 
bool IsTemporal (size_t k) const
 Is a temporary object for the maintenance of a face created?
 
bool CreateTemporal (size_t k, bool keepExisting) const
 Get a temporary maintenance object of a face.
 
void RemoveParentNamesAttributes ()
 Delete attributes of name type with parent names.
 
- Public Member Functions inherited from MbTopItem
MbeRefType RefType () const override
 Registration type (for copying, duplication).
 
void PrepareWrite () const
 Prepare an object for writing.
 
bool IsAVertex () const
 Is it a vertex?
 
bool IsAWireEdge () const
 Is it an edge of wireframe?
 
bool IsAnEdge () const
 Is it an edge?
 
bool IsAFace () const
 Is it a face?
 
bool IsAShell () const
 Is it a shell?
 
bool IsAProxy () const
 Is it a proxy?
 
- Public Member Functions inherited from MbRefItem
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 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.
 
virtual bool IsFamilyRegistrable () const
 Whether the object belongs to a registrable family.
 
- 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.
 

Protected Attributes

RPArray< MbFacefaceSet
 A set of faces.
 
bool closed
 An attribute of closedness indicates the absence of boundary.
 
CacheManager< MbFaceShellAuxiliaryData > * cache
 Auxiliary data for the face set.
 

Additional Inherited Members

- Protected Member Functions inherited from MbTopItem
 MbTopItem ()
 Constructor.
 
- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 

Detailed Description

Shell or set of faces.

A shell is a composite surface formed by finite set of faces MbFace, connected together by edges MbCurveEdge.
In general case a shell may be multiply connected, i.e. it may describe several pairwise not connected surfaces.
A shell is called closed if it has not a boundary, otherwise a shell is called unclosed.
The closedness of a shell indicates the possibility of using of a set of its internal points in operations with solids MbSolid. Formally, a set of faces is not restricted by any conditions, but actually faces of the set satisfy certain conditions. In order to highlight this feature of a shell, the concept "manifold shell" is introduced. Shells which satisfy the below requirements are called manifold.

  1. Shells are finite.
  2. Shells do not intersect themselves.
  3. Shells are two-sided (oriented).
  4. At each edge of a shell not more than two faces are connected. Two faces of shell connected in such way, that the external side of one face turns to the external side of another face.
  5. With any go-round of any vertex of closed shell on its surface, one will visit all faces connected with this vertex of a face and intersect all outgoing edges.
    Since the external side of a face turns to the external side of adjacent face, a manifold shell also has the external and internal sides. A closed manifold shell divides the three-dimensional space into two parts, one of which is located inside the shell. Let closed manifold shell be called external shell, if its external side is directed out from a part of space bounding by the shell.
    Let closed manifold shell be called an internal shell, if its external side is directed inside a part of space bounding by the shell.

Member Function Documentation

◆ Copy()

MbFaceShell* MbFaceShell::Copy ( MbeCopyMode  sameShell,
MbShellHistory history = nullptr,
MbRegDuplicate iReg = nullptr 
)

Create a copy.

Create a copy of a shell with copying of a part of data and moving another part of data from the original to the copy.
The parameter 'history' is used if the copying mode is cm_KeepHistory.

Parameters
[in]sameShell- A way of data transferring when copying of a shell MbeCopyMode:
sameShell == cm_Same - an initial shell is returned as the copy (a shell is not copied but the pointers of edges to the faces are correctly set);
sameShell == cm_KeepHistory - a part of data is copied (the initial shell and its copy have the common basis surfaces and vertices) and the sets of faces of the object 'history' are filled;
sameShell == cm_KeepSurface - a part of data is copied (the initial shell and its copy have the common basis surfaces);
sameShell == cm_Copy - an ordinary copying (the initial shell and its copy have no the common data).
[in]history- A history of faces copies is used after the operation for the replacement of unchanged copies by their originals.
[in]iReg- Copy registrator.
Returns
Copy of an object or original (in a case of the mode cm_Same).

◆ Duplicate()

MbFaceShell* MbFaceShell::Duplicate ( MbRegDuplicate iReg = nullptr) const

Create a copy.

Create a copy of a shell with registrator.

Returns
Copy of the object.

◆ Transform()

void MbFaceShell::Transform ( const MbMatrix3D matr,
MbRegTransform iReg = nullptr 
)

Transform according to the matrix.

The transformation of a shell according to a matrix. In a shell the same geometric objects, for example, surfaces, are used in both faces and in edges. For the transformation of each geometric object only once a registrator is used.

Parameters
[in]matr- A transformation matrix.
[in]iReg- Registrator of objects:

◆ Move()

void MbFaceShell::Move ( const MbVector3D to,
MbRegTransform iReg = nullptr 
)

Move along a vector.

Move of a shell along a vector. In a shell the same geometric objects, for example, faces, are used in both faces and in edges. For the transformation of each geometric object only once a registrator is used.

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

◆ Rotate()

void MbFaceShell::Rotate ( const MbAxis3D axis,
double  angle,
MbRegTransform iReg = nullptr 
)

Rotate around an axis.

The rotation of a shell around an axis. In a shell the same geometric objects, for example, faces, are used in both faces and in edges. For the transformation of each geometric object only once a registrator is used.

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

◆ DistanceToShell()

bool MbFaceShell::DistanceToShell ( const MbFaceShell shell,
double  lowerLimitDistance,
bool  tillFirstLowerLimit,
double  epsilon,
std::vector< MbShellsDistanceData > &  shellsDistanceData 
) const

Calculate the nearest distance to a shell.

Calculate the nearest distance to a shell with a specified tolerance with the same coordinate system. In case of intersection or tangent of the shells returns to zero distance.

Note
When multiply use shell, you should create objects for maintenance this shell and its faces.
Parameters
[in]shell- Shell.
[in]lowerLimitDistance- Minimum allowed distance.
[in]tillFirstLowerLimit- Stop the search after the first found distance is less or equal than to the minimum allowable.
[in]epsilon- Accuracy of distanse between shell face surfaces.
[out]shellsDistanceData- The data of nearest distance beetwen shells.
Returns
Whether the minimum distance between shells was successfully defined.

◆ DistanceToBound()

bool MbFaceShell::DistanceToBound ( const MbCartPoint3D pnt,
double  accuracy,
MbPntLoc finFaceData,
MbeItemLocation rShell 
) const

Define the distance from a point to the shell.

Define the distance from a point to the shell and location of a point: outside the shell, on the shell, inside the shell.

Parameters
[in]pnt- Point.
[in]accuracy- A given tolerance for the location definition.
[out]finFaceData- An information about surroundings of the point 'pnt' projection to the nearest face of the shell.
[out]rShell- The result of definition: outside the shell (-1), on the shell (0), inside the shell (+1).
Returns
Whether the distance from a point to the shell was successfully defined..

◆ PointClassification() [1/2]

bool MbFaceShell::PointClassification ( const MbCartPoint3D pnt,
double  accuracy,
MbCartPoint3D shellPoint,
MbVector3D shellNormal,
MbeItemLocation rShell 
) const

Define the point location relative to the shell.

Define the point location relative to the shell: outside the shell, on the shell, inside the shell.

Parameters
[in]pnt- Point.
[in]accuracy- A given tolerance for the location definition.
[out]shellPoint- A point on the shell which is the nearest to the point 'pnt'.
[out]shellNormal- A normal to the nearest to the 'pnt' point on the shell.
[out]rShell- The result of definition: outside the shell (-1), on the shell (0), inside the shell (+1).
Returns
Whether the point location relative to the shell was successfully defined.

◆ PointClassification() [2/2]

bool MbFaceShell::PointClassification ( const MbCartPoint3D pnt,
double  accuracy,
MbCartPoint3D shellPoint,
MbVector3D shellNormal,
MbPntLoc rShell 
) const

Define the point location relative to the shell.

Define the point location relative to the shell: outside the shell, on the shell, inside the shell.

Parameters
[in]pnt- Point.
[in]accuracy- A given tolerance for the location definition.
[out]shellPoint- A point on the shell which is the nearest to the point 'pnt'.
[out]shellNormal- A normal to the nearest to the 'pnt' point on the shell.
[out]rShell- The point location relative to the shell.
Returns
Whether the point location relative to the shell was successfully defined.

◆ PointOn()

void MbFaceShell::PointOn ( size_t  n,
double &  u,
double &  v,
MbCartPoint3D p 
) const

Calculate a point of the shell.

Calculate a point for the given face by the given parameters of its surface.

Parameters
[in]n- An index of a face of the shell.
[in]u- The first parameter of the face surface.
[in]v- The second parameter of the face surface.
[out]p- Calculated point of the shell.

◆ Normal()

void MbFaceShell::Normal ( size_t  n,
double &  u,
double &  v,
MbVector3D p 
) const

Calculate a normal of the shell.

Calculate a normal of the shell for the given face by the given parameters of its surface.

Parameters
[in]n- An index of a face of the shell.
[in]u- The first parameter of the face surface.
[in]v- The second parameter of the face surface.
[out]p- Calculated normal of the shell.

◆ NearPointProjection() [1/2]

void MbFaceShell::NearPointProjection ( const MbCartPoint3D p,
SArray< size_t > &  nums,
SArray< MbCartPoint > &  uv 
) const

Find the point projection to the shell.

Find all point projections to all faces of the shell.

Parameters
[in]p- A point to project.
[out]nums- An array of faces numbers in the shell, synchronized with the array of projections parameters
[out]uv- An array of projections parameters.

◆ NearPointProjection() [2/2]

bool MbFaceShell::NearPointProjection ( const MbCartPoint3D p,
size_t &  faceIndex,
double &  u,
double &  v 
) const

Find nearest point projection to the shell.

Find face index and surface parameters for the nearest point projection to the shell.

Parameters
[in]p- A point to project.
[out]faceIndex- The index of nearest face of the shell.
[out]u- The first parameter of the face surface for the nearest projection.
[out]v- The second parameter of the face surface for the nearest projection.
Returns
Whether the point projection was successfully defined.

◆ DirectPointProjection() [1/2]

void MbFaceShell::DirectPointProjection ( const MbCartPoint3D p,
const MbVector3D vect,
SArray< size_t > &  nums,
SArray< MbCartPoint > &  uv 
) const

Find the point projection to the shell along a vector in either of two directions.

Find all point projections to all faces of the shell along a vector in either of two directions.

Parameters
[in]p- A point to project.
[in]vect- The vector of direction.
[out]nums- An array of faces numbers in the shell, synchronized with the array of projections parameters
[out]uv- An array of projections parameters.

◆ NearDirectPointProjection()

bool MbFaceShell::NearDirectPointProjection ( const MbCartPoint3D p,
size_t &  faceIndex,
const MbVector3D vect,
double &  u,
double &  v,
bool  onlyPositiveDirection = false 
) const

Find nearest point projection to the shell in the direction of the vector.

Find face index and surface parameters for the nearest point projection to the shell in the direction of the vector.

Parameters
[in]p- A point to project.
[out]faceIndex- The index of nearest face of the shell.
[in]vect- The vector of direction.
[out]u- The first parameter of the face surface for the nearest projection in the direction of the vector.
[out]v- The second parameter of the face surface for the nearest projection in the direction of the vector.
[in]onlyPositiveDirection- Find in the positive direction of vector vect from point p
Returns
Whether the point projection was successfully defined.

◆ DirectPointProjection() [2/2]

bool MbFaceShell::DirectPointProjection ( const MbCartPoint3D p,
const MbVector3D vect 
) const

Does the projection in direction of the vector exist?

Define whether at least one projection of a point to the shell in direction of the vector exists.

Parameters
[in]p- A point to project.
[in]vect- A vector which defines the direction of projection.
Returns
True if at least one projection is found.

◆ CurveIntersection()

void MbFaceShell::CurveIntersection ( const MbCurve3D curve,
SArray< size_t > &  nn,
SArray< MbCartPoint > &  uv,
SArray< double > &  tt 
) const

Intersection between a shell and a curve.

Find intersections between a curve and faces of a shell.

Parameters
[in]curve- Curve.
[out]nn- Indices of shell faces that have intersections with the curve.
[out]uv- Parametric points of intersections on faces' surfaces.
[out]tt- Intersection parameters on the curve.

◆ AddYourGabaritTo()

void MbFaceShell::AddYourGabaritTo ( MbCube gab,
c3d::IndexCubeVector extTolCubes = nullptr 
) const

Add your own bounding box into bounding cube.

Add your own bounding box into bounding cube.

Parameters
[out]gab- Bounding box for adding a bounding box of the shell.
[out]extTolCubes- Container of extended bounding boxes of shell faces that contain inexact edges.

◆ CalculateMesh()

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

Construct a polygonal copy of the shell.

Construct a polygonal copy of a shell and fill a polygonal object (a mesh) by it.

Note
In multithreaded mode m_Items runs in parallel.
Parameters
[in]stepData- Data for step calculation during triangulation.
[in]note- Way for polygonal object constructing.
[out]mesh- A polygonal object that being filled.

◆ SetItemsMainName()

void MbFaceShell::SetItemsMainName ( const MbSNameMaker newNameMaker,
bool  addOldMainName 
)

Set the main name and insert an old name to the copy index.

Set the main name of topology items and insert an old name to the copy index. Objects with empty names are skipped.

Parameters
[in]newNameMaker- Name maker with a new main name.
[in]addOldMainName- Insert an old name to the copy index.

◆ SetNamesCopyIndex() [1/2]

void MbFaceShell::SetNamesCopyIndex ( SimpleName  index)

Insert copying index.

Insert copying index.

Parameters
[in]index- Copying index.

◆ SetNamesCopyIndex() [2/2]

void MbFaceShell::SetNamesCopyIndex ( SimpleName  index,
const MbSNameMaker newNameMaker 
)

Replace main name by new one, insert old main name and given copy index into name copy indices.

Replace main name by new one, insert old main name and given copy index into name copy indices. Objects with empty names are skipped.

Parameters
[in]index- Copying index.
[in]newMainName- A name maker with a new main name.

◆ ClearShellNames()

void MbFaceShell::ClearShellNames ( )

Clear all shell names.

Clear the names of all shell elements: faces, edges, and vertices.

◆ ClearEdgesNames()

void MbFaceShell::ClearEdgesNames ( bool  clearVerticesNames = true)

Clear all shell edges names.

Clear all shell edges (and vertices) names.

Parameters
[in]clearVerticesNames- Clean up also names of vertices.

◆ CheckTopology()

MbResultType MbFaceShell::CheckTopology ( MbCheckTopologyParams checkParams)

Validation of the shell: vertices (deletion of coincident and extra), edges (with merge).

Validation of the shell: vertices (deletion of coincident and extra), edges (with merge).

Parameters
[in]checkParams- Function parameters.

◆ FindFacesIndexByEdges()

bool MbFaceShell::FindFacesIndexByEdges ( const SArray< MbEdgeFunction > &  init,
RPArray< MbFunction > &  functions,
RPArray< MbCurve3D > &  slideways,
SArray< MbEdgeFacesIndexes > &  indexes 
) const

For a set of structures (edges, functions of radii changing, and suppoirt curves for fillets) find indices of edges and their faces.

Validation of the shell: vertices (deletion of coincident and extra), edges (with merge).

Parameters
[in]init- Structures with edges, radius change functions and support curves of fillets.
[out]functions- The radius change functions.
[out]slideways- The support curves of fillets.
[out]indexes- The edges and fsces indeces.

◆ FindEdgesByFacesIndex()

bool MbFaceShell::FindEdgesByFacesIndex ( const SArray< MbEdgeFacesIndexes > &  indexes,
const RPArray< MbFunction > *  functions,
const RPArray< MbCurve3D > *  slideways,
RPArray< MbCurveEdge > &  eEdges,
RPArray< MbFunction > &  eFunctions,
RPArray< MbCurve3D > &  eSlideways 
) const

Для множества номеров ребер и номеров смежных граней найти ребра. For a set of edge indices and indices of their faces find edges.

Parameters
[in]indexes- The edges and fsces indeces.
[in]functions- The radius change functions (may be nullptr).
[in]slideways- The support curves of fillets (may be nullptr).
[out]eEdges- Edges.
[out]eFunctions- The radius change functions from functions, if functions != nullptr.
[out]eSlideways- The support curves of fillets from slideways, if slideways != nullptr.

◆ MergeSimilarFaces()

bool MbFaceShell::MergeSimilarFaces ( SimpleName  simMainName = c3d::SIMPLENAME_MAX)

Merge similar faces.

Merge similar faces.

Parameters
[in]simMainName- The new primary name for the merged faces (if it is not equal to c3d::SIMPLENAME_MAX).

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