Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
More...
 
 STEPConstruct_ValidationProps (const Handle< XSControl_WorkSession > &WS)
 Creates a tool and loads it with worksession
More...
 
Standard_Boolean Init (const Handle< XSControl_WorkSession > &WS)
 Load worksession; returns True if succeeded
More...
 
Standard_Boolean AddProp (const TopoDS_Shape &Shape, const Handle< StepRepr_RepresentationItem > &Prop, const Standard_CString Descr, const Standard_Boolean instance=Standard_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
More...
 
Standard_Boolean AddProp (const StepRepr_CharacterizedDefinition &target, const Handle< StepRepr_RepresentationContext > &Context, const Handle< StepRepr_RepresentationItem > &Prop, const Standard_CString 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
More...
 
Standard_Boolean AddArea (const TopoDS_Shape &Shape, const Standard_Real Area)
 Adds surface area property for given shape (already mapped).
Returns True if success, False in case of fail
More...
 
Standard_Boolean AddVolume (const TopoDS_Shape &Shape, const Standard_Real Vol)
 Adds volume property for given shape (already mapped).
Returns True if success, False in case of fail
More...
 
Standard_Boolean AddCentroid (const TopoDS_Shape &Shape, const gp_Pnt &Pnt, const Standard_Boolean instance=Standard_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
More...
 
Standard_Boolean FindTarget (const TopoDS_Shape &S, StepRepr_CharacterizedDefinition &target, Handle< StepRepr_RepresentationContext > &Context, const Standard_Boolean instance=Standard_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
More...
 
Standard_Boolean LoadProps (TColStd_SequenceOfTransient &seq) const
 Searches for entities of the type PropertyDefinitionRepresentation
in the model and fills the sequence by them
More...
 
Handle_StepRepr_NextAssemblyUsageOccurrence GetPropNAUO (const Handle< StepRepr_PropertyDefinition > &PD) const
 Returns CDSR associated with given PpD or NULL if not found
(when, try GetPropSDR)
More...
 
Handle_StepBasic_ProductDefinition GetPropPD (const Handle< StepRepr_PropertyDefinition > &PD) const
 Returns SDR associated with given PpD or NULL if not found
(when, try GetPropCDSR)
More...
 
TopoDS_Shape GetPropShape (const Handle< StepBasic_ProductDefinition > &ProdDef) const
 Returns Shape associated with given SDR or Null Shape
if not found
More...
 
TopoDS_Shape GetPropShape (const Handle< StepRepr_PropertyDefinition > &PD) const
 Returns Shape associated with given PpD or Null Shape
if not found
More...
 
Standard_Boolean GetPropReal (const Handle< StepRepr_RepresentationItem > &item, Standard_Real &Val, Standard_Boolean &isArea) 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
More...
 
Standard_Boolean GetPropPnt (const Handle< StepRepr_RepresentationItem > &item, const Handle< StepRepr_RepresentationContext > &Context, gp_Pnt &Pnt) const
 Returns value of Centriod property (or False if it is not)
More...
 
void SetAssemblyShape (const TopoDS_Shape &shape)
 Sets current assembly shape SDR (for FindCDSR calls)
More...
 
- Public Member Functions inherited from STEPConstruct_Tool
 STEPConstruct_Tool ()
 Creates an empty tool
More...
 
 STEPConstruct_Tool (const Handle< XSControl_WorkSession > &WS)
 Creates a tool and loads it with worksession
More...
 
const
Handle_XSControl_WorkSession & 
WS () const
 Returns currently loaded WorkSession
More...
 
Handle_Interface_InterfaceModel Model () const
 Returns current model (Null if not loaded)
More...
 
const Interface_GraphGraph (const Standard_Boolean recompute=Standard_False) const
 Returns current graph (recomputing if necessary)
More...
 
const
Handle_Transfer_TransientProcess & 
TransientProcess () const
 Returns TransientProcess (reading; Null if not loaded)
More...
 
const
Handle_Transfer_FinderProcess & 
FinderProcess () const
 Returns FinderProcess (writing; Null if not loaded)
More...
 

Additional Inherited Members

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

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::STEPConstruct_ValidationProps ( )

Creates an empty tool

STEPConstruct_ValidationProps::STEPConstruct_ValidationProps ( const Handle< XSControl_WorkSession > &  WS)

Creates a tool and loads it with worksession

Member Function Documentation

Standard_Boolean STEPConstruct_ValidationProps::AddArea ( const TopoDS_Shape Shape,
const Standard_Real  Area 
)

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

Standard_Boolean STEPConstruct_ValidationProps::AddCentroid ( const TopoDS_Shape Shape,
const gp_Pnt Pnt,
const Standard_Boolean  instance = Standard_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

Standard_Boolean STEPConstruct_ValidationProps::AddProp ( const TopoDS_Shape Shape,
const Handle< StepRepr_RepresentationItem > &  Prop,
const Standard_CString  Descr,
const Standard_Boolean  instance = Standard_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

Standard_Boolean STEPConstruct_ValidationProps::AddProp ( const StepRepr_CharacterizedDefinition target,
const Handle< StepRepr_RepresentationContext > &  Context,
const Handle< StepRepr_RepresentationItem > &  Prop,
const Standard_CString  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

Standard_Boolean STEPConstruct_ValidationProps::AddVolume ( const TopoDS_Shape Shape,
const Standard_Real  Vol 
)

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

Standard_Boolean STEPConstruct_ValidationProps::FindTarget ( const TopoDS_Shape S,
StepRepr_CharacterizedDefinition target,
Handle< StepRepr_RepresentationContext > &  Context,
const Standard_Boolean  instance = Standard_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

Handle_StepRepr_NextAssemblyUsageOccurrence STEPConstruct_ValidationProps::GetPropNAUO ( const Handle< StepRepr_PropertyDefinition > &  PD) const

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

Handle_StepBasic_ProductDefinition STEPConstruct_ValidationProps::GetPropPD ( const Handle< StepRepr_PropertyDefinition > &  PD) const

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

Standard_Boolean STEPConstruct_ValidationProps::GetPropPnt ( const Handle< StepRepr_RepresentationItem > &  item,
const Handle< StepRepr_RepresentationContext > &  Context,
gp_Pnt Pnt 
) const

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

Standard_Boolean STEPConstruct_ValidationProps::GetPropReal ( const Handle< StepRepr_RepresentationItem > &  item,
Standard_Real Val,
Standard_Boolean isArea 
) 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

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

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

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

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

Standard_Boolean STEPConstruct_ValidationProps::Init ( const Handle< XSControl_WorkSession > &  WS)

Load worksession; returns True if succeeded

Standard_Boolean STEPConstruct_ValidationProps::LoadProps ( TColStd_SequenceOfTransient seq) const

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

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: