CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
OdGiShellToolkit Class Referenceabstract

#include <GiShellToolkit.h>

Inheritance diagram for OdGiShellToolkit:
OdRxObject

Classes

struct  OdGiShellEdgeDescription
 
struct  OdGiShellFaceDescription
 
class  OdGiShellFaceOrientationCallback
 
struct  OdGiShellOriginalFaceDescription
 

Public Types

enum  ShellToolkitOption { kUnifyVertices = 1 , kTriangulateHoles = 1 << 1 , kForceTriangulation = 1 << 2 }
 

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdGiShellToolkit)
 
virtual void addShell (OdUInt32 nPoints, const OdGePoint3d *pPoints, OdUInt32 nFaces, const OdInt32 *pFaces, OdUInt8 options=OdGiShellToolkit::kTriangulateHoles)=0
 
virtual void clear ()=0
 
virtual bool hasDupilcateVertices () const =0
 
virtual OdUInt32 numSharpEdges (bool bOnlyCount=true) const =0
 
virtual OdUInt32 numSingularEdges (bool bOnlyCount=true) const =0
 
virtual OdUInt32 numDegeneratedFaces () const =0
 
virtual bool hasDuplicateFaces (OdUInt32 *pFirstDuplicateFace=NULL, bool bRollFaces=false) const =0
 
virtual bool checkFacesOrientation () const =0
 
virtual bool checkFacesOrientation (const OdGiShellFaceOrientationCallback *pCallback) const =0
 
virtual void unifyVertices ()=0
 
virtual void removeDegenerateFaces ()=0
 
virtual void removeDuplicateFaces (bool bRollFaces=false)=0
 
virtual bool fixFaceOrientation (bool bRestoreModel=true)=0
 
virtual bool fixFaceOrientation (const OdGiShellFaceOrientationCallback *pCallback, bool bRestoreModel=true)=0
 
virtual OdGeToltolerance ()=0
 
virtual const OdGeToltolerance () const =0
 
virtual OdUInt32 numVertices () const =0
 
virtual const OdGePoint3dvertices () const =0
 
virtual OdUInt32 faceListSize () const =0
 
virtual const OdInt32faceList () const =0
 
virtual void getSharpEdges (OdArray< OdGiShellEdgeDescription > &edges, bool bOnlyCount=true) const =0
 
virtual void getSingularEdges (OdArray< OdGiShellToolkit::OdGiShellEdgeDescription > &edges, bool bOnlyCount=true) const =0
 
virtual void getIncorrectOrientedFaces (OdArray< OdGiShellFaceDescription > &faces, bool bAddNotOriented=true) const =0
 
virtual void getIncorrectOrientedFaces (const OdGiShellFaceOrientationCallback *pCallback, OdArray< OdGiShellFaceDescription > &faces, bool bAddNotOriented=true) const =0
 
virtual bool getOriginalFaceDescription (OdUInt32 nFaceOffset, OdGiShellOriginalFaceDescription &result) const =0
 
virtual void filterEdgesByCreaseAngle (OdArray< OdGiShellToolkit::OdGiShellEdgeDescription > &edges, double dAngle) const =0
 
virtual OdUInt32 numNonTriangleFaces () const =0
 
virtual void triangulate ()=0
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static OdSmartPtr< OdGiShellToolkitcreate ()
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This interface describes OdGiShellToolkit.

Definition at line 33 of file GiShellToolkit.h.

Member Enumeration Documentation

◆ ShellToolkitOption

Represents Shell Toolkit options.

Enumerator
kUnifyVertices 

Combine vertices with the same coordinates in one vertex.

kTriangulateHoles 

Automatically triangulate faces if shell has holes.

kForceTriangulation 

Automatically triangulate all faces.

Definition at line 40 of file GiShellToolkit.h.

Member Function Documentation

◆ addShell()

virtual void OdGiShellToolkit::addShell ( OdUInt32  nPoints,
const OdGePoint3d pPoints,
OdUInt32  nFaces,
const OdInt32 pFaces,
OdUInt8  options = OdGiShellToolkit::kTriangulateHoles 
)
pure virtual

Adds shell to the toolkit.

Parameters
nPoints[in] Number of vertices.
pPoints[in] Vertices array.
nFaces[in] Size of face list.
pFaces[in] Face list, each face described by [numPoints][Point0][Point1]...
options[in] A set of shell toolkit options.
Remarks
If OdGiShellToolkit::kUnifyVertices is enabled, only points from specified shell are unified, previous data is not modified. OdGiShellToolkit::kForceTriangulation includes OdGiShellToolkit::kTriangulateHoles, so if it is enabled no OdGiShellToolkit::kTriangulateHoles required. If OdGiShellToolkit::kTriangulateHoles and OdGiShellToolkit::kForceTriangulation are disabled, holes are not supported.

◆ checkFacesOrientation() [1/2]

virtual bool OdGiShellToolkit::checkFacesOrientation ( ) const
pure virtual

