File indexing completed on 2026-09-16 09:16:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Draft_Modification_HeaderFile
0018 #define _Draft_Modification_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022
0023 #include <TopoDS_Face.hxx>
0024 #include <Draft_FaceInfo.hxx>
0025 #include <TopTools_ShapeMapHasher.hxx>
0026 #include <NCollection_IndexedDataMap.hxx>
0027 #include <TopoDS_Edge.hxx>
0028 #include <Draft_EdgeInfo.hxx>
0029 #include <TopoDS_Vertex.hxx>
0030 #include <Draft_VertexInfo.hxx>
0031 #include <TopoDS_Shape.hxx>
0032 #include <Draft_ErrorStatus.hxx>
0033 #include <NCollection_List.hxx>
0034 #include <BRepTools_Modification.hxx>
0035 #include <GeomAbs_Shape.hxx>
0036 #include <TopAbs_Orientation.hxx>
0037 class gp_Dir;
0038 class gp_Pln;
0039 class Geom_Surface;
0040 class TopLoc_Location;
0041 class TopoDS_Edge;
0042 class Geom_Curve;
0043 class TopoDS_Vertex;
0044 class gp_Pnt;
0045 class Geom2d_Curve;
0046
0047 class Draft_Modification : public BRepTools_Modification
0048 {
0049
0050 public:
0051 Standard_EXPORT Draft_Modification(const TopoDS_Shape& S);
0052
0053
0054 Standard_EXPORT void Clear();
0055
0056
0057 Standard_EXPORT void Init(const TopoDS_Shape& S);
0058
0059
0060
0061
0062
0063 Standard_EXPORT bool Add(const TopoDS_Face& F,
0064 const gp_Dir& Direction,
0065 const double Angle,
0066 const gp_Pln& NeutralPlane,
0067 const bool Flag = true);
0068
0069
0070
0071
0072
0073 Standard_EXPORT void Remove(const TopoDS_Face& F);
0074
0075
0076
0077
0078
0079
0080
0081 Standard_EXPORT void Perform();
0082
0083
0084
0085
0086 Standard_EXPORT bool IsDone() const;
0087
0088 Standard_EXPORT Draft_ErrorStatus Error() const;
0089
0090
0091
0092 Standard_EXPORT const TopoDS_Shape& ProblematicShape() const;
0093
0094
0095
0096 Standard_EXPORT const NCollection_List<TopoDS_Shape>& ConnectedFaces(const TopoDS_Face& F);
0097
0098
0099
0100 Standard_EXPORT const NCollection_List<TopoDS_Shape>& ModifiedFaces();
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115 Standard_EXPORT bool NewSurface(const TopoDS_Face& F,
0116 occ::handle<Geom_Surface>& S,
0117 TopLoc_Location& L,
0118 double& Tol,
0119 bool& RevWires,
0120 bool& RevFace) override;
0121
0122
0123
0124
0125
0126
0127
0128 Standard_EXPORT bool NewCurve(const TopoDS_Edge& E,
0129 occ::handle<Geom_Curve>& C,
0130 TopLoc_Location& L,
0131 double& Tol) override;
0132
0133
0134
0135
0136
0137
0138 Standard_EXPORT bool NewPoint(const TopoDS_Vertex& V, gp_Pnt& P, double& Tol) override;
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150 Standard_EXPORT bool NewCurve2d(const TopoDS_Edge& E,
0151 const TopoDS_Face& F,
0152 const TopoDS_Edge& NewE,
0153 const TopoDS_Face& NewF,
0154 occ::handle<Geom2d_Curve>& C,
0155 double& Tol) override;
0156
0157
0158
0159
0160
0161
0162 Standard_EXPORT bool NewParameter(const TopoDS_Vertex& V,
0163 const TopoDS_Edge& E,
0164 double& P,
0165 double& Tol) override;
0166
0167
0168
0169
0170
0171
0172
0173 Standard_EXPORT GeomAbs_Shape Continuity(const TopoDS_Edge& E,
0174 const TopoDS_Face& F1,
0175 const TopoDS_Face& F2,
0176 const TopoDS_Edge& NewE,
0177 const TopoDS_Face& NewF1,
0178 const TopoDS_Face& NewF2) override;
0179
0180 DEFINE_STANDARD_RTTIEXT(Draft_Modification, BRepTools_Modification)
0181
0182 private:
0183 Standard_EXPORT bool InternalAdd(const TopoDS_Face& F,
0184 const gp_Dir& Direction,
0185 const double Angle,
0186 const gp_Pln& NeutralPlane,
0187 const bool Flag = true);
0188
0189 Standard_EXPORT bool Propagate();
0190
0191 Standard_EXPORT occ::handle<Geom_Curve> NewCurve(const occ::handle<Geom_Curve>& C,
0192 const occ::handle<Geom_Surface>& S,
0193 const TopAbs_Orientation OriS,
0194 const gp_Dir& Direction,
0195 const double Angle,
0196 const gp_Pln& NeutralPlane,
0197 const bool Flag = true);
0198
0199 Standard_EXPORT occ::handle<Geom_Surface> NewSurface(const occ::handle<Geom_Surface>& S,
0200 const TopAbs_Orientation OriS,
0201 const gp_Dir& Direction,
0202 const double Angle,
0203 const gp_Pln& NeutralPlane);
0204
0205 NCollection_IndexedDataMap<TopoDS_Face, Draft_FaceInfo, TopTools_ShapeMapHasher> myFMap;
0206 NCollection_IndexedDataMap<TopoDS_Edge, Draft_EdgeInfo, TopTools_ShapeMapHasher> myEMap;
0207 NCollection_IndexedDataMap<TopoDS_Vertex, Draft_VertexInfo, TopTools_ShapeMapHasher> myVMap;
0208 bool myComp;
0209 TopoDS_Shape myShape;
0210 TopoDS_Shape badShape;
0211 Draft_ErrorStatus errStat;
0212 TopoDS_Face curFace;
0213 NCollection_List<TopoDS_Shape> conneF;
0214 NCollection_IndexedDataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0215 myEFMap;
0216 };
0217
0218 #endif