C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
+ Collaboration diagram for Topological Objects:

Classes

class  MbVertex
 Vertex. More...
 
class  MbEdge
 Edge. More...
 
class  MbCurveEdge
 Face edge. More...
 
class  MbOrientedEdge
 Oriented edge. More...
 
class  MbLoop
 Face loop. More...
 
struct  LoopCrossParam
 Parameter of loops self-intersection. More...
 
class  MbFace
 Face. More...
 
class  MbFaceShell
 Shell or set of faces. More...
 
class  MbLabel
 A label for performing of operations. More...
 
class  MbTopItem
 Topological object in three-dimensional space. More...
 
class  MbTopologyItem
 Topological object with name. More...
 
class  MbTopologyProxy
 Topology object proxy. More...
 

Enumerations

enum  MbeTopologyType {
  tt_Undefined = 0 , tt_TopItem = 1 , tt_Proxy = 10 , tt_Vertex = 101 ,
  tt_Edge = 201 , tt_CurveEdge = 202 , tt_OrientedEdge = 203 , tt_Loop = 301 ,
  tt_Face = 401 , tt_FaceShell = 501 , tt_FreeItem = 600
}
 Types of topological objects. More...
 
enum  MbeChangedType {
  tct_Unchanged = 0x0000 , tct_Modified = 0x0001 , tct_Created = 0x0002 , tct_Transformed = 0x0004 ,
  tct_Reoriented = 0x0008 , tct_Deleted = 0x0010 , tct_Truncated = 0x0020 , tct_Merged = 0x0040 ,
  tct_Replaced = 0x0080 , tct_Added = 0x0100 , tct_Renamed = 0x0200
}
 The types of modification states of a topological object. More...
 

Functions

bool MbFace::GetNearestEdge (const MbCartPoint &pOnSurface, c3d::IndicesPair &edgeIndex, double &tEdgeCurve, bool &orientation, double &distance, double paramEpsilon=Math::paramEpsilon) const
 Find the closest edge in 2d to a specific point via projection. More...
 
double MbFace::DistanceToBorder (const MbCartPoint &point, double &precision) const
 Find a parametric distance to the nearest boundary. More...
 
double MbFace::DistanceToBorder (const MbCartPoint &point, MbVector &normal, size_t &loopNumber, size_t &edgeNumber, ptrdiff_t &corner, double &tEdgeCurve, double &precision) const
 Find a parametric distance to the nearest boundary. More...
 
MbeItemLocation MbFace::NearPointProjection (const MbCartPoint3D &point, double &u, double &v, MbVector3D &normal, c3d::IndicesPair &edgeLoc, ptrdiff_t &corner) const
 Find the nearest projection of the point on face. More...
 
virtual void MbTopologyItem::Transform (const MbMatrix3D &matr, MbRegTransform *iReg=nullptr)=0
 Transform according to the matrix. More...
 
virtual void MbTopologyItem::Move (const MbVector3D &to, MbRegTransform *iReg=nullptr)=0
 Move along a vector. More...
 
virtual void MbTopologyItem::Rotate (const MbAxis3D &axis, double angle, MbRegTransform *iReg=nullptr)=0
 Rotate around an axis. More...
 

Detailed Description

Enumeration Type Documentation

◆ MbeTopologyType

Types of topological objects.

Enumerator
tt_Undefined 

Unknown object.

tt_TopItem 

A topological object.
.

tt_Proxy 

A topological object proxy.
.

tt_Vertex 

A vertex.

tt_Edge 

An edge passing along a curve.

tt_CurveEdge 

An edge passing along a surface intersection curve.

tt_OrientedEdge 

Oriented edge.

tt_Loop 

A loop.

tt_Face 

A face.
.

tt_FaceShell 

A set of faces.
.

tt_FreeItem 

Type for the user-defined objects.

◆ MbeChangedType

The types of modification states of a topological object.

Enumerator
tct_Unchanged 

Unchanged.

tct_Modified 

Modified.

tct_Created 

Created (new).

tct_Transformed 

Transformed.

tct_Reoriented 

Reoriented.

tct_Deleted 

