CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdDbFlattenViewsHelper Class Reference

#include <DbFlattenViewsHelper.h>

Public Member Functions

 OdDbFlattenViewsHelper (OdDbDatabase *pDb)
 
virtual ~OdDbFlattenViewsHelper ()
 
OdDbDatabasedatabase () const
 
OdResult setProjectionPlane (const OdGePoint3d &ptBase, const OdGeVector3d &vrDir, const OdGeVector3d &vrUp)
 
OdGePoint3d projectionBase () const
 
OdGeVector3d projectionDirection () const
 
OdGeVector3d projectionUp () const
 
bool includeTangentalEdgesFlag () const
 
void setIncludeTangentalEdgesFlag (bool bSet)
 
void setTangentalEdgesAngle (double dAngle)
 
OdResult setEntities (const OdDbObjectIdArray &arr3dObjects)
 
const OdArray< OdDbObjectId > & getEntities () const
 
OdGeExtents3d getExtents () const
 
OdResult createSectionHLR (bool bCreateSection, bool bCreateHiddenLines)
 
OdResult addToBlock (OdDbBlockTableRecord *pOwner, const OdGeMatrix3d &matTransform=OdGeMatrix3d::kIdentity)
 
const OdDbHLRCurvePropertiesforegroundCurveProperties () const
 
void setForegroundCurveProperties (const OdDbHLRCurveProperties &curveProp)
 
const OdDbHLRCurvePropertiesobscuredCurveProperties () const
 
void setObscuredCurveProperties (const OdDbHLRCurveProperties &curveProp)
 
const OdDbSectionHatchPatternSettingssectionHatchSettings () const
 
void setSectionHatchSettings (const OdDbSectionHatchPatternSettings &patternSettings)
 
bool getSectionHatches (OdRxObjectPtrArray &arrHatches, bool bSetProperties) const
 
bool getHiddenLines (OdRxObjectPtrArray &arrHiddenLines, bool bSetProperties) const
 
bool getVisibleLines (OdRxObjectPtrArray &arrVisibleLines, bool bSetProperties) const
 

Detailed Description

This class implements wrapper of helper to create flatterned and section geometry by hidden line remover and section modeller.

<group OdDb_Classes>

Definition at line 73 of file DbFlattenViewsHelper.h.

Constructor & Destructor Documentation

◆ OdDbFlattenViewsHelper()

OdDbFlattenViewsHelper::OdDbFlattenViewsHelper ( OdDbDatabase * pDb)

Constructor of OdDbFlattenViewsHelper.

Parameters
pDb[in] database to initialize defaults for section and flattened view geometry.

◆ ~OdDbFlattenViewsHelper()

virtual OdDbFlattenViewsHelper::~OdDbFlattenViewsHelper ( )
virtual

Destructor of OdDbFlattenViewsHelper.

Member Function Documentation

◆ addToBlock()

OdResult OdDbFlattenViewsHelper::addToBlock ( OdDbBlockTableRecord * pOwner,
const OdGeMatrix3d & matTransform = OdGeMatrix3d::kIdentity )

Apply symbology and hatch pattern settings to section and flattened view geometry and add it to block table record.

Parameters
pOwner[in] Pointer to block table record to add section and flattened view geometry.
matTransform[in] Additional transformation to be applied to section and flattened view geometry.
Remarks
Returns eNullObjectPointer if block table record pointer is NULL, eWrongDatabase if block table record database and internal helper database is not initialized, eNotInitializedYet if no one entity was set to helper. Otherwise returns eOk. If database of layer or line type from symbology differs of database of block table record the layer and the line type will be wblock cloned to database of block table record.

◆ createSectionHLR()

OdResult OdDbFlattenViewsHelper::createSectionHLR ( bool bCreateSection,
bool bCreateHiddenLines )

Calculate flattened views and section geometry.

Parameters
bCreateSection[in] Use section plane to cut 3d objects and create section hatches.
bCreateHiddenLines[in] Create hidden line geometry.
Remarks
Returns eNotInitializedYet if no one entity was set to helper. Otherwise returns eOk.

◆ database()

OdDbDatabase * OdDbFlattenViewsHelper::database ( ) const

Returns database to initialize flattened and section geometry after creation.

◆ foregroundCurveProperties()

const OdDbHLRCurveProperties & OdDbFlattenViewsHelper::foregroundCurveProperties ( ) const

Returns visible edges geometry properties.

◆ getEntities()

const OdArray< OdDbObjectId > & OdDbFlattenViewsHelper::getEntities ( ) const

Returns array of entity ids to create flattened views and section geometry.

◆ getExtents()

