File indexing completed on 2025-01-18 10:05:33
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _XCAFDoc_DimTolTool_HeaderFile
0017 #define _XCAFDoc_DimTolTool_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021
0022 #include <TDataStd_GenericEmpty.hxx>
0023 #include <Standard_Boolean.hxx>
0024 #include <TDF_LabelSequence.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TColStd_HArray1OfReal.hxx>
0027 #include <TopoDS_Shape.hxx>
0028 #include <NCollection_IndexedDataMap.hxx>
0029
0030 class XCAFDoc_ShapeTool;
0031 class TDF_Label;
0032 class Standard_GUID;
0033 class TCollection_HAsciiString;
0034
0035
0036 class XCAFDoc_DimTolTool;
0037 DEFINE_STANDARD_HANDLE(XCAFDoc_DimTolTool, TDataStd_GenericEmpty)
0038
0039
0040
0041 class XCAFDoc_DimTolTool : public TDataStd_GenericEmpty
0042 {
0043
0044 public:
0045
0046
0047 Standard_EXPORT XCAFDoc_DimTolTool();
0048
0049
0050 Standard_EXPORT static Handle(XCAFDoc_DimTolTool) Set (const TDF_Label& L);
0051
0052
0053 Standard_EXPORT static const Standard_GUID& GetID();
0054
0055
0056 Standard_EXPORT TDF_Label BaseLabel() const;
0057
0058
0059 Standard_EXPORT const Handle(XCAFDoc_ShapeTool)& ShapeTool();
0060
0061
0062
0063 Standard_EXPORT Standard_Boolean IsDimension (const TDF_Label& theLab) const;
0064
0065
0066
0067 Standard_EXPORT void GetDimensionLabels (TDF_LabelSequence& theLabels) const;
0068
0069
0070 Standard_EXPORT void SetDimension (const TDF_LabelSequence& theFirstLS,
0071 const TDF_LabelSequence& theSecondLS,
0072 const TDF_Label& theDimL) const;
0073
0074
0075 Standard_EXPORT void SetDimension(const TDF_Label& theFirstL,
0076 const TDF_Label& theSecondL,
0077 const TDF_Label& theDimL) const;
0078
0079
0080 Standard_EXPORT void SetDimension (const TDF_Label& theL,
0081 const TDF_Label& theDimL) const;
0082
0083
0084 Standard_EXPORT Standard_Boolean GetRefDimensionLabels (const TDF_Label& theShapeL,
0085 TDF_LabelSequence& theDimensions) const;
0086
0087
0088 Standard_EXPORT TDF_Label AddDimension() ;
0089
0090
0091 Standard_EXPORT Standard_Boolean IsGeomTolerance (const TDF_Label& theLab) const;
0092
0093
0094 Standard_EXPORT void GetGeomToleranceLabels (TDF_LabelSequence& theLabels) const;
0095
0096
0097
0098 Standard_EXPORT void SetGeomTolerance (const TDF_Label& theL,
0099 const TDF_Label& theGeomTolL) const;
0100
0101
0102
0103 Standard_EXPORT void SetGeomTolerance(const TDF_LabelSequence& theL,
0104 const TDF_Label& theGeomTolL) const;
0105
0106
0107 Standard_EXPORT Standard_Boolean GetRefGeomToleranceLabels (const TDF_Label& theShapeL,
0108 TDF_LabelSequence& theDimTols) const;
0109
0110
0111 Standard_EXPORT TDF_Label AddGeomTolerance();
0112
0113
0114 Standard_EXPORT Standard_Boolean IsDimTol(const TDF_Label& theLab) const;
0115
0116
0117 Standard_EXPORT void GetDimTolLabels (TDF_LabelSequence& Labels) const;
0118
0119
0120
0121
0122
0123 Standard_EXPORT Standard_Boolean FindDimTol (const Standard_Integer theKind,
0124 const Handle(TColStd_HArray1OfReal)& theVal,
0125 const Handle(TCollection_HAsciiString)& theName,
0126 const Handle(TCollection_HAsciiString)& theDescription,
0127 TDF_Label& lab) const;
0128
0129
0130
0131
0132 Standard_EXPORT TDF_Label FindDimTol (const Standard_Integer theKind,
0133 const Handle(TColStd_HArray1OfReal)& theVal,
0134 const Handle(TCollection_HAsciiString)& theName,
0135 const Handle(TCollection_HAsciiString)& theDescription) const;
0136
0137
0138
0139 Standard_EXPORT TDF_Label AddDimTol (const Standard_Integer theKind,
0140 const Handle(TColStd_HArray1OfReal)& theVal,
0141 const Handle(TCollection_HAsciiString)& theName,
0142 const Handle(TCollection_HAsciiString)& theDescription) const;
0143
0144
0145 Standard_EXPORT void SetDimTol (const TDF_Label& theL,
0146 const TDF_Label& theDimTolL) const;
0147
0148
0149 Standard_EXPORT TDF_Label SetDimTol (const TDF_Label& theL,
0150 const Standard_Integer theKind,
0151 const Handle(TColStd_HArray1OfReal)& theVal,
0152 const Handle(TCollection_HAsciiString)& theName,
0153 const Handle(TCollection_HAsciiString)& theDescription) const;
0154
0155
0156
0157 Standard_EXPORT static Standard_Boolean GetRefShapeLabel (const TDF_Label& theL,
0158 TDF_LabelSequence& theShapeLFirst,
0159 TDF_LabelSequence& theShapeLSecond);
0160
0161
0162
0163 Standard_EXPORT Standard_Boolean GetDimTol (const TDF_Label& theDimTolL,
0164 Standard_Integer& theKind,
0165 Handle(TColStd_HArray1OfReal)& theVal,
0166 Handle(TCollection_HAsciiString)& theName,
0167 Handle(TCollection_HAsciiString)& theDescription) const;
0168
0169
0170
0171 Standard_EXPORT Standard_Boolean IsDatum (const TDF_Label& lab) const;
0172
0173
0174
0175 Standard_EXPORT void GetDatumLabels (TDF_LabelSequence& Labels) const;
0176
0177
0178
0179 Standard_EXPORT Standard_Boolean FindDatum (const Handle(TCollection_HAsciiString)& theName,
0180 const Handle(TCollection_HAsciiString)& theDescription,
0181 const Handle(TCollection_HAsciiString)& theIdentification,
0182 TDF_Label& lab) const;
0183
0184
0185 Standard_EXPORT TDF_Label AddDatum (const Handle(TCollection_HAsciiString)& theName,
0186 const Handle(TCollection_HAsciiString)& theDescription,
0187 const Handle(TCollection_HAsciiString)& theIdentification) const;
0188
0189
0190 Standard_EXPORT TDF_Label AddDatum() ;
0191
0192
0193 Standard_EXPORT void SetDatum (const TDF_LabelSequence& theShapeLabels,
0194 const TDF_Label& theDatumL) const;
0195
0196
0197
0198
0199 Standard_EXPORT void SetDatum (const TDF_Label& theL,
0200 const TDF_Label& theTolerL,
0201 const Handle(TCollection_HAsciiString)& theName,
0202 const Handle(TCollection_HAsciiString)& theDescription,
0203 const Handle(TCollection_HAsciiString)& theIdentification) const;
0204
0205
0206 Standard_EXPORT void SetDatumToGeomTol (const TDF_Label& theDatumL,
0207 const TDF_Label& theTolerL) const;
0208
0209
0210
0211 Standard_EXPORT Standard_Boolean GetDatum (const TDF_Label& theDatumL,
0212 Handle(TCollection_HAsciiString)& theName,
0213 Handle(TCollection_HAsciiString)& theDescription,
0214 Handle(TCollection_HAsciiString)& theIdentification) const;
0215
0216
0217 Standard_EXPORT static Standard_Boolean GetDatumOfTolerLabels (const TDF_Label& theDimTolL,
0218 TDF_LabelSequence& theDatums);
0219
0220
0221 Standard_EXPORT static Standard_Boolean GetDatumWithObjectOfTolerLabels (const TDF_Label& theDimTolL,
0222 TDF_LabelSequence& theDatums);
0223
0224
0225 Standard_EXPORT Standard_Boolean GetTolerOfDatumLabels (const TDF_Label& theDatumL,
0226 TDF_LabelSequence& theTols) const;
0227
0228
0229 Standard_EXPORT Standard_Boolean GetRefDatumLabel (const TDF_Label& theShapeL,
0230 TDF_LabelSequence& theDatum) const;
0231
0232
0233 Standard_EXPORT Standard_Boolean IsLocked(const TDF_Label& theViewL) const;
0234
0235
0236 Standard_EXPORT void Lock(const TDF_Label& theViewL) const;
0237
0238
0239 Standard_EXPORT void GetGDTPresentations(NCollection_IndexedDataMap<TDF_Label, TopoDS_Shape>& theGDTLabelToShape) const;
0240
0241
0242
0243
0244 Standard_EXPORT void SetGDTPresentations(NCollection_IndexedDataMap<TDF_Label, TopoDS_Shape>& theGDTLabelToPrs);
0245
0246
0247 Standard_EXPORT void Unlock(const TDF_Label& theViewL) const;
0248
0249 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0250
0251
0252
0253 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0254
0255
0256 DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_DimTolTool,TDataStd_GenericEmpty)
0257
0258
0259 private:
0260
0261
0262 Handle(XCAFDoc_ShapeTool) myShapeTool;
0263
0264
0265 };
0266
0267
0268
0269
0270
0271
0272
0273 #endif