CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
AECGe::Mesh Class Reference

DOM. More...

#include <AECMesh.h>

Public Member Functions

 Mesh ()
 
OdUInt32 GetVertexCount () const
 
const OdGePoint3dGetVertex (OdUInt32 iIndex) const
 
void SetVertex (OdUInt32 iIndex, const OdGePoint3d &ptVertex)
 
OdUInt32 GetEdgeCount () const
 
OdUInt32 GetFaceCount () const
 
const MeshFaceGetFace (OdUInt32 iIndex) const
 
MeshFaceGetFace (OdUInt32 iIndex)
 
OdUInt32 AddVertex (const OdGePoint3d &ptVertex, bool bUnique=false)
 
OdUInt32 AddFace (const MeshFace &face, bool bCheckPlane=true, bool *bSuccess=0)
 
void AddFace (const IndexList &face, bool *bSuccess=0)
 
void SwapFace (OdUInt32 iIndex, MeshFace &face)
 
void AddTriangles (const IndexList &triangles)
 
bool IsEmpty () const
 
void Clear ()
 
void ClearFaces ()
 
void GetExtents (OdGeExtents3d &extents) const
 
double GetVolume () const
 
void Transform (const OdGeMatrix3d &mMatrix)
 
void Append (const Mesh &mMesh)
 
void Invert ()
 
void Triangulate ()
 
bool IsClosed () const
 
void Decompose (std::vector< Mesh > &aResult) const
 
void Normalize ()
 
void RemoveSameVertices ()
 
void RemoveTJunctions ()
 
void RegenEdgeVisibilities ()
 
void RemoveEdgeVisibilities ()
 
void SetEdgeVisibilities (OdGiVisibility eVisibility)
 
const std::vector< OdGePoint3d > & Vertices () const
 
void Simplify ()
 

Static Public Member Functions

static void PerformOperation (FacetModeler::BooleanOperation eOperation, const Mesh &mOp1, const Mesh &mOp2, Mesh &mResult, bool bCheckExtents=false)
 

Public Attributes

OdUInt32 Tag
 

Detailed Description

DOM.

Definition at line 40 of file AECMesh.h.

Constructor & Destructor Documentation

◆ Mesh()

AECGe::Mesh::Mesh ( )

constructor.

Member Function Documentation

◆ AddFace() [1/2]

void AECGe::Mesh::AddFace ( const IndexList face,
bool *  bSuccess = 0 
)

Adds a face.

Remarks
If the face is non-convex it will be triangulated.

◆ AddFace() [2/2]

OdUInt32 AECGe::Mesh::AddFace ( const MeshFace face,
bool  bCheckPlane = true,
bool *  bSuccess = 0 
)

Adds a face.

Returns
Index of new face.
Remarks
Method triangulates the face if it is non-convex.

◆ AddTriangles()

void AECGe::Mesh::AddTriangles ( const IndexList triangles)

Adds the list of triangular faces specified by triples of vertex indices.

◆ AddVertex()

OdUInt32 AECGe::Mesh::AddVertex ( const OdGePoint3d ptVertex,
bool  bUnique = false 
)

Appends new vertex.

Parameters
ptVertex[in] Vertex to add.
bUnique[in] If true then method doesn't add duplicate point but the performance is pour. It is faster to add multiple points without this check and then call RemoveSameVertices.
Returns
Index of new vertex.
Remarks
: Does not verify that new vertex is unique.

Such calls should be followed by Normalize call

◆ Append()

void AECGe::Mesh::Append ( const Mesh mMesh)

Fast append operation.

Remarks
For intersecting meshes this operation is not safe. Invalid mesh will be produced in this case.

◆ Clear()

void AECGe::Mesh::Clear ( )

Clear mesh contents.

◆ ClearFaces()

void AECGe::Mesh::ClearFaces ( )

Clear all faces leaving vertex data intact.

◆ Decompose()

void AECGe::Mesh::Decompose ( std::vector< Mesh > &  aResult) const

Returns the array of simple closed meshes.

Remarks
Produces valid result only for closed mesh. If mesh is not closed than at least one of the resulting meshes will be non-closed.

◆ GetEdgeCount()

OdUInt32 AECGe::Mesh::GetEdgeCount ( ) const

Returns the number of edges.