OdGeExtents3d OdDbFlattenViewsHelper::getExtents ( ) const

Returns 3d object extents of supported entity ids.

◆ getHiddenLines()

bool OdDbFlattenViewsHelper::getHiddenLines ( OdRxObjectPtrArray & arrHiddenLines,
bool bSetProperties ) const

Returns non-dbro hidden line geometry of created by createSectionHLR method flattened view geometry.

Parameters
arrHiddenLines[out] result entities.
bSetProperties[in] set curve properties to hidden geometry.
Remarks
Returns false if flattened view geometry was not created.

◆ getSectionHatches()

bool OdDbFlattenViewsHelper::getSectionHatches ( OdRxObjectPtrArray & arrHatches,
bool bSetProperties ) const

Returns non-dbro hatches of created by createSectionHLR method section.

Parameters
arrHatches[out] result entities.
bSetProperties[in] set hatch pattern settings to section hatches.
Remarks
Returns false if section geometry was not created.

◆ getVisibleLines()

bool OdDbFlattenViewsHelper::getVisibleLines ( OdRxObjectPtrArray & arrVisibleLines,
bool bSetProperties ) const

Returns non-dbro visible line geometry of created by createSectionHLR method flattened view geometry.

Parameters
arrVisibleLines[out] result entities.
bSetProperties[in] set curve properties to visible geometry.
Remarks
Returns false if flattened view geometry was not created.

◆ includeTangentalEdgesFlag()

bool OdDbFlattenViewsHelper::includeTangentalEdgesFlag ( ) const

Returns include tangental edges flag.

◆ obscuredCurveProperties()

const OdDbHLRCurveProperties & OdDbFlattenViewsHelper::obscuredCurveProperties ( ) const

Returns hidden edges geometry curve properties.

◆ projectionBase()

OdGePoint3d OdDbFlattenViewsHelper::projectionBase ( ) const

Returns base point to define section plane.

◆ projectionDirection()

OdGeVector3d OdDbFlattenViewsHelper::projectionDirection ( ) const

Returns normal vector of section plane and direction for flattened view and section creation.

◆ projectionUp()

OdGeVector3d OdDbFlattenViewsHelper::projectionUp ( ) const

Returns up vector direction for flattened view and section creation.

◆ sectionHatchSettings()

const OdDbSectionHatchPatternSettings & OdDbFlattenViewsHelper::sectionHatchSettings ( ) const

Returns section hatch settings.

◆ setEntities()

OdResult OdDbFlattenViewsHelper::setEntities ( const OdDbObjectIdArray & arr3dObjects)

Set entities to create flattened and section geometry.

Parameters
arr3dObjects[in] Array of object ids to be used in construction flattened view or section geometry.
Remarks
Returns eInvalidInput if no one entity from array is supported. Otherwise returns eOk. Method skip all non-supported entities.

◆ setForegroundCurveProperties()

void OdDbFlattenViewsHelper::setForegroundCurveProperties ( const OdDbHLRCurveProperties & curveProp)

Set visible edges geometry curve properties.

Parameters
curveSymb[in] visible edges curve properties

◆ setIncludeTangentalEdgesFlag()

void OdDbFlattenViewsHelper::setIncludeTangentalEdgesFlag ( bool bSet)

Set include tangental edges flag.

◆ setObscuredCurveProperties()

void OdDbFlattenViewsHelper::setObscuredCurveProperties ( const OdDbHLRCurveProperties & curveProp)

Set hidden edges geometry curve properties.

Parameters
curveSymb[in] hidden edges curve properties.

◆ setProjectionPlane()

OdResult OdDbFlattenViewsHelper::setProjectionPlane ( const OdGePoint3d & ptBase,
const OdGeVector3d & vrDir,
const OdGeVector3d & vrUp )

Set projection direction and section plane to create flattened and section geometry.

Parameters
ptBase[in] Base point to define section plane.
vrDir[in] Normal vector of section plane and direction for flattened view and section creation.
vrUp[in] Up vector direction for flattened view and section creation.
Remarks
Returns eInvalidInput if direction vector is zero length or up vector is not perpendicular to direction vector. Otherwise returns eOk.

◆ setSectionHatchSettings()

void OdDbFlattenViewsHelper::setSectionHatchSettings ( const OdDbSectionHatchPatternSettings & patternSettings)

Set section hatch settings.

Parameters
patternSettings[in] section hatch settings.

◆ setTangentalEdgesAngle()

void OdDbFlattenViewsHelper::setTangentalEdgesAngle ( double dAngle)

Set tangential edges angle.

Parameters
dAngle[in] The specified angle.

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