CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
OdDb3dProfile Class Reference

#include <Db3dProfile.h>

Inheritance diagram for OdDb3dProfile:
OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdDb3dProfile)
 
 ODRX_HEAP_OPERATORS ()
 
 OdDb3dProfile ()
 
 OdDb3dProfile (OdDbEntity *pEntity)
 
 OdDb3dProfile (const OdDbFullSubentPath &faceSubentPath)
 
 OdDb3dProfile (const OdDbVertexRef &vertexRef)
 
 OdDb3dProfile (const OdDb3dProfile &src)
 
 OdDb3dProfile (const OdDbPathRef &pathRef)
 
virtual ~OdDb3dProfile ()
 
void copyFrom (const OdRxObject *src)
 
OdDbEntityentity () const
 
OdResult set (OdDbEntity *pEntity)
 
OdResult set (const OdDbVertexRef &vertexRef)
 
OdResult getVertexRef (OdDbVertexRef &vertexRef) const
 
OdResult set (const OdDbPathRef &pathRef)
 
OdDb3dProfileoperator= (const OdDb3dProfile &src)
 
bool isClosed (OdGeTol tol=OdGeTol()) const
 
bool isPlanar () const
 
bool isSubent () const
 
bool isFace () const
 
bool isEdge () const
 
bool isValid () const
 
OdResult getPathRef (OdDbPathRef &pathRef) const
 
OdDb3dProfileconvertProfile (const OdArray< OdDbPathRef > &aPath)
 
OdResult convertProfile (bool explodeMultiFaceRegions, bool convertSurfaceToEdges, bool nonPlanarOnly, bool outerLoopOnly, OdArray< OdDb3dProfile * > &convertedProfileArr) const
 
- 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< OdDb3dProfilecreateObject (const OdDbFullSubentPath &faceSubentPath)
 
static OdResult mergeProfiles (const OdArray< OdDb3dProfile * > &profileArr, bool mergeEdges, bool mergeCurves, OdArray< OdDb3dProfile * > &mergedProfileArr)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Friends

class OdDb3dProfileData
 

Detailed Description

<group OdDb_Classes>

This class is used to represent a 3d profile that can be used as input to functions such as createExtrudedSurface(), createRevolvedSurface(), and createSweptSurface(). An object of this class can represent an entity such as a curve, region, surface, face, trace, solid, or it can represent an edge or a set of edges that form a connected chain.

Definition at line 47 of file Db3dProfile.h.

Constructor & Destructor Documentation

◆ OdDb3dProfile() [1/6]

OdDb3dProfile::OdDb3dProfile ( )

Creates a new instance of a 3d profile with default parameters.

◆ OdDb3dProfile() [2/6]

OdDb3dProfile::OdDb3dProfile ( OdDbEntity pEntity)

Creates a new instance of a 3d profile with OdDbEntity.

Parameters
pEntity[in] Entity.

◆ OdDb3dProfile() [3/6]

OdDb3dProfile::OdDb3dProfile ( const OdDbFullSubentPath faceSubentPath)

Creates a new instance of a 3d profile with OdDbFullSubentPath.

Parameters
faceSubentPath[in] Subent path of the face.

◆ OdDb3dProfile() [4/6]

OdDb3dProfile::OdDb3dProfile ( const OdDbVertexRef vertexRef)

Creates a new instance of a 3d profile with OdDbVertexRef.

Parameters
vertexRef[in] Reference to the vertex.

◆ OdDb3dProfile() [5/6]

OdDb3dProfile::OdDb3dProfile ( const OdDb3dProfile src)

Creates a new instance of a 3d profile with OdDb3dProfile.

Parameters
src[in] Source object to be copied.

◆ OdDb3dProfile() [6/6]

OdDb3dProfile::OdDb3dProfile ( const OdDbPathRef pathRef)

Creates a new instance of a 3d profile with OdDbPathRef.

Parameters
pathRef[in]: Reference to the path

◆ ~OdDb3dProfile()

virtual OdDb3dProfile::~OdDb3dProfile ( )
virtual

Destroy instance of 3d profile.

Member Function Documentation

◆ convertProfile() [1/2]

OdResult OdDb3dProfile::convertProfile ( bool  explodeMultiFaceRegions,
bool  convertSurfaceToEdges,
bool  nonPlanarOnly,
bool  outerLoopOnly,
OdArray< OdDb3dProfile * > &  convertedProfileArr 
) const

Converts profile into new profiles that are of a type that can be used for extrude, revolve, sweep, or loft operations. The converted profiles are returned in the output array. If this profile's type is AcDbTrace, AcDbSolid, or AcDbFace then the converted profile will be for a region. If this profile's type is AcDb3dPolyline and the profile is linear or whose 'Fit' property is quadratic or cubic then the converted profile will be a line or a spline.

Parameters
explodeMultiFaceRegions[in] If this profile's type is AcDbSurface or AcDbRegion and has more than one face, then we explode to get multiple surface or region profiles that each have only one face.
convertSurfaceToEdges[in] If this profile is a face or is of type AcDbSurface, AcDbRegion, AcDbTrace, AcDbSolid, or AcDbFace then we convert to an edge profile that is defined by the surface or region edges.
nonPlanarOnly[in] This parameter is only relevant when convertSurfaceToEdges is set to true. If this parameter is true then only non-planar surfaces will be converted to edge profiles. Regions and planar surfaces will not be converted.
outerLoopOnly[in] This parameter is only relevant when convertSurfaceToEdges is set to true. If this parameter is true then only the outer loop of the surface or region will be converted to an edge profile.
convertedProfileArr[out] Output list of converted profiles. The caller is responsible for deleting the objects in this list.
Returns
eOk if successful. Even when this function returns eOk, it is possible for the output list to be empty depending on the profile type and the values of the other parameters.

