STEPConstruct
OCCT package STEPConstruct: STEPConstruct, STEPConstruct_AP203Context, STEPConstruct_Assembly, STEPConstruct_ContextTool, and 7 more bound classes.
STEPConstruct
Defines tools for creation and investigation STEP constructs used for representing various kinds of data, such as product and assembly structure, unit contexts, associated information The creation of these structures is made according to currently active schema (AP203 or AP214 CD2 or DIS) This is taken from parameter write.step.schema.
Constructors(1)
Static methods(4)
- FindEntity(FinderProcess: Transfer_FinderProcess, Shape: TopoDS_Shape): StepRepr_RepresentationItem
Returns STEP entity of the (sub)type of RepresentationItem which is a result of the translation of the Shape, or Null if no result is recorded.
Parameters (2)FinderProcessShape
- FindEntity(FinderProcess: Transfer_FinderProcess, Shape: TopoDS_Shape, Loc: TopLoc_Location): StepRepr_RepresentationItem
The same as above, but in the case if item not found, repeats search on the same shape without location. The Loc corresponds to the location with which result is found (either location of the Shape, or Null).
Parameters (3)FinderProcessShapeLoc—Mutated in place; read the updated value from this argument after the call.
- FindShape(TransientProcess: Transfer_TransientProcess, item: StepRepr_RepresentationItem): TopoDS_Shape
Returns Shape resulting from given STEP entity (Null if not mapped).
Parameters (2)TransientProcessitem
- FindCDSR(ComponentBinder: Transfer_Binder, AssemblySDR: StepShape_ShapeDefinitionRepresentation): { returnValue: boolean; ComponentCDSR: StepShape_ContextDependentShapeRepresentation; [Symbol.dispose](): void }
Find CDSR corresponding to the component in the specified assembly.
Parameters (2)ComponentBinderAssemblySDR
ReturnsA result object with fields:
returnValue: the C++ return valueComponentCDSR: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
STEPConstruct_AP203Context
Maintains context specific for AP203 (required data and management information such as persons, dates, approvals etc.) It contains static entities (which can be shared), default values for person and organisation, and also provides tool for creating management entities around specific part (SDR).
Constructors(1)
Creates tool and fills constant fields.
Instance methods(34)
Returns default approval entity which is used when no other data are available.
- SetDefaultApproval(app: StepBasic_Approval): void
Sets default approval.
Parameters (1)app
Returns default date_and_time entity which is used when no other data are available.
- SetDefaultDateAndTime(dt: StepBasic_DateAndTime): void
Sets default date_and_time entity.
Parameters (1)dt
Returns default person_and_organization entity which is used when no other data are available.
Sets default person_and_organization entity.
Parameters (1)po
Returns default security_classification_level entity which is used when no other data are available.
Sets default security_classification_level.
Parameters (1)sc
Return predefined PersonAndOrganizationRole and DateTimeRole entities named 'creator', 'design owner', 'design supplier', 'classification officer', 'creation date', 'classification date', 'approver'.
- Init(sdr: StepShape_ShapeDefinitionRepresentation): void
Takes SDR (part) which brings all standard data around part (common for AP203 and AP214) and creates all the additional entities required for AP203.
Parameters (1)sdr
- Init(SDRTool: STEPConstruct_Part): void
Takes tool which describes standard data around part (common for AP203 and AP214) and creates all the additional entities required for AP203.
The created entities can be obtained by calls to methodsGetCreator(),GetDesignOwner(),GetDesignSupplier(),GetClassificationOfficer(),GetSecurity(),GetCreationDate(),GetClassificationDate(),GetApproval(),GetApprover(),GetApprovalDateTime(),GetProductCategoryRelationship()Parameters (1)SDRTool
- Init(nauo: StepRepr_NextAssemblyUsageOccurrence): void
Takes NAUO which describes assembly link to component and creates the security_classification entity associated to it as required by the AP203.
Instantiated (or existing previously) entities concerned can be obtained by calls to methodsGetClassificationOfficer(),GetSecurity(),GetClassificationDate(),GetApproval(),GetApprover(),GetApprovalDateTime()Takes tool which describes standard data around part (common for AP203 and AP214) and takes from model (or creates if missing) all the additional entities required by AP203Parameters (1)nauo
Return entities (roots) instantiated for the part by method Init.
- Clear(): void
Clears all fields describing entities specific to each part.
- InitRoles(): void
Initializes constant fields (shared entities).
- InitAssembly(nauo: StepRepr_NextAssemblyUsageOccurrence): void
Initializes all missing data which are required for assembly.
Parameters (1)nauo
- InitSecurityRequisites(): void
Initializes ClassificationOfficer and ClassificationDate entities according to Security entity.
- InitApprovalRequisites(): void
Initializes Approver and ApprovalDateTime entities according to Approval entity.
STEPConstruct_Assembly
This operator creates and checks an item of an assembly, from its basic data : a ShapeRepresentation, a Location ...
Three ways of coding such item from a ShapeRepresentation :
- do nothing : i.e. information for assembly are ignored
- create a MappedItem
- create a RepresentationRelationship (WithTransformation)
Constructors(1)
Instance methods(5)
- Init(theSR: StepShape_ShapeDefinitionRepresentation, theSDR0: StepShape_ShapeDefinitionRepresentation, theTrsfOp: StepGeom_CartesianTransformationOperator3d): void
Initialises with starting values theTrsfOp : local transformation to apply, may have scaling factor Makes a MappedItem Resulting Value is returned by ItemValue.
Parameters (3)theSRtheSDR0theTrsfOp
- MakeRelationship(): void
Make a (ShapeRepresentationRelationship,...WithTransformation) Resulting Value is returned by ItemValue.
Returns the Value If no Make... has been called, returns the starting SR.
Returns the location of the item, computed from starting aLoc.
Returns NAUO object describing the assembly link.
STEPConstruct_ContextTool
Maintains global context tool for writing. Gives access to Product Definition Context (one per Model) Maintains ApplicationProtocolDefinition entity (common for all products) Also maintains context specific for AP203 and provides set of methods to work with various STEP constructs as required by Actor.
Constructors(2)
- constructor(aStepModel: StepData_StepModel): STEPConstruct_ContextToolParameters (1)
aStepModel
Instance methods(28)
- SetModel(aStepModel: StepData_StepModel): void
Initialize ApplicationProtocolDefinition by the first entity of that type found in the model.
Parameters (1)aStepModel
- SetGlobalFactor(theGlobalFactor: StepData_Factors): voidParameters (1)
theGlobalFactor
- AddAPD(enforce?: boolean): voidParameters (1)
enforce
- IsAP203(): boolean
Returns True if APD.schema_name is config_control_design.
- IsAP214(): boolean
Returns True if APD.schema_name is automotive_design.
- IsAP242(): boolean
Returns True if APD.schema_name is ap242_managed_model_based_3d_engineering.
- GetACyear(): number
- SetACstatus(status: TCollection_HAsciiString): voidParameters (1)
status
- SetACschemaName(schemaName: TCollection_HAsciiString): voidParameters (1)
schemaName
- SetACyear(year: number): voidParameters (1)
year
- SetACname(name: TCollection_HAsciiString): voidParameters (1)
name
Returns a default axis placement.
Returns tool which maintains context specific for AP203.
- Level(): number
Returns current assembly level.
- NextLevel(): void
- PrevLevel(): void
- SetLevel(lev: number): void
Changes current assembly level.
Parameters (1)lev
- Index(): number
Returns current index of assembly component on current level.
- NextIndex(): void
- PrevIndex(): void
- SetIndex(ind: number): void
Changes current index of assembly component on current level.
Parameters (1)ind
Generates a product name basing on write.step.product.name parameter and current position in the assembly structure.
Produces and returns a full list of root entities required for part identified by SDRTool (including SDR itself).
Parameters (1)SDRTool
- GetRootsForAssemblyLink(assembly: STEPConstruct_Assembly): NCollection_HSequence_handle_Standard_Transient
Produces and returns a full list of root entities required for assembly link identified by assembly (including NAUO and CDSR).
Parameters (1)assembly
STEPConstruct_ExternRefs
Provides a tool for analyzing (reading) and creating (writing) references to external files in STEP.
It maintains a data structure in the form of sequences of relevant STEP entities (roots), allowing either to create them by convenient API, or load from existing model and investigate
Constructors(2)
Creates an empty tool.
Creates a tool and initializes it.
Parameters (1)WS
Instance methods(13)
- Init(WS: XSControl_WorkSession): boolean
Initializes tool; returns True if succeeded.
Parameters (1)WS
- Clear(): void
Clears internal fields (list of defined extern refs).
- LoadExternRefs(): boolean
Searches current STEP model for external references and loads them to the internal data structures NOTE: does not clear data structures before loading.
- NbExternRefs(): number
Returns number of defined extern references.
- FileName(num: number): string
Returns filename for numth extern reference Returns Null if FileName is not defined or bad.
Parameters (1)num
- ProdDef(num: number): StepBasic_ProductDefinition
Returns ProductDefinition to which numth extern reference is associated. Returns Null if cannot be detected or if extern reference is not associated to SDR in a proper way.
Parameters (1)num
- DocFile(num: number): StepBasic_DocumentFile
Returns DocumentFile to which numth extern reference is associated. Returns Null if cannot be detected.
Parameters (1)num
- Format(num: number): TCollection_HAsciiString
Returns format identification string for the extern document Returns Null handle if format is not defined.
Parameters (1)num
- AddExternRef(filename: string, PD: StepBasic_ProductDefinition, format: string): number
Create a new external reference with specified attributes attached to a given SDR <format> can be Null string, in that case this information is not written. Else, it can be "STEP AP214" or "STEP AP203" Returns index of a new extern ref.
Parameters (3)filenamePDformat
- WriteExternRefs(num: number): number
Adds all the currently defined external refs to the model Returns number of written extern refs.
Parameters (1)num
- SetAP214APD(APD: StepBasic_ApplicationProtocolDefinition): void
Set the ApplicationProtocolDefinition of the PDM schema.
Parameters (1)APD
Returns the ApplicationProtocolDefinition of the PDM schema NOTE: if not defined then create new APD with new Application Context.
STEPConstruct_Part
Provides tools for creating STEP structures associated with part (SDR), such as PRODUCT, PDF etc., as required by current schema Also allows to investigate and modify this data.
Constructors(1)
Instance methods(43)
- MakeSDR(aShape: StepShape_ShapeRepresentation, aName: TCollection_HAsciiString, AC: StepBasic_ApplicationContext, theStepModel: StepData_StepModel): voidParameters (4)
aShapeaNameACtheStepModel
- ReadSDR(aShape: StepShape_ShapeDefinitionRepresentation): voidParameters (1)
aShape
- IsDone(): boolean
Returns SDR or Null if not done.
Returns SDR->UsedRepresentation() or Null if not done.
- SetPCname(name: TCollection_HAsciiString): voidParameters (1)
name
- SetPCdisciplineType(label: TCollection_HAsciiString): voidParameters (1)
label
- SetACapplication(text: TCollection_HAsciiString): voidParameters (1)
text
- SetPDCname(label: TCollection_HAsciiString): voidParameters (1)
label
- SetPDCstage(label: TCollection_HAsciiString): voidParameters (1)
label
- SetPid(id: TCollection_HAsciiString): voidParameters (1)
id
- SetPname(label: TCollection_HAsciiString): voidParameters (1)
label
- SetPdescription(text: TCollection_HAsciiString): voidParameters (1)
text
- SetPDFid(id: TCollection_HAsciiString): voidParameters (1)
id
- SetPDFdescription(text: TCollection_HAsciiString): voidParameters (1)
text
- SetPDdescription(text: TCollection_HAsciiString): voidParameters (1)
text
- SetPDSname(label: TCollection_HAsciiString): voidParameters (1)
label
- SetPDSdescription(text: TCollection_HAsciiString): voidParameters (1)
text
- SetPRPCname(label: TCollection_HAsciiString): voidParameters (1)
label
- SetPRPCdescription(text: TCollection_HAsciiString): voidParameters (1)
text
STEPConstruct_RenderingProperties
Class for working with STEP rendering properties. Provides functionality to create and manipulate rendering properties used for specifying visual appearance in STEP format. This class handles both parsing of STEP entities and creation of new ones.
Constructors(7)
Default constructor creating an empty rendering properties object.
- constructor(theRenderingProperties: StepVisual_SurfaceStyleRenderingWithProperties): STEPConstruct_RenderingProperties
Constructor from STEP rendering properties entity. Extracts color, transparency, and other properties from the STEP entity.
Parameters (1)theRenderingProperties—rendering properties entity
- constructor(theRGBAColor: Quantity_ColorRGBA): STEPConstruct_RenderingProperties
Constructor from RGBA color. Creates rendering properties with the given color and transparency.
Parameters (1)theRGBAColor—color with transparency
Constructor from
XCAFDoc_VisMaterial. Creates rendering properties using material properties from the OCCT material.Parameters (1)theMaterial—visualization material properties
- constructor(theMaterial: XCAFDoc_VisMaterial): STEPConstruct_RenderingProperties
Constructor from
XCAFDoc_VisMaterial. Creates rendering properties using material properties from the OCCT material.Parameters (1)theMaterial—visualization material properties
- constructor(theColor: StepVisual_Colour, theTransparency: number): STEPConstruct_RenderingProperties
Constructor from STEP color and transparency value. Creates rendering properties with the given color and transparency.
Parameters (2)theColor—colortheTransparency—transparency value
- constructor(theSurfaceColor: Quantity_Color, theTransparency?: number): STEPConstruct_RenderingProperties
Constructor from surface color, transparency, and rendering method.
Parameters (2)theSurfaceColor—surface colortheTransparency—transparency value
Instance methods(29)
- Init(theRenderingProperties: StepVisual_SurfaceStyleRenderingWithProperties): void
Initializes from STEP rendering properties entity. Extracts color, transparency, and other properties from the STEP entity.
Parameters (1)theRenderingProperties—rendering properties entity
- Init(theRGBAColor: Quantity_ColorRGBA): void
Initializes from RGBA color.
Parameters (1)theRGBAColor—color with transparency
- Init(theMaterial: XCAFDoc_VisMaterialCommon): void
Initializes from
XCAFDoc_VisMaterial.Parameters (1)theMaterial—visualization material properties
- Init(theMaterial: XCAFDoc_VisMaterial): void
Initializes from
XCAFDoc_VisMaterial.Parameters (1)theMaterial—visualization material properties
- Init(theColor: StepVisual_Colour, theTransparency: number): void
Initializes from STEP color and transparency value.
Parameters (2)theColor—STEP color entitytheTransparency—transparency value
- Init(theSurfaceColor: Quantity_Color, theTransparency: number): void
Initializes from surface color, transparency and rendering method.
Parameters (2)theSurfaceColor—surface colortheTransparency—transparency value
- SetAmbientReflectance(theAmbientReflectance: number): void
Sets ambient reflectance value.
Parameters (1)theAmbientReflectance—ambient reflectance value
- SetAmbientAndDiffuseReflectance(theAmbientReflectance: number, theDiffuseReflectance: number): void
Sets ambient and diffuse reflectance values.
Parameters (2)theAmbientReflectance—ambient reflectance valuetheDiffuseReflectance—diffuse reflectance value
- SetAmbientDiffuseAndSpecularReflectance(theAmbientReflectance: number, theDiffuseReflectance: number, theSpecularReflectance: number, theSpecularExponent: number, theSpecularColour: Quantity_Color): void
Sets ambient, diffuse and specular reflectance values.
Parameters (5)theAmbientReflectance—ambient reflectance valuetheDiffuseReflectance—diffuse reflectance valuetheSpecularReflectance—specular reflectance valuetheSpecularExponent—specular exponent valuetheSpecularColour—specular color
Creates and returns rendering properties entity.
Returnscreated rendering properties entity
- CreateRenderingProperties(theRenderColour: StepVisual_Colour): StepVisual_SurfaceStyleRenderingWithPropertiesParameters (1)
theRenderColour—color to be used for rendering
Returnscreated rendering properties entity
Creates and returns XCAF material entity.
Returnscreated XCAF material entity
Creates the ColorRGBA object from the current color and transparency.
ReturnsColorRGBA object
Returns surface color.
Returnssurface color
- Transparency(): number
Returns transparency value.
Returnstransparency value
Returns rendering method.
Returnsrendering method
- SetRenderingMethod(theRenderingMethod: StepVisual_ShadingSurfaceMethod): void
Sets rendering method.
Parameters (1)theRenderingMethod—rendering method
- IsDefined(): boolean
Returns whether the rendering properties are defined.
Returnstrue if defined, false otherwise
- IsMaterialConvertible(): boolean
Returns whether material is convertible to STEP.
Returnstrue if fully defined for conversion, false otherwise
- AmbientReflectance(): number
Returns ambient reflectance value.
Returnsambient reflectance value
- IsAmbientReflectanceDefined(): boolean
Returns whether ambient reflectance is defined.
Returnstrue if defined, false otherwise
- DiffuseReflectance(): number
Returns diffuse reflectance value.
Returnsdiffuse reflectance value
- IsDiffuseReflectanceDefined(): boolean
Returns whether diffuse reflectance is defined.
Returnstrue if defined, false otherwise
- SpecularReflectance(): number
Returns specular reflectance value.
Returnsspecular reflectance value
- IsSpecularReflectanceDefined(): boolean
Returns whether specular reflectance is defined.
Returnstrue if defined, false otherwise
- SpecularExponent(): number
Returns specular exponent value.
Returnsspecular exponent value
- IsSpecularExponentDefined(): boolean
Returns whether specular exponent is defined.
Returnstrue if defined, false otherwise
Returns specular color.
Returnsspecular color
- IsSpecularColourDefined(): boolean
Returns whether specular color is defined.
Returnstrue if defined, false otherwise
STEPConstruct_Styles
Provides a mechanism for reading and writing shape styles (such as color) to and from the STEP file This tool maintains a list of styles, either taking them from STEP model (reading), or filling it by calls to AddStyle or directly (writing). Some methods deal with general structures of styles and presentations in STEP, but there are methods which deal with particular implementation of colors (as described in RP).
Constructors(2)
Creates an empty tool.
Creates a tool and initializes it.
Parameters (1)WS
Static methods(3)
Create STEP color entity by given
Quantity_ColorThe analysis is performed for whether the color corresponds to one of standard colors predefined in STEP. In that case, PredefinedColour entity is created instead of RGBColour.Parameters (1)Col
- EncodeColor(Col: Quantity_Color, DPDCs: NCollection_DataMap_TCollection_AsciiString_handle_Standard_Transient, ColRGBs: NCollection_DataMap_gp_Pnt_handle_Standard_Transient): StepVisual_Colour
Create STEP color entity by given
Quantity_ColorThe analysis is performed for whether the color corresponds to one of standard colors predefined in STEP. In that case, PredefinedColour entity is created instead of RGBColour.Parameters (3)ColDPDCs—Mutated in place; read the updated value from this argument after the call.ColRGBs—Mutated in place; read the updated value from this argument after the call.
- DecodeColor(Colour: StepVisual_Colour, Col: Quantity_Color): boolean
Decodes STEP color and fills the
Quantity_Color. Returns True if OK or False if color is not recognized.Parameters (2)ColourCol—Mutated in place; read the updated value from this argument after the call.
Instance methods(17)
- Init(WS: XSControl_WorkSession): boolean
Initializes tool; returns True if succeeded.
Parameters (1)WS
- NbStyles(): number
Returns number of defined styles.
- Style(i: number): StepVisual_StyledItem
Returns style with given index.
Parameters (1)i
- NbRootStyles(): number
Returns number of override styles.
- RootStyle(i: number): StepVisual_StyledItem
Returns override style with given index.
Parameters (1)i
- ClearStyles(): void
Clears all defined styles and PSA sequence.
- AddStyle(style: StepVisual_StyledItem): void
Adds a style to a sequence.
Parameters (1)style
- AddStyle(item: StepRepr_RepresentationItem, PSA: StepVisual_PresentationStyleAssignment, Override: StepVisual_StyledItem): StepVisual_StyledItem
Create a style linking giving PSA to the item, and add it to the sequence of stored styles. If Override is not Null, then the resulting style will be of the subtype OverridingStyledItem.
Parameters (3)itemPSAOverride
- AddStyle(Shape: TopoDS_Shape, PSA: StepVisual_PresentationStyleAssignment, Override: StepVisual_StyledItem): StepVisual_StyledItem
Create a style linking giving PSA to the Shape, and add it to the sequence of stored styles. If Override is not Null, then the resulting style will be of the subtype OverridingStyledItem. The Sape is used to find corresponding STEP entity by call to
STEPConstruct::FindEntity(), then previous method is called.Parameters (3)ShapePSAOverride
- CreateMDGPR(Context: StepRepr_RepresentationContext): { returnValue: boolean; MDGPR: StepVisual_MechanicalDesignGeometricPresentationRepresentation; theStepModel: StepData_StepModel; [Symbol.dispose](): void }
Create MDGPR, fill it with all the styles previously defined, and add it to the model.
Parameters (1)Context
ReturnsA result object with fields:
returnValue: the C++ return valueMDGPR: owned by the returned envelope.theStepModel: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- CreateNAUOSRD(Context: StepRepr_RepresentationContext, CDSR: StepShape_ContextDependentShapeRepresentation, initPDS: StepRepr_ProductDefinitionShape): boolean
Create MDGPR, fill it with all the styles previously defined, and add it to the model IMPORTANT: <initPDS> must be null when use for NAUO colors <initPDS> initialised only for SHUO case.
Parameters (3)ContextCDSRinitPDS
Searches the STEP model for the RepresentationContext in which given shape is defined. This context (if found) can be used then in call to
CreateMDGPR().Parameters (1)Shape
- LoadStyles(): boolean
Searches the STEP model for the MDGPR or DM entities (which bring styles) and fills sequence of styles.
- LoadInvisStyles(): { returnValue: boolean; InvSyles: NCollection_HSequence_handle_Standard_Transient; [Symbol.dispose](): void }
Searches the STEP model for the INISIBILITY entities (which bring styles) and fills out sequence of styles.
ReturnsA result object with fields:
returnValue: the C++ return valueInvSyles: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- MakeColorPSA(item: StepRepr_RepresentationItem, SurfCol: StepVisual_Colour, CurveCol: StepVisual_Colour, theRenderingProps: STEPConstruct_RenderingProperties, isForNAUO?: boolean): StepVisual_PresentationStyleAssignment
Create a PresentationStyleAssignment entity which defines two colors (for filling surfaces and curves) if isForNAUO true then returns PresentationStyleByContext.
Parameters (5)itemSurfColCurveColtheRenderingPropsisForNAUO
- GetColorPSA(item: StepRepr_RepresentationItem, Col: StepVisual_Colour): StepVisual_PresentationStyleAssignment
Returns a PresentationStyleAssignment entity which defines surface and curve colors as Col. This PSA is either created or taken from internal map where all PSAs created by this method are remembered.
Parameters (2)itemCol
- GetColors(theStyle: StepVisual_StyledItem, theRenderingProps: STEPConstruct_RenderingProperties, theIsComponent: boolean): { returnValue: boolean; theSurfaceColour: StepVisual_Colour; theBoundaryColour: StepVisual_Colour; theCurveColour: StepVisual_Colour; theIsComponent: boolean; [Symbol.dispose](): void }
Extract color definitions from the style entity For each type of color supported, result can be either NULL if it is not defined by that style, or last definition (if they are 1 or more).
Parameters (3)theStyletheRenderingProps—Mutated in place; read the updated value from this argument after the call.theIsComponent
ReturnsA result object with fields:
returnValue: the C++ return valuetheSurfaceColour: owned by the returned envelope.theBoundaryColour: owned by the returned envelope.theCurveColour: owned by the returned envelope.theIsComponent: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
STEPConstruct_Tool
Provides basic functionalities for tools which are intended for encoding/decoding specific STEP constructs.
It is initialized by WorkSession and allows easy access to its fields and internal data such as Model, TP and FP
NOTE: Call to method Graph() with True (or for a first time, if you have updated the model since last computation of model) can take a time, so it is recommended to avoid creation of this (and derived) tool multiple times
Constructors(2)
Creates an empty tool.
Creates a tool and loads it with worksession.
Parameters (1)WS
Instance methods(3)
Returns current model (Null if not loaded).
Returns TransientProcess (reading; Null if not loaded).
Returns FinderProcess (writing; Null if not loaded).
STEPConstruct_UnitContext
Tool for creation (encoding) and decoding (for writing and reading accordingly) context defining units and tolerances (uncerntanties).
Constructors(1)
Creates empty tool.
Static methods(1)
- ConvertSiPrefix(aPrefix: StepBasic_SiPrefix): number
Convert SI prefix defined by enumeration to corresponding real factor (e.g. 1e6 for mega).
Parameters (1)aPrefix
Instance methods(19)
- Init(Tol3d: number, theModel: StepData_StepModel, theLocalFactors?: StepData_Factors): void
Creates new context (units are MM and radians, uncertainty equal to Tol3d).
Parameters (3)Tol3dtheModeltheLocalFactors
- IsDone(): boolean
Returns True if Init was called successfully.
Returns context (or Null if not done).
- ComputeFactors(aContext: StepRepr_GlobalUnitAssignedContext, theLocalFactors: StepData_Factors): number
Computes the length, plane angle and solid angle conversion factor. Returns a status, 0 if OK.
Parameters (2)aContexttheLocalFactors
- ComputeFactors(aUnit: StepBasic_NamedUnit, theLocalFactors: StepData_Factors): numberParameters (2)
aUnittheLocalFactors
- ComputeTolerance(aContext: StepRepr_GlobalUncertaintyAssignedContext): number
Computes the uncertainty value (for length).
Parameters (1)aContext
- LengthFactor(): number
Returns the lengthFactor.
- PlaneAngleFactor(): number
Returns the planeAngleFactor.
- SolidAngleFactor(): number
Returns the solidAngleFactor.
- Uncertainty(): number
Returns the Uncertainty value (for length) It has been converted with LengthFactor.
- AreaFactor(): number
Returns the areaFactor.
- VolumeFactor(): number
Returns the volumeFactor.
- HasUncertainty(): boolean
Tells if a Uncertainty (for length) is recorded.
- LengthDone(): boolean
Returns true if ComputeFactors has calculated a LengthFactor.
- PlaneAngleDone(): boolean
Returns true if ComputeFactors has calculated a PlaneAngleFactor.
- SolidAngleDone(): boolean
Returns true if ComputeFactors has calculated a SolidAngleFactor.
- AreaDone(): boolean
Returns true if areaFactor is computed.
- VolumeDone(): boolean
Returns true if volumeFactor is computed.
- StatusMessage(status: number): string
Returns a message for a given status (0 - empty) This message can then be added as warning for transfer.
Parameters (1)status
STEPConstruct_ValidationProps
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.
Constructors(2)
Creates an empty tool.
Creates a tool and loads it with worksession.
Parameters (1)WS
Instance methods(15)
- Init(WS: XSControl_WorkSession): boolean
Load worksession; returns True if succeeded.
Parameters (1)WS
- AddProp(Shape: TopoDS_Shape, Prop: StepRepr_RepresentationItem, Descr: string, instance: boolean): boolean
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.Parameters (4)ShapePropDescrinstance
- AddProp(target: StepRepr_CharacterizedDefinition, Context: StepRepr_RepresentationContext, Prop: StepRepr_RepresentationItem, Descr: string): boolean
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.
Parameters (4)targetContextPropDescr
- AddArea(Shape: TopoDS_Shape, Area: number): boolean
Adds surface area property for given shape (already mapped). Returns True if success, False in case of fail.
Parameters (2)ShapeArea
- AddVolume(Shape: TopoDS_Shape, Vol: number): boolean
Adds volume property for given shape (already mapped). Returns True if success, False in case of fail.
Parameters (2)ShapeVol
- AddCentroid(Shape: TopoDS_Shape, Pnt: gp_Pnt, instance?: boolean): boolean
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.
Parameters (3)ShapePntinstance
- FindTarget(S: TopoDS_Shape, target: StepRepr_CharacterizedDefinition, instance: boolean): { returnValue: boolean; Context: StepRepr_RepresentationContext; [Symbol.dispose](): void }
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.
Parameters (3)Starget—Mutated in place; read the updated value from this argument after the call.instance
ReturnsA result object with fields:
returnValue: the C++ return valueContext: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- LoadProps(seq: NCollection_Sequence_handle_Standard_Transient): boolean
Searches for entities of the type PropertyDefinitionRepresentation in the model and fills the sequence by them.
Parameters (1)seq—Mutated in place; read the updated value from this argument after the call.
Returns CDSR associated with given PpD or NULL if not found (when, try GetPropSDR).
Parameters (1)PD
Returns SDR associated with given PpD or NULL if not found (when, try GetPropCDSR).
Parameters (1)PD
- GetPropShape(ProdDef: StepBasic_ProductDefinition): TopoDS_Shape
Returns Shape associated with given SDR or Null Shape if not found.
Parameters (1)ProdDef
Returns Shape associated with given PpD or Null Shape if not found.
Parameters (1)PD
- GetPropReal(item: StepRepr_RepresentationItem, Val: number, isArea: boolean, theLocalFactors: StepData_Factors): { returnValue: boolean; Val: number; isArea: boolean }
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.
Parameters (4)itemValisAreatheLocalFactors
ReturnsA result object with fields:
returnValue: the C++ return valueVal: updated value from the call.isArea: updated value from the call.
- GetPropPnt(item: StepRepr_RepresentationItem, Context: StepRepr_RepresentationContext, Pnt: gp_Pnt, theLocalFactors: StepData_Factors): boolean
Returns value of Centroid property (or False if it is not).
Parameters (4)itemContextPnt—Mutated in place; read the updated value from this argument after the call.theLocalFactors
- SetAssemblyShape(shape: TopoDS_Shape): void
Sets current assembly shape SDR (for FindCDSR calls).
Parameters (1)shape
STEPCAFControl
OCCT package STEPCAFControl: STEPCAFControl_ActorWrite, STEPCAFControl_Controller, STEPCAFControl_ExternFile, STEPCAFControl_Reader, and 1 more bound classes.
STEPControl
OCCT package STEPControl: STEPControl_ActorRead, STEPControl_ActorWrite, STEPControl_Controller, STEPControl_Reader, and 2 more bound classes.