File indexing completed on 2026-09-15 09:17:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _STEPConstruct_ValidationProps_HeaderFile
0018 #define _STEPConstruct_ValidationProps_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <StepBasic_Unit.hxx>
0025 #include <STEPConstruct_Tool.hxx>
0026 #include <Standard_CString.hxx>
0027 #include <Standard_Transient.hxx>
0028 #include <NCollection_Sequence.hxx>
0029 class StepBasic_ProductDefinition;
0030 class XSControl_WorkSession;
0031 class TopoDS_Shape;
0032 class StepRepr_RepresentationItem;
0033 class StepRepr_CharacterizedDefinition;
0034 class StepRepr_RepresentationContext;
0035 class gp_Pnt;
0036 class StepRepr_NextAssemblyUsageOccurrence;
0037 class StepRepr_PropertyDefinition;
0038
0039
0040
0041
0042 class STEPConstruct_ValidationProps : public STEPConstruct_Tool
0043 {
0044 public:
0045 DEFINE_STANDARD_ALLOC
0046
0047
0048 Standard_EXPORT STEPConstruct_ValidationProps();
0049
0050
0051 Standard_EXPORT STEPConstruct_ValidationProps(const occ::handle<XSControl_WorkSession>& WS);
0052
0053
0054 Standard_EXPORT bool Init(const occ::handle<XSControl_WorkSession>& WS);
0055
0056
0057
0058
0059
0060
0061 Standard_EXPORT bool AddProp(const TopoDS_Shape& Shape,
0062 const occ::handle<StepRepr_RepresentationItem>& Prop,
0063 const char* const Descr,
0064 const bool instance = false);
0065
0066
0067
0068
0069
0070 Standard_EXPORT bool AddProp(const StepRepr_CharacterizedDefinition& target,
0071 const occ::handle<StepRepr_RepresentationContext>& Context,
0072 const occ::handle<StepRepr_RepresentationItem>& Prop,
0073 const char* const Descr);
0074
0075
0076
0077 Standard_EXPORT bool AddArea(const TopoDS_Shape& Shape, const double Area);
0078
0079
0080
0081 Standard_EXPORT bool AddVolume(const TopoDS_Shape& Shape, const double Vol);
0082
0083
0084
0085
0086
0087 Standard_EXPORT bool AddCentroid(const TopoDS_Shape& Shape,
0088 const gp_Pnt& Pnt,
0089 const bool instance = false);
0090
0091
0092
0093
0094 Standard_EXPORT bool FindTarget(const TopoDS_Shape& S,
0095 StepRepr_CharacterizedDefinition& target,
0096 occ::handle<StepRepr_RepresentationContext>& Context,
0097 const bool instance = false);
0098
0099
0100
0101 Standard_EXPORT bool LoadProps(NCollection_Sequence<occ::handle<Standard_Transient>>& seq) const;
0102
0103
0104
0105 Standard_EXPORT occ::handle<StepRepr_NextAssemblyUsageOccurrence> GetPropNAUO(
0106 const occ::handle<StepRepr_PropertyDefinition>& PD) const;
0107
0108
0109
0110 Standard_EXPORT occ::handle<StepBasic_ProductDefinition> GetPropPD(
0111 const occ::handle<StepRepr_PropertyDefinition>& PD) const;
0112
0113
0114
0115 Standard_EXPORT TopoDS_Shape
0116 GetPropShape(const occ::handle<StepBasic_ProductDefinition>& ProdDef) const;
0117
0118
0119
0120 Standard_EXPORT TopoDS_Shape
0121 GetPropShape(const occ::handle<StepRepr_PropertyDefinition>& PD) const;
0122
0123
0124
0125
0126
0127 Standard_EXPORT bool GetPropReal(
0128 const occ::handle<StepRepr_RepresentationItem>& item,
0129 double& Val,
0130 bool& isArea,
0131 const StepData_Factors& theLocalFactors = StepData_Factors()) const;
0132
0133
0134 Standard_EXPORT bool GetPropPnt(
0135 const occ::handle<StepRepr_RepresentationItem>& item,
0136 const occ::handle<StepRepr_RepresentationContext>& Context,
0137 gp_Pnt& Pnt,
0138 const StepData_Factors& theLocalFactors = StepData_Factors()) const;
0139
0140
0141 Standard_EXPORT void SetAssemblyShape(const TopoDS_Shape& shape);
0142
0143 private:
0144 StepBasic_Unit areaUnit;
0145 StepBasic_Unit volUnit;
0146 occ::handle<StepBasic_ProductDefinition> myAssemblyPD;
0147 };
0148
0149 #endif