Checks the faces' orientations of a shell.

Returns
Returns true if and only if all faces are correctly oriented.
Remarks
This method is not relevant if shell contains sharp or singular edges.

◆ checkFacesOrientation() [2/2]

virtual bool OdGiShellToolkit::checkFacesOrientation ( const OdGiShellFaceOrientationCallback pCallback) const
pure virtual

Checks faces' orientations of a shell using Face Orientation Callback.

Parameters
pCallback[in] Pointer to the OdGiShellFaceOrientationCallback.
Returns
Returns true if and only if all faces are correctly oriented.
Remarks
This method is relevant if shell contains sharp or singular edges and may be used instead of virtual bool checkFacesOrientation() const = 0.

◆ clear()

virtual void OdGiShellToolkit::clear ( )
pure virtual

Clears the toolkit.

◆ create()

static OdSmartPtr< OdGiShellToolkit > OdGiShellToolkit::create ( )
static

Creates an instance of shell toolkit implementation.

Returns
returns smart pointer to the toolkit implementation.

◆ faceList()

virtual const OdInt32 * OdGiShellToolkit::faceList ( ) const
pure virtual

Access to the toolkit face list.

Returns
Returns face list.

◆ faceListSize()

virtual OdUInt32 OdGiShellToolkit::faceListSize ( ) const
pure virtual

Access to the toolkit face list size.

Returns
Returns face list size.

◆ filterEdgesByCreaseAngle()

virtual void OdGiShellToolkit::filterEdgesByCreaseAngle ( OdArray< OdGiShellToolkit::OdGiShellEdgeDescription > &  edges,
double  dAngle 
) const
pure virtual

Generates list of edges with crease angle more than threshold value.

Parameters
edges[out] Resulting array of OdGiShellEdgeDescription.
dAngle[in] Threshold crease angle value.
Remarks
Result is pairs of OdGiShellEdgeDescription, each pair describes the same edge but on different faces.

◆ fixFaceOrientation() [1/2]

virtual bool OdGiShellToolkit::fixFaceOrientation ( bool  bRestoreModel = true)
pure virtual

Orients shell faces in correct way.

Parameters
bRestoreModel[in] Flag that specifies whether toolkit should restore internal shell model.
Returns
Returns true if and only if orientation was successful.
Remarks
This method is not relevant if shell contains sharp or singular edges. After faces re-orientation internal shell model becomes invalid. However usually faces re-orientation is the last operation, so model restoring may be waste of time. Toolkit usage after OdGiShellToolkit::fixFaceOrientation( false ) without OdGiShellToolkit::clear() generates incorrect results.

◆ fixFaceOrientation() [2/2]

virtual bool OdGiShellToolkit::fixFaceOrientation ( const OdGiShellFaceOrientationCallback pCallback,
bool  bRestoreModel = true 
)
pure virtual

Orients shell faces in correct way using Face Orientation Callback.

Parameters
pCallback[in] Pointer to the OdGiShellFaceOrientationCallback.
bRestoreModel[in] Flag that specifies whether toolkit should restore internal shell model.
Returns
Returns true if and only if orientation was successful.
Remarks
This method is relevant if shell contains sharp or singular edges and may be used instead of virtual bool checkFacesOrientation() const = 0. After faces re-orientation internal shell model becomes invalid. However usually faces re-orientation is the last operation, so model restoring may be waste of time. Toolkit usage after OdGiShellToolkit::fixFaceOrientation( false ) without OdGiShellToolkit::clear() generates incorrect results.

◆ getIncorrectOrientedFaces() [1/2]

virtual void OdGiShellToolkit::getIncorrectOrientedFaces ( const OdGiShellFaceOrientationCallback pCallback,
OdArray< OdGiShellFaceDescription > &  faces,
bool  bAddNotOriented = true 
) const
pure virtual

Access to the incorrect oriented faces.

Parameters
pCallback[in] Pointer to the OdGiShellFaceOrientationCallback.
edges[out] Array of OdGiShellToolkit::OdGiShellFaceDescription.
bAddNotOriented[in] Flag that specifies whether toolkit should also put in result array not oriented faces.

◆ getIncorrectOrientedFaces() [2/2]

virtual void OdGiShellToolkit::getIncorrectOrientedFaces ( OdArray< OdGiShellFaceDescription > &  faces,
bool  bAddNotOriented = true 
) const
pure virtual

Access to the incorrect oriented faces.

Parameters
faces[out] Array of OdGiShellToolkit::OdGiShellFaceDescription.
bAddNotOriented[in] Flag that specifies whether toolkit should also put in result array not oriented faces.

◆ getOriginalFaceDescription()

virtual bool OdGiShellToolkit::getOriginalFaceDescription ( OdUInt32  nFaceOffset,
OdGiShellOriginalFaceDescription result 
) const
pure virtual

Access to the original face description.

