1 // Created on: 2015-09-10
2 // Created by: Irina Krylova
3 // Copyright (c) 1999-2015 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _STEPCAFControl_GDTProperty_HeaderFile
17 #define _STEPCAFControl_GDTProperty_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
24 #include <STEPConstruct_Tool.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <Standard_CString.hxx>
27 #include <StepBasic_Unit.hxx>
28 #include <StepDimTol_GeometricTolerance.hxx>
29 #include <StepDimTol_GeometricToleranceModifier.hxx>
30 #include <StepDimTol_GeometricToleranceType.hxx>
31 #include <StepDimTol_HArray1OfDatumReferenceModifier.hxx>
32 #include <StepGeom_Axis2Placement3d.hxx>
33 #include <StepRepr_CompoundRepresentationItem.hxx>
34 #include <StepVisual_TessellatedGeometricSet.hxx>
35 #include <XCAFDimTolObjects_DimensionModifiersSequence.hxx>
36 #include <StepShape_LimitsAndFits.hxx>
37 #include <XCAFDimTolObjects_DatumModifiersSequence.hxx>
38 #include <XCAFDimTolObjects_DatumModifWithValue.hxx>
39 #include <XCAFDimTolObjects_DimensionFormVariance.hxx>
40 #include <XCAFDimTolObjects_DimensionGrade.hxx>
41 #include <XCAFDimTolObjects_DimensionType.hxx>
42 #include <XCAFDimTolObjects_DatumTargetType.hxx>
43 #include <XCAFDimTolObjects_DimensionQualifier.hxx>
44 #include <XCAFDimTolObjects_GeomToleranceModif.hxx>
45 #include <XCAFDimTolObjects_GeomToleranceType.hxx>
46 #include <XCAFDimTolObjects_GeomToleranceTypeValue.hxx>
48 //! This class provides tools for access (read)
49 //! the GDT properties.
50 class STEPCAFControl_GDTProperty
56 Standard_EXPORT STEPCAFControl_GDTProperty();
57 Standard_EXPORT static void GetDimModifiers(const Handle(StepRepr_CompoundRepresentationItem)& theCRI,
58 XCAFDimTolObjects_DimensionModifiersSequence& theModifiers);
60 Standard_EXPORT static void GetDimClassOfTolerance(const Handle(StepShape_LimitsAndFits)& theLAF,
61 Standard_Boolean& theHolle,
62 XCAFDimTolObjects_DimensionFormVariance& theFV,
63 XCAFDimTolObjects_DimensionGrade& theG);
65 Standard_EXPORT static Standard_Boolean GetDimType(const Handle(TCollection_HAsciiString)& theName,
66 XCAFDimTolObjects_DimensionType& theType);
68 Standard_EXPORT static Standard_Boolean GetDatumTargetType(const Handle(TCollection_HAsciiString)& theDescription,
69 XCAFDimTolObjects_DatumTargetType& theType);
71 Standard_EXPORT static Standard_Boolean GetDimQualifierType(const Handle(TCollection_HAsciiString)& theDescription,
72 XCAFDimTolObjects_DimensionQualifier& theType);
74 Standard_EXPORT static Standard_Boolean GetTolValueType(const Handle(TCollection_HAsciiString)& theDescription,
75 XCAFDimTolObjects_GeomToleranceTypeValue& theType);
77 Standard_EXPORT static Handle(TCollection_HAsciiString) GetTolValueType(const XCAFDimTolObjects_GeomToleranceTypeValue& theType);
79 Standard_EXPORT static Handle(TCollection_HAsciiString) GetDimTypeName(const XCAFDimTolObjects_DimensionType theType);
81 Standard_EXPORT static Handle(TCollection_HAsciiString) GetDimQualifierName(const XCAFDimTolObjects_DimensionQualifier theQualifier);
83 Standard_EXPORT static Handle(TCollection_HAsciiString) GetDimModifierName(const XCAFDimTolObjects_DimensionModif theModifier);
85 Standard_EXPORT static Handle(StepShape_LimitsAndFits) GetLimitsAndFits(Standard_Boolean theHole,
86 XCAFDimTolObjects_DimensionFormVariance theFormVariance,
87 XCAFDimTolObjects_DimensionGrade theGrade);
89 Standard_EXPORT static Handle(TCollection_HAsciiString) GetDatumTargetName(const XCAFDimTolObjects_DatumTargetType theDatumType);
91 Standard_EXPORT static Standard_Boolean IsDimensionalLocation(const XCAFDimTolObjects_DimensionType theType);
93 Standard_EXPORT static Standard_Boolean IsDimensionalSize(const XCAFDimTolObjects_DimensionType theType);
95 Standard_EXPORT static StepDimTol_GeometricToleranceType GetGeomToleranceType(const XCAFDimTolObjects_GeomToleranceType theType);
97 Standard_EXPORT static XCAFDimTolObjects_GeomToleranceType GetGeomToleranceType(const StepDimTol_GeometricToleranceType theType);
99 Standard_EXPORT static Handle(StepDimTol_GeometricTolerance) GetGeomTolerance(const XCAFDimTolObjects_GeomToleranceType theType);
101 Standard_EXPORT static StepDimTol_GeometricToleranceModifier GetGeomToleranceModifier(const XCAFDimTolObjects_GeomToleranceModif theModifier);
103 Standard_EXPORT static Handle(StepDimTol_HArray1OfDatumReferenceModifier) GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers,
104 const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal,
105 const Standard_Real theValue,
106 const StepBasic_Unit theUnit);
108 Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape theShape);
112 #endif // _STEPCAFControl_GDTProperty_HeaderFile