File indexing completed on 2025-01-18 10:05:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _TopOpeBRepDS_DataStructure_HeaderFile
0018 #define _TopOpeBRepDS_DataStructure_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_Integer.hxx>
0025 #include <TopOpeBRepDS_MapOfSurface.hxx>
0026 #include <TopOpeBRepDS_MapOfCurve.hxx>
0027 #include <TopOpeBRepDS_MapOfPoint.hxx>
0028 #include <TopOpeBRepDS_MapOfShapeData.hxx>
0029 #include <TopTools_IndexedMapOfShape.hxx>
0030 #include <TopOpeBRepDS_ListOfInterference.hxx>
0031 #include <TopTools_ListOfShape.hxx>
0032 #include <TopoDS_Shape.hxx>
0033 #include <TopOpeBRepDS_Point.hxx>
0034 #include <TopOpeBRepDS_Surface.hxx>
0035 #include <TopOpeBRepDS_Curve.hxx>
0036 #include <TopOpeBRepDS_ShapeSurface.hxx>
0037 #include <TopOpeBRepDS_IndexedDataMapOfShapeWithState.hxx>
0038 #include <TopOpeBRepDS_Config.hxx>
0039 class Geom_Surface;
0040 class TopoDS_Edge;
0041 class TopOpeBRepDS_Interference;
0042 class TopOpeBRepDS_ShapeWithState;
0043
0044
0045
0046
0047
0048
0049
0050 class TopOpeBRepDS_DataStructure
0051 {
0052 public:
0053
0054 DEFINE_STANDARD_ALLOC
0055
0056
0057 Standard_EXPORT TopOpeBRepDS_DataStructure();
0058
0059
0060 Standard_EXPORT void Init();
0061
0062
0063 Standard_EXPORT Standard_Integer AddSurface (const TopOpeBRepDS_Surface& S);
0064
0065 Standard_EXPORT void RemoveSurface (const Standard_Integer I);
0066
0067 Standard_EXPORT Standard_Boolean KeepSurface (const Standard_Integer I) const;
0068
0069 Standard_EXPORT Standard_Boolean KeepSurface (TopOpeBRepDS_Surface& S) const;
0070
0071 Standard_EXPORT void ChangeKeepSurface (const Standard_Integer I, const Standard_Boolean FindKeep);
0072
0073 Standard_EXPORT void ChangeKeepSurface (TopOpeBRepDS_Surface& S, const Standard_Boolean FindKeep);
0074
0075
0076 Standard_EXPORT Standard_Integer AddCurve (const TopOpeBRepDS_Curve& S);
0077
0078 Standard_EXPORT void RemoveCurve (const Standard_Integer I);
0079
0080 Standard_EXPORT Standard_Boolean KeepCurve (const Standard_Integer I) const;
0081
0082 Standard_EXPORT Standard_Boolean KeepCurve (const TopOpeBRepDS_Curve& C) const;
0083
0084 Standard_EXPORT void ChangeKeepCurve (const Standard_Integer I, const Standard_Boolean FindKeep);
0085
0086 Standard_EXPORT void ChangeKeepCurve (TopOpeBRepDS_Curve& C, const Standard_Boolean FindKeep);
0087
0088
0089 Standard_EXPORT Standard_Integer AddPoint (const TopOpeBRepDS_Point& PDS);
0090
0091
0092 Standard_EXPORT Standard_Integer AddPointSS (const TopOpeBRepDS_Point& PDS, const TopoDS_Shape& S1, const TopoDS_Shape& S2);
0093
0094 Standard_EXPORT void RemovePoint (const Standard_Integer I);
0095
0096 Standard_EXPORT Standard_Boolean KeepPoint (const Standard_Integer I) const;
0097
0098 Standard_EXPORT Standard_Boolean KeepPoint (const TopOpeBRepDS_Point& P) const;
0099
0100 Standard_EXPORT void ChangeKeepPoint (const Standard_Integer I, const Standard_Boolean FindKeep);
0101
0102 Standard_EXPORT void ChangeKeepPoint (TopOpeBRepDS_Point& P, const Standard_Boolean FindKeep);
0103
0104
0105 Standard_EXPORT Standard_Integer AddShape (const TopoDS_Shape& S);
0106
0107
0108 Standard_EXPORT Standard_Integer AddShape (const TopoDS_Shape& S, const Standard_Integer I);
0109
0110 Standard_EXPORT Standard_Boolean KeepShape (const Standard_Integer I, const Standard_Boolean FindKeep = Standard_True) const;
0111
0112 Standard_EXPORT Standard_Boolean KeepShape (const TopoDS_Shape& S, const Standard_Boolean FindKeep = Standard_True) const;
0113
0114 Standard_EXPORT void ChangeKeepShape (const Standard_Integer I, const Standard_Boolean FindKeep);
0115
0116 Standard_EXPORT void ChangeKeepShape (const TopoDS_Shape& S, const Standard_Boolean FindKeep);
0117
0118 Standard_EXPORT void InitSectionEdges();
0119
0120 Standard_EXPORT Standard_Integer AddSectionEdge (const TopoDS_Edge& E);
0121
0122 Standard_EXPORT const TopOpeBRepDS_ListOfInterference& SurfaceInterferences (const Standard_Integer I) const;
0123
0124 Standard_EXPORT TopOpeBRepDS_ListOfInterference& ChangeSurfaceInterferences (const Standard_Integer I);
0125
0126 Standard_EXPORT const TopOpeBRepDS_ListOfInterference& CurveInterferences (const Standard_Integer I) const;
0127
0128 Standard_EXPORT TopOpeBRepDS_ListOfInterference& ChangeCurveInterferences (const Standard_Integer I);
0129
0130 Standard_EXPORT const TopOpeBRepDS_ListOfInterference& PointInterferences (const Standard_Integer I) const;
0131
0132 Standard_EXPORT TopOpeBRepDS_ListOfInterference& ChangePointInterferences (const Standard_Integer I);
0133
0134 Standard_EXPORT const TopOpeBRepDS_ListOfInterference& ShapeInterferences (const TopoDS_Shape& S, const Standard_Boolean FindKeep = Standard_True) const;
0135
0136 Standard_EXPORT TopOpeBRepDS_ListOfInterference& ChangeShapeInterferences (const TopoDS_Shape& S);
0137
0138 Standard_EXPORT const TopOpeBRepDS_ListOfInterference& ShapeInterferences (const Standard_Integer I, const Standard_Boolean FindKeep = Standard_True) const;
0139
0140 Standard_EXPORT TopOpeBRepDS_ListOfInterference& ChangeShapeInterferences (const Standard_Integer I);
0141
0142 Standard_EXPORT const TopTools_ListOfShape& ShapeSameDomain (const TopoDS_Shape& S) const;
0143
0144 Standard_EXPORT TopTools_ListOfShape& ChangeShapeSameDomain (const TopoDS_Shape& S);
0145
0146 Standard_EXPORT const TopTools_ListOfShape& ShapeSameDomain (const Standard_Integer I) const;
0147
0148 Standard_EXPORT TopTools_ListOfShape& ChangeShapeSameDomain (const Standard_Integer I);
0149
0150 Standard_EXPORT TopOpeBRepDS_MapOfShapeData& ChangeShapes();
0151
0152 Standard_EXPORT void AddShapeSameDomain (const TopoDS_Shape& S, const TopoDS_Shape& SSD);
0153
0154 Standard_EXPORT void RemoveShapeSameDomain (const TopoDS_Shape& S, const TopoDS_Shape& SSD);
0155
0156 Standard_EXPORT Standard_Integer SameDomainRef (const Standard_Integer I) const;
0157
0158 Standard_EXPORT Standard_Integer SameDomainRef (const TopoDS_Shape& S) const;
0159
0160 Standard_EXPORT void SameDomainRef (const Standard_Integer I, const Standard_Integer Ref);
0161
0162 Standard_EXPORT void SameDomainRef (const TopoDS_Shape& S, const Standard_Integer Ref);
0163
0164 Standard_EXPORT TopOpeBRepDS_Config SameDomainOri (const Standard_Integer I) const;
0165
0166 Standard_EXPORT TopOpeBRepDS_Config SameDomainOri (const TopoDS_Shape& S) const;
0167
0168 Standard_EXPORT void SameDomainOri (const Standard_Integer I, const TopOpeBRepDS_Config Ori);
0169
0170 Standard_EXPORT void SameDomainOri (const TopoDS_Shape& S, const TopOpeBRepDS_Config Ori);
0171
0172 Standard_EXPORT Standard_Integer SameDomainInd (const Standard_Integer I) const;
0173
0174 Standard_EXPORT Standard_Integer SameDomainInd (const TopoDS_Shape& S) const;
0175
0176 Standard_EXPORT void SameDomainInd (const Standard_Integer I, const Standard_Integer Ind);
0177
0178 Standard_EXPORT void SameDomainInd (const TopoDS_Shape& S, const Standard_Integer Ind);
0179
0180 Standard_EXPORT Standard_Integer AncestorRank (const Standard_Integer I) const;
0181
0182 Standard_EXPORT Standard_Integer AncestorRank (const TopoDS_Shape& S) const;
0183
0184 Standard_EXPORT void AncestorRank (const Standard_Integer I, const Standard_Integer Ianc);
0185
0186 Standard_EXPORT void AncestorRank (const TopoDS_Shape& S, const Standard_Integer Ianc);
0187
0188 Standard_EXPORT void AddShapeInterference (const TopoDS_Shape& S, const Handle(TopOpeBRepDS_Interference)& I);
0189
0190 Standard_EXPORT void RemoveShapeInterference (const TopoDS_Shape& S, const Handle(TopOpeBRepDS_Interference)& I);
0191
0192 Standard_EXPORT void FillShapesSameDomain (const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Standard_Boolean refFirst = Standard_True);
0193
0194 Standard_EXPORT void FillShapesSameDomain (const TopoDS_Shape& S1, const TopoDS_Shape& S2, const TopOpeBRepDS_Config c1, const TopOpeBRepDS_Config c2, const Standard_Boolean refFirst = Standard_True);
0195
0196 Standard_EXPORT void UnfillShapesSameDomain (const TopoDS_Shape& S1, const TopoDS_Shape& S2);
0197
0198 Standard_EXPORT Standard_Integer NbSurfaces() const;
0199
0200 Standard_EXPORT Standard_Integer NbCurves() const;
0201
0202 Standard_EXPORT void ChangeNbCurves (const Standard_Integer N);
0203
0204 Standard_EXPORT Standard_Integer NbPoints() const;
0205
0206 Standard_EXPORT Standard_Integer NbShapes() const;
0207
0208 Standard_EXPORT Standard_Integer NbSectionEdges() const;
0209
0210
0211 Standard_EXPORT const TopOpeBRepDS_Surface& Surface (const Standard_Integer I) const;
0212
0213
0214 Standard_EXPORT TopOpeBRepDS_Surface& ChangeSurface (const Standard_Integer I);
0215
0216
0217 Standard_EXPORT const TopOpeBRepDS_Curve& Curve (const Standard_Integer I) const;
0218
0219
0220 Standard_EXPORT TopOpeBRepDS_Curve& ChangeCurve (const Standard_Integer I);
0221
0222
0223 Standard_EXPORT const TopOpeBRepDS_Point& Point (const Standard_Integer I) const;
0224
0225
0226 Standard_EXPORT TopOpeBRepDS_Point& ChangePoint (const Standard_Integer I);
0227
0228
0229
0230 Standard_EXPORT const TopoDS_Shape& Shape (const Standard_Integer I, const Standard_Boolean FindKeep = Standard_True) const;
0231
0232
0233
0234
0235 Standard_EXPORT Standard_Integer Shape (const TopoDS_Shape& S, const Standard_Boolean FindKeep = Standard_True) const;
0236
0237 Standard_EXPORT const TopoDS_Edge& SectionEdge (const Standard_Integer I, const Standard_Boolean FindKeep = Standard_True) const;
0238
0239 Standard_EXPORT Standard_Integer SectionEdge (const TopoDS_Edge& E, const Standard_Boolean FindKeep = Standard_True) const;
0240
0241 Standard_EXPORT Standard_Boolean IsSectionEdge (const TopoDS_Edge& E, const Standard_Boolean FindKeep = Standard_True) const;
0242
0243
0244
0245
0246
0247
0248
0249 Standard_EXPORT Standard_Boolean HasGeometry (const TopoDS_Shape& S) const;
0250
0251
0252 Standard_EXPORT Standard_Boolean HasShape (const TopoDS_Shape& S, const Standard_Boolean FindKeep = Standard_True) const;
0253
0254 Standard_EXPORT void SetNewSurface (const TopoDS_Shape& F, const Handle(Geom_Surface)& S);
0255
0256 Standard_EXPORT Standard_Boolean HasNewSurface (const TopoDS_Shape& F) const;
0257
0258 Standard_EXPORT const Handle(Geom_Surface)& NewSurface (const TopoDS_Shape& F) const;
0259
0260 Standard_EXPORT void Isfafa (const Standard_Boolean isfafa);
0261
0262 Standard_EXPORT Standard_Boolean Isfafa() const;
0263
0264 Standard_EXPORT TopOpeBRepDS_IndexedDataMapOfShapeWithState& ChangeMapOfShapeWithStateObj();
0265
0266 Standard_EXPORT TopOpeBRepDS_IndexedDataMapOfShapeWithState& ChangeMapOfShapeWithStateTool();
0267
0268 Standard_EXPORT TopOpeBRepDS_IndexedDataMapOfShapeWithState& ChangeMapOfShapeWithState (const TopoDS_Shape& aShape, Standard_Boolean& aFlag);
0269
0270 Standard_EXPORT const TopOpeBRepDS_ShapeWithState& GetShapeWithState (const TopoDS_Shape& aShape) const;
0271
0272 Standard_EXPORT TopTools_IndexedMapOfShape& ChangeMapOfRejectedShapesObj();
0273
0274 Standard_EXPORT TopTools_IndexedMapOfShape& ChangeMapOfRejectedShapesTool();
0275
0276
0277 friend class TopOpeBRepDS_SurfaceExplorer;
0278 friend class TopOpeBRepDS_CurveExplorer;
0279 friend class TopOpeBRepDS_PointExplorer;
0280
0281
0282 protected:
0283
0284
0285
0286
0287
0288 private:
0289
0290
0291 Standard_EXPORT Standard_Boolean FindInterference (TopOpeBRepDS_ListIteratorOfListOfInterference& IT, const Handle(TopOpeBRepDS_Interference)& I) const;
0292
0293
0294 Standard_Integer myNbSurfaces;
0295 TopOpeBRepDS_MapOfSurface mySurfaces;
0296 Standard_Integer myNbCurves;
0297 TopOpeBRepDS_MapOfCurve myCurves;
0298 Standard_Integer myNbPoints;
0299 TopOpeBRepDS_MapOfPoint myPoints;
0300 TopOpeBRepDS_MapOfShapeData myShapes;
0301 TopTools_IndexedMapOfShape mySectionEdges;
0302 TopOpeBRepDS_ListOfInterference myEmptyListOfInterference;
0303 TopTools_ListOfShape myEmptyListOfShape;
0304 TopoDS_Shape myEmptyShape;
0305 TopOpeBRepDS_Point myEmptyPoint;
0306 TopOpeBRepDS_Surface myEmptySurface;
0307 TopOpeBRepDS_Curve myEmptyCurve;
0308 Handle(Geom_Surface) myEmptyGSurface;
0309 TopOpeBRepDS_ShapeSurface myNewSurface;
0310 Standard_Boolean myIsfafa;
0311 Standard_Integer myI;
0312 TopOpeBRepDS_IndexedDataMapOfShapeWithState myMapOfShapeWithStateObj;
0313 TopOpeBRepDS_IndexedDataMapOfShapeWithState myMapOfShapeWithStateTool;
0314 TopTools_IndexedMapOfShape myMapOfRejectedShapesObj;
0315 TopTools_IndexedMapOfShape myMapOfRejectedShapesTool;
0316
0317
0318 };
0319
0320
0321
0322
0323
0324
0325
0326 #endif