Parameters
nFaceOffset[in] Face offset in OdGiShellToolkit::faceList().
result[out] Reference to the OdGiShellToolkit::OdGiShellOriginalFaceDescription.
Returns
Returns true if and only if original face description was found.

◆ getSharpEdges()

virtual void OdGiShellToolkit::getSharpEdges ( OdArray< OdGiShellEdgeDescription > &  edges,
bool  bOnlyCount = true 
) const
pure virtual

Access to the sharp edges.

Parameters
edges[out] Array of OdGiShellToolkit::OdGiShellEdgeDescription.
bOnlyCount[in] Flag that specifies whether the toolkit should only check number of connected faces or also consider faces orientation.

◆ getSingularEdges()

virtual void OdGiShellToolkit::getSingularEdges ( OdArray< OdGiShellToolkit::OdGiShellEdgeDescription > &  edges,
bool  bOnlyCount = true 
) const
pure virtual

Access to the singular edges.

Parameters
edges[out] Array of OdGiShellToolkit::OdGiShellEdgeDescription.
bOnlyCount[in] Flag that specifies whether the toolkit should only check number of connected faces or also consider faces orientation.

◆ hasDupilcateVertices()

virtual bool OdGiShellToolkit::hasDupilcateVertices ( ) const
pure virtual

Checks whether a shell contains duplicate vertices.

Returns
Returns true if and only if shell contains vertices with the same coordinates.

◆ hasDuplicateFaces()

virtual bool OdGiShellToolkit::hasDuplicateFaces ( OdUInt32 pFirstDuplicateFace = NULL,
bool  bRollFaces = false 
) const
pure virtual

Checks whether a shell contains duplicate faces.

Parameters
pFirstDuplicateFace[out] Pointer to the first duplicate face.
bRollFaces[in] Flag that specifies whether toolkit should roll faces for duplication check.
Returns
Returns true if and only if shell contains duplicate faces.
Remarks
Without rolling faces 1-2-3 and 2-3-1 are not equal.

◆ numDegeneratedFaces()

virtual OdUInt32 OdGiShellToolkit::numDegeneratedFaces ( ) const
pure virtual

Checks whether a shell contains degenerate faces.

Returns
Returns true if and only if shell contains degenerate faces.

◆ numNonTriangleFaces()

virtual OdUInt32 OdGiShellToolkit::numNonTriangleFaces ( ) const
pure virtual

Returns number of non-degenerated non-triangulated faces.

Returns
Returns number of faces with more than 3 points.

◆ numSharpEdges()

virtual OdUInt32 OdGiShellToolkit::numSharpEdges ( bool  bOnlyCount = true) const
pure virtual

Checks whether a shell contains sharp edges.

Parameters
bOnlyCount[in] Flag that specifies whether the toolkit should only check number of connected faces or also consider faces orientation.
Returns
Returns number of sharp edges.

◆ numSingularEdges()

virtual OdUInt32 OdGiShellToolkit::numSingularEdges ( bool  bOnlyCount = true) const
pure virtual

Checks whether a shell contains singular edges.

Parameters
bOnlyCount[in] Flag that specifies whether the toolkit should only check the number of the connected faces or also consider the faces' orientations.
Returns
Returns number of singular edges.

◆ numVertices()

virtual OdUInt32 OdGiShellToolkit::numVertices ( ) const
pure virtual

Access to the toolkit number of vertices.

Returns
Returns number of vertices.

◆ ODRX_DECLARE_MEMBERS()

OdGiShellToolkit::ODRX_DECLARE_MEMBERS ( OdGiShellToolkit  )

◆ removeDegenerateFaces()

virtual void OdGiShellToolkit::removeDegenerateFaces ( )
pure virtual

Removes degenerate faces.

◆ removeDuplicateFaces()

virtual void OdGiShellToolkit::removeDuplicateFaces ( bool  bRollFaces = false)
pure virtual

Removes duplicate faces.

Parameters
bRollFaces[in] Flag that specifies whether toolkit should roll faces for duplication check.
Remarks
Without rolling faces 1-2-3 and 2-3-1 are not equal.

◆ tolerance() [1/2]

virtual const OdGeTol & OdGiShellToolkit::tolerance ( ) const
pure virtual

Shell toolkit tolerance access.

Returns
Returns shell toolkit tolerance.

◆ tolerance() [2/2]

virtual OdGeTol & OdGiShellToolkit::tolerance ( )
pure virtual

Shell toolkit tolerance access.

Returns
Returns shell toolkit tolerance.

◆ triangulate()

virtual void OdGiShellToolkit::triangulate ( )
pure virtual

Triangulates non-degenerated non-triangulated faces.

◆ unifyVertices()

virtual void OdGiShellToolkit::unifyVertices ( )
pure virtual

Unifies shell vertices.

◆ vertices()

virtual const OdGePoint3d * OdGiShellToolkit::vertices ( ) const
pure virtual

Access to the toolkit vertices.

Returns
Returns vertices array.

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