Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
STEPConstruct_ValidationProps Class Reference

This class provides tools for access (write and read) the validation properties on shapes in the STEP file. These are surface area, solid volume and centroid. More...

#include <STEPConstruct_ValidationProps.hxx>

Inheritance diagram for STEPConstruct_ValidationProps:
Inheritance graph
[legend]

Public Member Functions

 STEPConstruct_ValidationProps ()
 Creates an empty tool.
 
 STEPConstruct_ValidationProps (const occ::handle< XSControl_WorkSession > &WS)
 Creates a tool and loads it with worksession.
 
bool Init (const occ::handle< XSControl_WorkSession > &WS)
 Load worksession; returns True if succeeded.
 
bool AddProp (const TopoDS_Shape &Shape, const occ::handle< StepRepr_RepresentationItem > &Prop, const char *const Descr, const bool instance=false)
 General method for adding (writing) a validation property for shape which should be already mapped on writing itself. It uses FindTarget() to find target STEP entity resulting from given shape, and associated context Returns True if success, False in case of fail.
 
bool AddProp (const StepRepr_CharacterizedDefinition &target, const occ::handle< StepRepr_RepresentationContext > &Context, const occ::handle< StepRepr_RepresentationItem > &Prop, const char *const Descr)
 General method for adding (writing) a validation property for shape which should be already mapped on writing itself. It takes target and Context entities which correspond to shape Returns True if success, False in case of fail.
 
bool AddArea (const TopoDS_Shape &Shape, const double Area)
 Adds surface area property for given shape (already mapped). Returns True if success, False in case of fail.
 
bool AddVolume (const TopoDS_Shape &Shape, const double Vol)
 Adds volume property for given shape (already mapped). Returns True if success, False in case of fail.
 
bool AddCentroid (const TopoDS_Shape &Shape, const gp_Pnt &Pnt, const bool instance=false)
 Adds centroid property for given shape (already mapped). Returns True if success, False in case of fail If instance is True, then centroid is assigned to an instance of component in assembly.
 
bool FindTarget (const TopoDS_Shape &S, StepRepr_CharacterizedDefinition &target, occ::handle< StepRepr_RepresentationContext > &Context, const bool instance=false)
 Finds target STEP entity to which validation props should be assigned, and corresponding context, starting from shape Returns True if success, False in case of fail.
 
bool LoadProps (NCollection_Sequence< occ::handle< Standard_Transient > > &seq) const
 Searches for entities of the type PropertyDefinitionRepresentation in the model and fills the sequence by them.
 
occ::handle< StepRepr_NextAssemblyUsageOccurrenceGetPropNAUO (const occ::handle< StepRepr_PropertyDefinition > &PD) const
 Returns CDSR associated with given PpD or NULL if not found (when, try GetPropSDR)
 
occ::handle< StepBasic_ProductDefinitionGetPropPD (const occ::handle< StepRepr_PropertyDefinition > &PD) const
 Returns SDR associated with given PpD or NULL if not found (when, try GetPropCDSR)
 
TopoDS_Shape GetPropShape (const occ::handle< StepBasic_ProductDefinition > &ProdDef) const
 Returns Shape associated with given SDR or Null Shape if not found.
 
TopoDS_Shape GetPropShape (const occ::handle< StepRepr_PropertyDefinition > &PD) const
 Returns Shape associated with given PpD or Null Shape if not found.
 
bool GetPropReal (const occ::handle< StepRepr_RepresentationItem > &item, double &Val, bool &isArea, const StepData_Factors &theLocalFactors=StepData_Factors()) const
 Returns value of Real-Valued property (Area or Volume) If Property is neither Area nor Volume, returns False Else returns True and isArea indicates whether property is area or volume.
 
bool GetPropPnt (const occ::handle< StepRepr_RepresentationItem > &item, const occ::handle< StepRepr_RepresentationContext > &Context, gp_Pnt &Pnt, const StepData_Factors &theLocalFactors=StepData_Factors()) const
 Returns value of Centroid property (or False if it is not)
 
void SetAssemblyShape (const TopoDS_Shape &shape)
 Sets current assembly shape SDR (for FindCDSR calls)
 
- Public Member Functions inherited from STEPConstruct_Tool
 STEPConstruct_Tool ()
 Creates an empty tool.
 
 STEPConstruct_Tool (const occ::handle< XSControl_WorkSession > &WS)
 Creates a tool and loads it with worksession.
 
const occ::handle< XSControl_WorkSession > & WS () const
 Returns currently loaded WorkSession.
 
occ::handle< Interface_InterfaceModelModel () const
 Returns current model (Null if not loaded)
 
const Interface_GraphGraph (const bool recompute=false) const
 Returns current graph (recomputing if necessary)
 
const occ::handle< Transfer_TransientProcess > & TransientProcess () const
 Returns TransientProcess (reading; Null if not loaded)
 
const occ::handle< Transfer_FinderProcess > & FinderProcess () const
 Returns FinderProcess (writing; Null if not loaded)
 

Additional Inherited Members

- Protected Member Functions inherited from STEPConstruct_Tool
bool SetWS (const occ::handle< XSControl_WorkSession > &WS)
 Load worksession; returns True if succeeded Returns False if either FinderProcess of TransientProcess cannot be obtained or are Null.
 

