File indexing completed on 2025-01-18 10:05:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _STEPConstruct_UnitContext_HeaderFile
0018 #define _STEPConstruct_UnitContext_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_Integer.hxx>
0025 #include <Standard_CString.hxx>
0026 #include <StepBasic_SiPrefix.hxx>
0027 class StepData_Factors;
0028 class StepData_StepModel;
0029 class StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx;
0030 class StepRepr_GlobalUnitAssignedContext;
0031 class StepBasic_NamedUnit;
0032 class StepRepr_GlobalUncertaintyAssignedContext;
0033 class StepBasic_SiUnit;
0034
0035
0036
0037
0038 class STEPConstruct_UnitContext
0039 {
0040 public:
0041
0042 DEFINE_STANDARD_ALLOC
0043
0044
0045
0046 Standard_EXPORT STEPConstruct_UnitContext();
0047
0048
0049
0050 Standard_EXPORT void Init (const Standard_Real Tol3d,
0051 const Handle(StepData_StepModel)& theModel,
0052 const StepData_Factors& theLocalFactors);
0053
0054
0055 Standard_EXPORT Standard_Boolean IsDone() const;
0056
0057
0058 Standard_EXPORT Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx) Value() const;
0059
0060
0061
0062 Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepRepr_GlobalUnitAssignedContext)& aContext,
0063 const StepData_Factors& theLocalFactors);
0064
0065 Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepBasic_NamedUnit)& aUnit,
0066 const StepData_Factors& theLocalFactors);
0067
0068
0069 Standard_EXPORT Standard_Integer ComputeTolerance (const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aContext);
0070
0071
0072 Standard_EXPORT Standard_Real LengthFactor() const;
0073
0074
0075 Standard_EXPORT Standard_Real PlaneAngleFactor() const;
0076
0077
0078 Standard_EXPORT Standard_Real SolidAngleFactor() const;
0079
0080
0081
0082 Standard_EXPORT Standard_Real Uncertainty() const;
0083
0084
0085 Standard_EXPORT Standard_Real AreaFactor() const;
0086
0087
0088 Standard_EXPORT Standard_Real VolumeFactor() const;
0089
0090
0091 Standard_EXPORT Standard_Boolean HasUncertainty() const;
0092
0093
0094
0095 Standard_EXPORT Standard_Boolean LengthDone() const;
0096
0097
0098
0099 Standard_EXPORT Standard_Boolean PlaneAngleDone() const;
0100
0101
0102
0103 Standard_EXPORT Standard_Boolean SolidAngleDone() const;
0104
0105
0106 Standard_EXPORT Standard_Boolean AreaDone() const;
0107
0108
0109 Standard_EXPORT Standard_Boolean VolumeDone() const;
0110
0111
0112
0113 Standard_EXPORT Standard_CString StatusMessage (const Standard_Integer status) const;
0114
0115
0116
0117 Standard_EXPORT static Standard_Real ConvertSiPrefix (const StepBasic_SiPrefix aPrefix);
0118
0119
0120
0121
0122 protected:
0123
0124
0125
0126
0127
0128 private:
0129
0130
0131
0132
0133 Standard_EXPORT Standard_Boolean SiUnitNameFactor (const Handle(StepBasic_SiUnit)& aSiUnit, Standard_Real& val) const;
0134
0135
0136 Standard_Boolean done;
0137 Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx) GRC;
0138 Standard_Real lengthFactor;
0139 Standard_Real planeAngleFactor;
0140 Standard_Real solidAngleFactor;
0141 Standard_Real theUncertainty;
0142 Standard_Real areaFactor;
0143 Standard_Real volumeFactor;
0144 Standard_Boolean areaDone;
0145 Standard_Boolean volumeDone;
0146 Standard_Boolean lengthDone;
0147 Standard_Boolean planeAngleDone;
0148 Standard_Boolean solidAngleDone;
0149 Standard_Boolean hasUncertainty;
0150
0151
0152 };
0153
0154
0155
0156
0157
0158
0159
0160 #endif