File indexing completed on 2025-01-18 10:03:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _BRepOffset_SimpleOffset_HeaderFile
0017 #define _BRepOffset_SimpleOffset_HeaderFile
0018
0019 #include <BRepTools_Modification.hxx>
0020 #include <Geom2d_Curve.hxx>
0021 #include <GeomAbs_Shape.hxx>
0022 #include <NCollection_DataMap.hxx>
0023 #include <Standard_Macro.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <Standard_Type.hxx>
0026 #include <TopoDS_Edge.hxx>
0027 #include <TopoDS_Face.hxx>
0028 #include <TopoDS_Vertex.hxx>
0029 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
0030
0031
0032 class BRepOffset_SimpleOffset;
0033 DEFINE_STANDARD_HANDLE(BRepOffset_SimpleOffset, BRepTools_Modification)
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 class BRepOffset_SimpleOffset : public BRepTools_Modification
0045 {
0046 public:
0047
0048 DEFINE_STANDARD_RTTI_INLINE(BRepOffset_SimpleOffset, BRepTools_Modification)
0049
0050
0051
0052
0053
0054 Standard_EXPORT BRepOffset_SimpleOffset(const TopoDS_Shape& theInputShape,
0055 const Standard_Real theOffsetValue,
0056 const Standard_Real theTolerance);
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069 Standard_EXPORT Standard_Boolean NewSurface (const TopoDS_Face& F,
0070 Handle(Geom_Surface)& S,
0071 TopLoc_Location& L,
0072 Standard_Real& Tol,
0073 Standard_Boolean& RevWires,
0074 Standard_Boolean& RevFace) Standard_OVERRIDE;
0075
0076
0077
0078
0079
0080
0081
0082 Standard_EXPORT Standard_Boolean NewCurve (const TopoDS_Edge& E,
0083 Handle(Geom_Curve)& C,
0084 TopLoc_Location& L,
0085 Standard_Real& Tol) Standard_OVERRIDE;
0086
0087
0088
0089
0090
0091
0092 Standard_EXPORT Standard_Boolean NewPoint (const TopoDS_Vertex& V,
0093 gp_Pnt& P,
0094 Standard_Real& Tol) Standard_OVERRIDE;
0095
0096
0097
0098
0099
0100
0101
0102 Standard_EXPORT Standard_Boolean NewCurve2d (const TopoDS_Edge& E,
0103 const TopoDS_Face& F,
0104 const TopoDS_Edge& NewE,
0105 const TopoDS_Face& NewF,
0106 Handle(Geom2d_Curve)& C,
0107 Standard_Real& Tol) Standard_OVERRIDE;
0108
0109
0110
0111
0112
0113
0114 Standard_EXPORT Standard_Boolean NewParameter (const TopoDS_Vertex& V,
0115 const TopoDS_Edge& E,
0116 Standard_Real& P,
0117 Standard_Real& Tol) Standard_OVERRIDE;
0118
0119
0120
0121
0122
0123
0124
0125 Standard_EXPORT GeomAbs_Shape Continuity (const TopoDS_Edge& E,
0126 const TopoDS_Face& F1,
0127 const TopoDS_Face& F2,
0128 const TopoDS_Edge& NewE,
0129 const TopoDS_Face& NewF1,
0130 const TopoDS_Face& NewF2) Standard_OVERRIDE;
0131
0132 private:
0133
0134
0135 void FillFaceData(const TopoDS_Face& theFace);
0136
0137
0138 void FillEdgeData(const TopoDS_Edge& theEdge,
0139 const TopTools_IndexedDataMapOfShapeListOfShape& theEdgeFaceMap,
0140 const Standard_Integer theIdx);
0141
0142
0143 void FillVertexData(const TopoDS_Vertex& theVertex,
0144 const TopTools_IndexedDataMapOfShapeListOfShape& theVertexEdgeMap,
0145 const Standard_Integer theIdx);
0146
0147 struct NewFaceData
0148 {
0149 Handle(Geom_Surface) myOffsetS;
0150 TopLoc_Location myL;
0151 Standard_Real myTol;
0152 Standard_Boolean myRevWires;
0153 Standard_Boolean myRevFace;
0154 };
0155
0156 struct NewEdgeData
0157 {
0158 Handle(Geom_Curve) myOffsetC;
0159 TopLoc_Location myL;
0160 Standard_Real myTol;
0161 };
0162
0163 struct NewVertexData
0164 {
0165 gp_Pnt myP;
0166 Standard_Real myTol;
0167 };
0168
0169
0170 void FillOffsetData(const TopoDS_Shape& theInputShape);
0171
0172
0173 void operator=(const BRepOffset_SimpleOffset&);
0174 BRepOffset_SimpleOffset(const BRepOffset_SimpleOffset&);
0175
0176
0177 NCollection_DataMap<TopoDS_Face, NewFaceData> myFaceInfo;
0178
0179
0180 NCollection_DataMap<TopoDS_Edge, NewEdgeData> myEdgeInfo;
0181
0182
0183 NCollection_DataMap<TopoDS_Vertex, NewVertexData> myVertexInfo;
0184
0185
0186 Standard_Real myOffsetValue;
0187
0188
0189 Standard_Real myTolerance;
0190 };
0191
0192 #endif