C3D Toolkit
Kernel - 117958, Vision - 2.7.6.12
|
Shell or set of faces. More...
#include <topology_faceset.h>
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. | |
MbFaceShell * | Copy (MbeCopyMode sameShell, MbShellHistory *history=nullptr, MbRegDuplicate *iReg=nullptr) |
Create a copy. More... | |
MbFaceShell * | Duplicate (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. | |
MbFace * | DetachFace (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. | |
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. | |
MbVertex * | GetVertex (size_t index) const |
Get a vertex by an index. | |
MbCurveEdge * | GetEdge (size_t index) const |
Get an edge by an index. | |
MbFace * | GetFace (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 MbSurface * | GetSurface (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 ¬e, 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 MbFace * | FindFaceByIndex (MbItemIndex &) const |
Find a face by combined index. | |
MbFace * | FindFaceByIndex (MbItemIndex &) |
Find a face by combined index. | |
const MbCurveEdge * | FindEdgeByIndex (MbItemIndex &) const |
Find an edge by combined index. | |
MbCurveEdge * | FindEdgeByIndex (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 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. | |
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. | |
![]() | |
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? | |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
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< MbFace > | faceSet |
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 | |
![]() | |
MbTopItem () | |
Constructor. | |
![]() | |
MbRefItem () | |
Constructor without parameters. | |
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.
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.
[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. |
MbFaceShell* MbFaceShell::Duplicate | ( | MbRegDuplicate * | iReg = nullptr | ) | const |
Create a copy.
Create a copy of a shell with registrator.
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.
[in] | matr | - A transformation matrix. |
[in] | iReg | - Registrator of objects: |
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.
[in] | to | - Translation vector. |
[in] | iReg | - Registrator. |
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.
[in] | axis | - The rotation axis. |
[in] | angle | - The rotation angle. |
[in] | iReg | - Registrator. |
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.
[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. |
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.
[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). |
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.
[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). |
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.
[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. |
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.
[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. |
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.
[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. |
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.
[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. |
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.
[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. |
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.
[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. |
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.
[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 |
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.
[in] | p | - A point to project. |
[in] | vect | - A vector which defines the direction of projection. |
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.
[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. |
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.
[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. |
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.
[in] | stepData | - Data for step calculation during triangulation. |
[in] | note | - Way for polygonal object constructing. |
[out] | mesh | - A polygonal object that being filled. |
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.
[in] | newNameMaker | - Name maker with a new main name. |
[in] | addOldMainName | - Insert an old name to the copy index. |
void MbFaceShell::SetNamesCopyIndex | ( | SimpleName | index | ) |
Insert copying index.
Insert copying index.
[in] | index | - Copying index. |
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.
[in] | index | - Copying index. |
[in] | newMainName | - A name maker with a new main name. |
void MbFaceShell::ClearShellNames | ( | ) |
Clear all shell names.
Clear the names of all shell elements: faces, edges, and vertices.
void MbFaceShell::ClearEdgesNames | ( | bool | clearVerticesNames = true | ) |
Clear all shell edges names.
Clear all shell edges (and vertices) names.
[in] | clearVerticesNames | - Clean up also names of vertices. |
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).
[in] | checkParams | - Function parameters. |
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).
[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. |
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.
[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. |
bool MbFaceShell::MergeSimilarFaces | ( | SimpleName | simMainName = c3d::SIMPLENAME_MAX | ) |
Merge similar faces.
Merge similar faces.
[in] | simMainName | - The new primary name for the merged faces (if it is not equal to c3d::SIMPLENAME_MAX). |