File indexing completed on 2025-01-18 10:03:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _BinTools_ShapeSet_HeaderFile
0017 #define _BinTools_ShapeSet_HeaderFile
0018
0019 #include <BinTools_ShapeSetBase.hxx>
0020
0021 #include <TopTools_IndexedMapOfShape.hxx>
0022 #include <BinTools_LocationSet.hxx>
0023 #include <BRep_Builder.hxx>
0024 #include <BinTools_SurfaceSet.hxx>
0025 #include <BinTools_CurveSet.hxx>
0026 #include <BinTools_Curve2dSet.hxx>
0027 #include <TColStd_IndexedMapOfTransient.hxx>
0028 #include <Standard_OStream.hxx>
0029 #include <Standard_IStream.hxx>
0030
0031
0032
0033 class BinTools_ShapeSet : public BinTools_ShapeSetBase
0034 {
0035 public:
0036
0037 DEFINE_STANDARD_ALLOC
0038
0039
0040
0041 Standard_EXPORT BinTools_ShapeSet ();
0042
0043 Standard_EXPORT virtual ~BinTools_ShapeSet();
0044
0045
0046 Standard_EXPORT virtual void Clear();
0047
0048
0049
0050 Standard_EXPORT Standard_Integer Add (const TopoDS_Shape& S);
0051
0052
0053 Standard_EXPORT const TopoDS_Shape& Shape (const Standard_Integer I);
0054
0055
0056 Standard_EXPORT Standard_Integer Index (const TopoDS_Shape& S) const;
0057
0058 Standard_EXPORT const BinTools_LocationSet& Locations() const;
0059
0060 Standard_EXPORT BinTools_LocationSet& ChangeLocations();
0061
0062
0063 Standard_EXPORT Standard_Integer NbShapes() const;
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077 Standard_EXPORT virtual void Write
0078 (Standard_OStream& OS,
0079 const Message_ProgressRange& theRange = Message_ProgressRange());
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093 Standard_EXPORT virtual void Read
0094 (Standard_IStream& IS,
0095 const Message_ProgressRange& theRange = Message_ProgressRange());
0096
0097
0098
0099
0100 Standard_EXPORT virtual void Write (const TopoDS_Shape& S, Standard_OStream& OS);
0101
0102
0103
0104 Standard_EXPORT virtual void WriteGeometry
0105 (Standard_OStream& OS,
0106 const Message_ProgressRange& theRange = Message_ProgressRange()) const;
0107
0108
0109 Standard_EXPORT virtual void ReadGeometry
0110 (Standard_IStream& IS,
0111 const Message_ProgressRange& theRange = Message_ProgressRange());
0112
0113
0114 Standard_EXPORT virtual void ReadFlagsAndSubs
0115 (TopoDS_Shape& S, const TopAbs_ShapeEnum T,
0116 Standard_IStream& IS, const Standard_Integer NbShapes);
0117
0118
0119
0120 Standard_EXPORT virtual void ReadSubs
0121 (TopoDS_Shape& S, Standard_IStream& IS, const Standard_Integer NbShapes);
0122
0123
0124 Standard_EXPORT virtual void Read (Standard_IStream& , TopoDS_Shape& ) {};
0125
0126
0127
0128 Standard_EXPORT virtual void WriteShape (const TopoDS_Shape& S, Standard_OStream& OS) const;
0129
0130
0131 Standard_EXPORT virtual void ReadShape (const TopAbs_ShapeEnum T, Standard_IStream& IS, TopoDS_Shape& S);
0132
0133
0134 Standard_EXPORT virtual void AddShape (const TopoDS_Shape& S);
0135
0136
0137 Standard_EXPORT virtual void AddShapes (TopoDS_Shape& S1, const TopoDS_Shape& S2);
0138
0139
0140
0141 Standard_EXPORT void ReadPolygon3D
0142 (Standard_IStream& IS,
0143 const Message_ProgressRange& theRange = Message_ProgressRange());
0144
0145
0146
0147
0148 Standard_EXPORT void WritePolygon3D
0149 (Standard_OStream& OS,
0150 const Message_ProgressRange& theRange = Message_ProgressRange()) const;
0151
0152
0153
0154 Standard_EXPORT void ReadTriangulation
0155 (Standard_IStream& IS,
0156 const Message_ProgressRange& theRange = Message_ProgressRange());
0157
0158
0159
0160
0161 Standard_EXPORT void WriteTriangulation
0162 (Standard_OStream& OS,
0163 const Message_ProgressRange& theRange = Message_ProgressRange()) const;
0164
0165
0166
0167 Standard_EXPORT void ReadPolygonOnTriangulation
0168 (Standard_IStream& IS,
0169 const Message_ProgressRange& theRange = Message_ProgressRange());
0170
0171
0172
0173
0174 Standard_EXPORT void WritePolygonOnTriangulation
0175 (Standard_OStream& OS,
0176 const Message_ProgressRange& theRange = Message_ProgressRange()) const;
0177
0178 private:
0179
0180 TopTools_IndexedMapOfShape myShapes;
0181 BinTools_LocationSet myLocations;
0182 BRep_Builder myBuilder;
0183 BinTools_SurfaceSet mySurfaces;
0184 BinTools_CurveSet myCurves;
0185 BinTools_Curve2dSet myCurves2d;
0186 NCollection_IndexedMap<Handle(Poly_Polygon2D)> myPolygons2D;
0187 NCollection_IndexedMap<Handle(Poly_Polygon3D)> myPolygons3D;
0188 NCollection_IndexedDataMap<Handle(Poly_Triangulation),
0189 Standard_Boolean> myTriangulations;
0190
0191 NCollection_IndexedMap<Handle(Poly_PolygonOnTriangulation)> myNodes;
0192 };
0193
0194 #endif