File indexing completed on 2026-09-14 09:14:04
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 <Standard_Transient.hxx>
0029 #include <NCollection_IndexedMap.hxx>
0030 #include <TopTools_ShapeSet.hxx>
0031 #include <Standard_OStream.hxx>
0032 #include <Standard_IStream.hxx>
0033 #include <TopAbs_ShapeEnum.hxx>
0034
0035 class TopoDS_Shape;
0036
0037
0038
0039
0040
0041 class BRepTools_ShapeSet : public TopTools_ShapeSet
0042 {
0043 public:
0044 DEFINE_STANDARD_ALLOC
0045
0046
0047
0048 Standard_EXPORT BRepTools_ShapeSet(const bool theWithTriangles = true,
0049 const bool theWithNormals = false);
0050
0051
0052
0053 Standard_EXPORT BRepTools_ShapeSet(const BRep_Builder& theBuilder,
0054 const bool theWithTriangles = true,
0055 const bool theWithNormals = false);
0056
0057 Standard_EXPORT ~BRepTools_ShapeSet() override;
0058
0059
0060 bool IsWithTriangles() const { return myWithTriangles; }
0061
0062
0063 bool IsWithNormals() const { return myWithNormals; }
0064
0065
0066
0067 void SetWithTriangles(const bool theWithTriangles) { myWithTriangles = theWithTriangles; }
0068
0069
0070
0071 void SetWithNormals(const bool theWithNormals) { myWithNormals = theWithNormals; }
0072
0073
0074 Standard_EXPORT void Clear() override;
0075
0076
0077 Standard_EXPORT void AddGeometry(const TopoDS_Shape& S) override;
0078
0079
0080 Standard_EXPORT void DumpGeometry(Standard_OStream& OS) const override;
0081
0082
0083
0084 Standard_EXPORT void WriteGeometry(
0085 Standard_OStream& OS,
0086 const Message_ProgressRange& theProgress = Message_ProgressRange()) override;
0087
0088
0089 Standard_EXPORT void ReadGeometry(
0090 Standard_IStream& IS,
0091 const Message_ProgressRange& theProgress = Message_ProgressRange()) override;
0092
0093
0094 Standard_EXPORT void DumpGeometry(const TopoDS_Shape& S, Standard_OStream& OS) const override;
0095
0096
0097
0098 Standard_EXPORT void WriteGeometry(const TopoDS_Shape& S, Standard_OStream& OS) const override;
0099
0100
0101
0102 Standard_EXPORT void ReadGeometry(const TopAbs_ShapeEnum T,
0103 Standard_IStream& IS,
0104 TopoDS_Shape& S) override;
0105
0106
0107
0108
0109 Standard_EXPORT void AddShapes(TopoDS_Shape& S1, const TopoDS_Shape& S2) override;
0110
0111 Standard_EXPORT void Check(const TopAbs_ShapeEnum T, TopoDS_Shape& S) override;
0112
0113
0114
0115 Standard_EXPORT void ReadPolygon3D(
0116 Standard_IStream& IS,
0117 const Message_ProgressRange& theProgress = Message_ProgressRange());
0118
0119
0120
0121
0122 Standard_EXPORT void WritePolygon3D(
0123 Standard_OStream& OS,
0124 const bool Compact = true,
0125 const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
0126
0127
0128
0129 Standard_EXPORT void DumpPolygon3D(Standard_OStream& OS) const;
0130
0131
0132
0133 Standard_EXPORT void ReadTriangulation(
0134 Standard_IStream& IS,
0135 const Message_ProgressRange& theProgress = Message_ProgressRange());
0136
0137
0138
0139
0140 Standard_EXPORT void WriteTriangulation(
0141 Standard_OStream& OS,
0142 const bool Compact = true,
0143 const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
0144
0145
0146
0147 Standard_EXPORT void DumpTriangulation(Standard_OStream& OS) const;
0148
0149
0150
0151 Standard_EXPORT void ReadPolygonOnTriangulation(
0152 Standard_IStream& IS,
0153 const Message_ProgressRange& theProgress = Message_ProgressRange());
0154
0155
0156
0157
0158 Standard_EXPORT void WritePolygonOnTriangulation(
0159 Standard_OStream& OS,
0160 const bool Compact = true,
0161 const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
0162
0163
0164
0165 Standard_EXPORT void DumpPolygonOnTriangulation(Standard_OStream& OS) const;
0166
0167 private:
0168 BRep_Builder myBuilder;
0169 GeomTools_SurfaceSet mySurfaces;
0170 GeomTools_CurveSet myCurves;
0171 GeomTools_Curve2dSet myCurves2d;
0172 NCollection_IndexedMap<occ::handle<Standard_Transient>> myPolygons2D;
0173 NCollection_IndexedMap<occ::handle<Standard_Transient>> myPolygons3D;
0174 NCollection_IndexedDataMap<occ::handle<Poly_Triangulation>,
0175
0176 bool> myTriangulations;
0177
0178
0179 NCollection_IndexedMap<occ::handle<Standard_Transient>> myNodes;
0180 bool myWithTriangles;
0181 bool myWithNormals;
0182 };
0183
0184 #endif