Detailed Description

This class provides tools for access (write and read) the validation properties on shapes in the STEP file. These are surface area, solid volume and centroid.

Constructor & Destructor Documentation

◆ STEPConstruct_ValidationProps() [1/2]

STEPConstruct_ValidationProps::STEPConstruct_ValidationProps ( )

Creates an empty tool.

◆ STEPConstruct_ValidationProps() [2/2]

STEPConstruct_ValidationProps::STEPConstruct_ValidationProps ( const occ::handle< XSControl_WorkSession > & WS)

Creates a tool and loads it with worksession.

Member Function Documentation

◆ AddArea()

bool STEPConstruct_ValidationProps::AddArea ( const TopoDS_Shape & Shape,
const double Area )

Adds surface area property for given shape (already mapped). Returns True if success, False in case of fail.

◆ AddCentroid()

bool STEPConstruct_ValidationProps::AddCentroid ( const TopoDS_Shape & Shape,
const gp_Pnt & Pnt,
const bool instance = false )

Adds centroid property for given shape (already mapped). Returns True if success, False in case of fail If instance is True, then centroid is assigned to an instance of component in assembly.

◆ AddProp() [1/2]

bool STEPConstruct_ValidationProps::AddProp ( const StepRepr_CharacterizedDefinition & target,
const occ::handle< StepRepr_RepresentationContext > & Context,
const occ::handle< StepRepr_RepresentationItem > & Prop,
const char *const Descr )

General method for adding (writing) a validation property for shape which should be already mapped on writing itself. It takes target and Context entities which correspond to shape Returns True if success, False in case of fail.

◆ AddProp() [2/2]

bool STEPConstruct_ValidationProps::AddProp ( const TopoDS_Shape & Shape,
const occ::handle< StepRepr_RepresentationItem > & Prop,
const char *const Descr,
const bool instance = false )

General method for adding (writing) a validation property for shape which should be already mapped on writing itself. It uses FindTarget() to find target STEP entity resulting from given shape, and associated context Returns True if success, False in case of fail.

◆ AddVolume()

bool STEPConstruct_ValidationProps::AddVolume ( const TopoDS_Shape & Shape,
const double Vol )

Adds volume property for given shape (already mapped). Returns True if success, False in case of fail.

◆ FindTarget()

bool STEPConstruct_ValidationProps::FindTarget ( const TopoDS_Shape & S,
StepRepr_CharacterizedDefinition & target,
occ::handle< StepRepr_RepresentationContext > & Context,
const bool instance = false )

Finds target STEP entity to which validation props should be assigned, and corresponding context, starting from shape Returns True if success, False in case of fail.

◆ GetPropNAUO()

occ::handle< StepRepr_NextAssemblyUsageOccurrence > STEPConstruct_ValidationProps::GetPropNAUO ( const occ::handle< StepRepr_PropertyDefinition > & PD) const

Returns CDSR associated with given PpD or NULL if not found (when, try GetPropSDR)

◆ GetPropPD()

occ::handle< StepBasic_ProductDefinition > STEPConstruct_ValidationProps::GetPropPD ( const occ::handle< StepRepr_PropertyDefinition > & PD) const

Returns SDR associated with given PpD or NULL if not found (when, try GetPropCDSR)

◆ GetPropPnt()

bool STEPConstruct_ValidationProps::GetPropPnt ( const occ::handle< StepRepr_RepresentationItem > & item,
const occ::handle< StepRepr_RepresentationContext > & Context,
gp_Pnt & Pnt,
const StepData_Factors & theLocalFactors = StepData_Factors() ) const

Returns value of Centroid property (or False if it is not)

◆ GetPropReal()

bool STEPConstruct_ValidationProps::GetPropReal ( const occ::handle< StepRepr_RepresentationItem > & item,
double & Val,
bool & isArea,
const StepData_Factors & theLocalFactors = StepData_Factors() ) const

Returns value of Real-Valued property (Area or Volume) If Property is neither Area nor Volume, returns False Else returns True and isArea indicates whether property is area or volume.

◆ GetPropShape() [1/2]

TopoDS_Shape STEPConstruct_ValidationProps::GetPropShape ( const occ::handle< StepBasic_ProductDefinition > & ProdDef) const

Returns Shape associated with given SDR or Null Shape if not found.

◆ GetPropShape() [2/2]

TopoDS_Shape STEPConstruct_ValidationProps::GetPropShape ( const occ::handle< StepRepr_PropertyDefinition > & PD) const

Returns Shape associated with given PpD or Null Shape if not found.

◆ Init()

bool STEPConstruct_ValidationProps::Init ( const occ::handle< XSControl_WorkSession > & WS)

Load worksession; returns True if succeeded.

◆ LoadProps()

bool STEPConstruct_ValidationProps::LoadProps ( NCollection_Sequence< occ::handle< Standard_Transient > > & seq) const

Searches for entities of the type PropertyDefinitionRepresentation in the model and fills the sequence by them.

◆ SetAssemblyShape()

void STEPConstruct_ValidationProps::SetAssemblyShape ( const TopoDS_Shape & shape)

Sets current assembly shape SDR (for FindCDSR calls)


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