File indexing completed on 2025-01-18 10:03:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepTools_ShapeSet_HeaderFile
0018 #define _BRepTools_ShapeSet_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <BRep_Builder.hxx>
0025 #include <GeomTools_SurfaceSet.hxx>
0026 #include <GeomTools_CurveSet.hxx>
0027 #include <GeomTools_Curve2dSet.hxx>
0028 #include <TColStd_IndexedMapOfTransient.hxx>
0029 #include <TopTools_ShapeSet.hxx>
0030 #include <Standard_OStream.hxx>
0031 #include <Standard_IStream.hxx>
0032 #include <TopAbs_ShapeEnum.hxx>
0033
0034 class TopoDS_Shape;
0035
0036
0037
0038
0039
0040
0041 class BRepTools_ShapeSet : public TopTools_ShapeSet
0042 {
0043 public:
0044
0045 DEFINE_STANDARD_ALLOC
0046
0047
0048
0049 Standard_EXPORT BRepTools_ShapeSet (const Standard_Boolean theWithTriangles = Standard_True,
0050 const Standard_Boolean theWithNormals = Standard_False);
0051
0052
0053
0054 Standard_EXPORT BRepTools_ShapeSet (const BRep_Builder& theBuilder,
0055 const Standard_Boolean theWithTriangles = Standard_True,
0056 const Standard_Boolean theWithNormals = Standard_False);
0057
0058 Standard_EXPORT virtual ~BRepTools_ShapeSet();
0059
0060
0061 Standard_Boolean IsWithTriangles() const { return myWithTriangles; }
0062
0063 Standard_Boolean IsWithNormals() const { return myWithNormals; }
0064
0065
0066
0067 void SetWithTriangles (const Standard_Boolean theWithTriangles) { myWithTriangles = theWithTriangles; }
0068
0069
0070 void SetWithNormals (const Standard_Boolean theWithNormals) { myWithNormals = theWithNormals; }
0071
0072
0073 Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
0074
0075
0076 Standard_EXPORT virtual void AddGeometry (const TopoDS_Shape& S) Standard_OVERRIDE;
0077
0078
0079 Standard_EXPORT virtual void DumpGeometry (Standard_OStream& OS) const Standard_OVERRIDE;
0080
0081
0082
0083 Standard_EXPORT virtual void WriteGeometry (Standard_OStream& OS,
0084 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
0085
0086
0087 Standard_EXPORT virtual void ReadGeometry (Standard_IStream& IS,
0088 const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
0089
0090
0091 Standard_EXPORT virtual void DumpGeometry (const TopoDS_Shape& S, Standard_OStream& OS) const Standard_OVERRIDE;
0092
0093
0094
0095 Standard_EXPORT virtual void WriteGeometry (const TopoDS_Shape& S, Standard_OStream& OS) const Standard_OVERRIDE;
0096
0097
0098
0099 Standard_EXPORT virtual void ReadGeometry (const TopAbs_ShapeEnum T, Standard_IStream& IS, TopoDS_Shape& S) Standard_OVERRIDE;
0100
0101
0102
0103
0104 Standard_EXPORT virtual void AddShapes (TopoDS_Shape& S1, const TopoDS_Shape& S2) Standard_OVERRIDE;
0105
0106 Standard_EXPORT virtual void Check (const TopAbs_ShapeEnum T, TopoDS_Shape& S) Standard_OVERRIDE;
0107
0108
0109
0110 Standard_EXPORT void ReadPolygon3D (Standard_IStream& IS,
0111 const Message_ProgressRange& theProgress = Message_ProgressRange());
0112
0113
0114
0115
0116 Standard_EXPORT void WritePolygon3D (Standard_OStream& OS,
0117 const Standard_Boolean Compact = Standard_True,
0118 const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
0119
0120
0121
0122 Standard_EXPORT void DumpPolygon3D (Standard_OStream& OS) const;
0123
0124
0125
0126 Standard_EXPORT void ReadTriangulation (Standard_IStream& IS,
0127 const Message_ProgressRange& theProgress = Message_ProgressRange());
0128
0129
0130
0131
0132 Standard_EXPORT void WriteTriangulation (Standard_OStream& OS,
0133 const Standard_Boolean Compact = Standard_True,
0134 const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
0135
0136
0137
0138 Standard_EXPORT void DumpTriangulation (Standard_OStream& OS) const;
0139
0140
0141
0142 Standard_EXPORT void ReadPolygonOnTriangulation (Standard_IStream& IS,
0143 const Message_ProgressRange& theProgress = Message_ProgressRange());
0144
0145
0146
0147
0148 Standard_EXPORT void WritePolygonOnTriangulation (Standard_OStream& OS,
0149 const Standard_Boolean Compact = Standard_True,
0150 const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
0151
0152
0153
0154 Standard_EXPORT void DumpPolygonOnTriangulation (Standard_OStream& OS) const;
0155
0156
0157
0158
0159 protected:
0160
0161
0162
0163
0164
0165 private:
0166
0167
0168
0169 BRep_Builder myBuilder;
0170 GeomTools_SurfaceSet mySurfaces;
0171 GeomTools_CurveSet myCurves;
0172 GeomTools_Curve2dSet myCurves2d;
0173 TColStd_IndexedMapOfTransient myPolygons2D;
0174 TColStd_IndexedMapOfTransient myPolygons3D;
0175 NCollection_IndexedDataMap<Handle(Poly_Triangulation),
0176 Standard_Boolean> myTriangulations;
0177
0178 TColStd_IndexedMapOfTransient myNodes;
0179 Standard_Boolean myWithTriangles;
0180 Standard_Boolean myWithNormals;
0181
0182 };
0183
0184 #endif