◆ convertProfile() [2/2]

OdDb3dProfile * OdDb3dProfile::convertProfile ( const OdArray< OdDbPathRef > &  aPath)

Converts path array into new profiles, that are of a type that can be used for extrude, revolve, sweep, or loft operations.

Parameters
aPath[in] Input path array.
Returns
resulting 3d profile.

◆ copyFrom()

void OdDb3dProfile::copyFrom ( const OdRxObject src)
virtual

Initializes this reference using a given object.

Parameters
src[in] Pointer to the src.

Reimplemented from OdRxObject.

◆ createObject()

static OdSmartPtr< OdDb3dProfile > OdDb3dProfile::createObject ( const OdDbFullSubentPath faceSubentPath)
static

Creates a new instance of a 3d profile with OdDbFullSubentPath.

Parameters
faceSubentPath[in] Subent path of the face.
Returns
created OdSmartPtr<OdDb3dProfile>.

◆ entity()

OdDbEntity * OdDb3dProfile::entity ( ) const

Returns the profile entity. If the profile is for an edge or set of edges then the returned entity will be an AcDbCurve of the edge or edges. The caller should not delete this pointer or post it to the database.

Returns
Profile entity. The caller should not delete this pointer.

◆ getPathRef()

OdResult OdDb3dProfile::getPathRef ( OdDbPathRef pathRef) const

Returns the path reference of the edge if the profile is an edge or set of edges. If the profile is not an edge or set of edges, pathRef will be empty

Parameters
pathRef[out] path reference of the edge(s).
Returns
eOk if successful.

◆ getVertexRef()

OdResult OdDb3dProfile::getVertexRef ( OdDbVertexRef vertexRef) const

Returns the vertex reference of the vertex if the profile is a vertex. If the profile is not an edge or set of edges, vertexRef will be empty

Parameters
vertexRef[in] Reference to the vertex.
Returns
eOk if successful.

◆ isClosed()

bool OdDb3dProfile::isClosed ( OdGeTol  tol = OdGeTol()) const

Checks whether the profile forms a closed loop.

Parameters
tol[in] Tolerance.
Returns
true if profile is closed, false otherwise.

◆ isEdge()

bool OdDb3dProfile::isEdge ( ) const

Checks whether the profile is an edge.

Returns
true if profile is an edge, false otherwise.

◆ isFace()

bool OdDb3dProfile::isFace ( ) const

Checks whether the profile is a face.

Returns
true if profile is a face, false otherwise.

◆ isPlanar()

bool OdDb3dProfile::isPlanar ( ) const

Checks whether the profile is planar.

Returns
true if profile is planar, false otherwise.

◆ isSubent()

bool OdDb3dProfile::isSubent ( ) const

Checks whether the profile is an edge or face.

Returns
true if profile is an edge or face, false otherwise.

◆ isValid()

bool OdDb3dProfile::isValid ( ) const

Checks whether the profile is valid and may be used to create a surface.

Returns
true if profile is a valid entity, edge, or face.

◆ mergeProfiles()

static OdResult OdDb3dProfile::mergeProfiles ( const OdArray< OdDb3dProfile * > &  profileArr,
bool  mergeEdges,
bool  mergeCurves,
OdArray< OdDb3dProfile * > &  mergedProfileArr 
)
static

Merges connected sets of profiles into one or more profiles

Parameters
profileArr[in] Input array of profiles that are to be merged.
mergeEdges[in] If this parameter is false then any edge profiles in the input array will not be merged and will be copied directly to the ouput array.
mergeCurves[in] If this parameter is false then any curve profiles in the input array will not be merged and will be copied directly to the ouput array.
mergedProfileArr[out] Output array of merged profiles. The caller is responsible for deleting all objects that are returned in this array.
Returns
eOk if successful.

◆ ODRX_DECLARE_MEMBERS()

OdDb3dProfile::ODRX_DECLARE_MEMBERS ( OdDb3dProfile  )

◆ ODRX_HEAP_OPERATORS()

OdDb3dProfile::ODRX_HEAP_OPERATORS ( )

◆ operator=()

OdDb3dProfile & OdDb3dProfile::operator= ( const OdDb3dProfile src)

Initializes this reference using a given object.

Parameters
src[in] Source 3d profile.
Returns
resulting 3d profile.

◆ set() [1/3]

OdResult OdDb3dProfile::set ( const OdDbPathRef pathRef)

Sets a new instance of 3d profile to a path

Parameters
pathRef[in] Reference to the path.
Returns
eOk if successful.

◆ set() [2/3]

OdResult OdDb3dProfile::set ( const OdDbVertexRef vertexRef)

Sets a new instance of a 3d profile with OdDbVertexRef.

Parameters
vertexRef[in] Reference to the vertex.
Returns
eOk if successful.

◆ set() [3/3]

OdResult OdDb3dProfile::set ( OdDbEntity pEntity)

Sets a new instance of a 3d profile with OdDbEntity.

Parameters
pEntity[in] Pointer to the entity.
Returns
eOk if successful.

Friends And Related Function Documentation

◆ OdDb3dProfileData

friend class OdDb3dProfileData
friend

Definition at line 264 of file Db3dProfile.h.


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