Remarks
This value is not stored so it is calculated by iterating through all faces.

◆ GetExtents()

void AECGe::Mesh::GetExtents ( OdGeExtents3d extents) const

Returns mesh extents.

◆ GetFace() [1/2]

MeshFace & AECGe::Mesh::GetFace ( OdUInt32  iIndex)

◆ GetFace() [2/2]

const MeshFace & AECGe::Mesh::GetFace ( OdUInt32  iIndex) const

Returns face by index.

◆ GetFaceCount()

OdUInt32 AECGe::Mesh::GetFaceCount ( ) const

Returns the number of vertices.

◆ GetVertex()

const OdGePoint3d & AECGe::Mesh::GetVertex ( OdUInt32  iIndex) const

Returns vertex location by index.

◆ GetVertexCount()

OdUInt32 AECGe::Mesh::GetVertexCount ( ) const

Returns the number of vertices.

◆ GetVolume()

double AECGe::Mesh::GetVolume ( ) const

Returns mesh volume.

◆ Invert()

void AECGe::Mesh::Invert ( )

Inverts the mesh.

◆ IsClosed()

bool AECGe::Mesh::IsClosed ( ) const

Returns whether the mesh is a closed solid body.

◆ IsEmpty()

bool AECGe::Mesh::IsEmpty ( ) const

Returns true if mesh doesn't contain any faces.

◆ Normalize()

void AECGe::Mesh::Normalize ( )

Performs several actions for preserving mesh quality.

Remarks
RemoveSameVertices

◆ PerformOperation()

static void AECGe::Mesh::PerformOperation ( FacetModeler::BooleanOperation  eOperation,
const Mesh mOp1,
const Mesh mOp2,
Mesh mResult,
bool  bCheckExtents = false 
)
static

Performs boolean operation with two meshes.

Parameters
eOperation[in] Type of boolean operation.
mOp1[in] First operand.
mOp2[in] Second operand.
mResult[in] Result.
bCheckExtents[in] If true and the extents of two operands do not intersect then fast operation is used.
Remarks
Setting last operand to true is valid only for closed operands.

◆ RegenEdgeVisibilities()

void AECGe::Mesh::RegenEdgeVisibilities ( )

Marks edges that lie between coplanar faces as invisible.

◆ RemoveEdgeVisibilities()

void AECGe::Mesh::RemoveEdgeVisibilities ( )

Sets all invisible edges as visible.

◆ RemoveSameVertices()

void AECGe::Mesh::RemoveSameVertices ( )

Forces only unique vertices to be present in vertex container.

Remarks
O( V * Log(V) )

◆ RemoveTJunctions()

void AECGe::Mesh::RemoveTJunctions ( )

Splits all edges by all vertices.

◆ SetEdgeVisibilities()

void AECGe::Mesh::SetEdgeVisibilities ( OdGiVisibility  eVisibility)

Sets all edge visibilities to specified value.

◆ SetVertex()

void AECGe::Mesh::SetVertex ( OdUInt32  iIndex,
const OdGePoint3d ptVertex 
)

Sets vertex location by index.

Parameters
iIndex[in] Vertex index.
ptVertex[in] Vertex location.
Remarks
This operation is not safe. Planes of the referencing faces become invalid. Some faces may no longer be planar after this operation.

◆ Simplify()

void AECGe::Mesh::Simplify ( )

◆ SwapFace()

void AECGe::Mesh::SwapFace ( OdUInt32  iIndex,
MeshFace face 
)

Swaps face with the specified index with the specified one.

Remarks
Used internally.

◆ Transform()

void AECGe::Mesh::Transform ( const OdGeMatrix3d mMatrix)

Transforms the mesh.

Remarks
If transformation passed to method has negative determinant, then the mesh gets inverted after transformation to preserve volume sign.

◆ Triangulate()

void AECGe::Mesh::Triangulate ( )

Mesh is converted in a way to hold only triangles.

◆ Vertices()

const std::vector< OdGePoint3d > & AECGe::Mesh::Vertices ( ) const

Returns the array of vertices.

Member Data Documentation

◆ Tag

OdUInt32 AECGe::Mesh::Tag

Auxiliary data. This value is not handled on operations.

Definition at line 295 of file AECMesh.h.


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