Deleted (object's element or link).

tct_Truncated 

Cut, truncated or extended.

tct_Merged 

Merged or sewn (stitched).

tct_Replaced 

Replaced.

tct_Added 

Added or inserted (object's element).

tct_Renamed 

Renamed.

Function Documentation

◆ GetNearestEdge()

bool MbFace::GetNearestEdge ( const MbCartPoint pOnSurface,
c3d::IndicesPair edgeIndex,
double &  tEdgeCurve,
bool &  orientation,
double &  distance,
double  paramEpsilon = Math::paramEpsilon 
) const

Find the closest edge in 2d to a specific point via projection.

The point must contain coordinates on the UV-area of the surface corresponding to the face. The search is perfrormed namely in 2d on the surface by projecting on the bounding curves. In 3d result may be different.

Parameters
[in]pOnSurface- A point on the face's surface, in uv-area of the surface.
[out]edgeIndex- An index of found edge, where edgeIndex.first - face loop number, edgeIndex.second - edge number in loop.
[out]tEdgeCurve- A t-parameter of the edge's 2d-curve closest to the pOnSurface. Curve corresponds to this face.
[out]orientation- Found edge orientation.
[out]distance- Distance between pOnSurface and edge in 2d UV-area of the face's surface.
[in]paramEpsilon- Parameteric precision (is normalised on dU and dV).
Returns
Returns true if the edge is found.

◆ DistanceToBorder() [1/2]

double MbFace::DistanceToBorder ( const MbCartPoint point,
double &  precision 
) const

Find a parametric distance to the nearest boundary.

The calculated distance is positive if the point is inside, and is negative if it is outside.

Parameters
[in]point- A point.
[out]precision- Precision of calculation.
Returns
Returns the distance to the nearest boundary in 2D space of the surface parameters.

◆ DistanceToBorder() [2/2]

double MbFace::DistanceToBorder ( const MbCartPoint point,
MbVector normal,
size_t &  loopNumber,
size_t &  edgeNumber,
ptrdiff_t &  corner,
double &  tEdgeCurve,
double &  precision 
) const

Find a parametric distance to the nearest boundary.

The calculated distance is positive if the point is inside, and is negative if it is outside.

Parameters
[in]point- A point.
[out]normal- Two-dimensional normal of border at its closest point.
[out]loopNumber- Index of nearest loop.
[out]edgeNumber- Index of nearest edge.
[out]corner- 0, if the projection is not located on the edge, 1, if the projection is located at the end of the oriented edge with index edgeLoc, -1, if the projection is located at the begining of the oriented edge with index edgeLoc.
[out]tEdgeCurve- Curve parameter of the nearest edge.
[out]precision- Precision of calculation.
Returns
Returns the distance to the nearest boundary in 2D space of the surface parameters.

◆ NearPointProjection()

MbeItemLocation MbFace::NearPointProjection ( const MbCartPoint3D point,
double &  u,
double &  v,
MbVector3D normal,
c3d::IndicesPair edgeLoc,
ptrdiff_t &  corner 
) const

Find the nearest projection of the point on face.

Find the nearest projection of the point on face or it border.

Parameters
[in]point- A point.
[out]u- Found u parameter of surface.
[out]v- Found v parameter of surface.
[out]normal- Normal of surface or boundaries (edges or vertices) at the point of the projection.
[out]edgeLoc- If the projection is not no the edge, then SYS_MAX_T, SYS_MAX_T. If the projection is on the edge, then the loop index and edge index in the loop.
[out]corner- 0, if the projection is not located on the edge, 1, if the projection is located at the end of the oriented edge with index edgeLoc, -1, if the projection is located at the begining of the oriented edge with index edgeLoc.
Returns
Returns the location of the projection point relative to the surface boundaries.

◆ Transform()

virtual void MbTopologyItem::Transform ( const MbMatrix3D matr,
MbRegTransform iReg = nullptr 
)
pure virtual

Transform according to the matrix.

Transformation of an object according to the matrix. This object can be contained as pointer in several other objects for transformations. Registrar is used to prevent multiple transformation of this object. When transforming the object with registrator, the existence of the object inside the registrator is verified. If such object is absent, it is stored to the registrator and transformed, otherwise, a transformation of the object is not performed.

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

Implemented in MbTopologyProxy, MbFace, MbEdge, and MbVertex.

◆ Move()

virtual void MbTopologyItem::Move ( const MbVector3D to,
MbRegTransform iReg = nullptr 
)
pure virtual

Move along a vector.

Move an object along a vector. When transforming the object with registrator, the existence of the object inside the registrator is verified. If such object is absent, it is stored to the registrator and transformed, otherwise, a transformation of the object is not performed.

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

Implemented in MbTopologyProxy, MbFace, MbEdge, and MbVertex.

◆ Rotate()

virtual void MbTopologyItem::Rotate ( const MbAxis3D axis,
double  angle,
MbRegTransform iReg = nullptr 
)
pure virtual

Rotate around an axis.

Rotate an object at a given angle around an axis. When transforming the object with registrator, the existence of the object inside the registrator is verified. If such object is absent, it is stored to the registrator and transformed, otherwise, a transformation of the object is not performed.

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

Implemented in MbTopologyProxy, MbFace, MbEdge, and MbVertex.