File indexing completed on 2026-09-26 09:02:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRep_Tool_HeaderFile
0018 #define _BRep_Tool_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <GeomAbs_Shape.hxx>
0025 #include <Geom_Surface.hxx>
0026 #include <Geom_Curve.hxx>
0027 #include <Geom2d_Curve.hxx>
0028 #include <gp_Pnt2d.hxx>
0029 #include <gp_Pnt.hxx>
0030 #include <Poly_Triangulation.hxx>
0031 #include <Poly_Polygon3D.hxx>
0032 #include <Poly_Polygon2D.hxx>
0033 #include <Poly_PolygonOnTriangulation.hxx>
0034 #include <TopAbs_ShapeEnum.hxx>
0035
0036 class TopoDS_Shape;
0037 class TopoDS_Face;
0038 class TopLoc_Location;
0039 class TopoDS_Edge;
0040 class TopoDS_Vertex;
0041
0042
0043
0044 class BRep_Tool
0045 {
0046 public:
0047 DEFINE_STANDARD_ALLOC
0048
0049
0050
0051
0052
0053
0054 Standard_EXPORT static bool IsClosed(const TopoDS_Shape& S);
0055
0056
0057
0058 Standard_EXPORT static const occ::handle<Geom_Surface>& Surface(const TopoDS_Face& F,
0059 TopLoc_Location& L);
0060
0061
0062
0063 Standard_EXPORT static occ::handle<Geom_Surface> Surface(const TopoDS_Face& F);
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073 Standard_EXPORT static const occ::handle<Poly_Triangulation>& Triangulation(
0074 const TopoDS_Face& theFace,
0075 TopLoc_Location& theLocation,
0076 const Poly_MeshPurpose theMeshPurpose = Poly_MeshPurpose_NONE);
0077
0078
0079
0080
0081
0082 Standard_EXPORT static const NCollection_List<occ::handle<Poly_Triangulation>>& Triangulations(
0083 const TopoDS_Face& theFace,
0084 TopLoc_Location& theLocation);
0085
0086
0087 Standard_EXPORT static double Tolerance(const TopoDS_Face& F);
0088
0089
0090 Standard_EXPORT static bool NaturalRestriction(const TopoDS_Face& F);
0091
0092
0093 Standard_EXPORT static bool IsGeometric(const TopoDS_Face& F);
0094
0095
0096 Standard_EXPORT static bool IsGeometric(const TopoDS_Edge& E);
0097
0098
0099
0100
0101 Standard_EXPORT static const occ::handle<Geom_Curve>& Curve(const TopoDS_Edge& E,
0102 TopLoc_Location& L,
0103 double& First,
0104 double& Last);
0105
0106
0107
0108
0109 Standard_EXPORT static occ::handle<Geom_Curve> Curve(const TopoDS_Edge& E,
0110 double& First,
0111 double& Last);
0112
0113
0114
0115 Standard_EXPORT static const occ::handle<Poly_Polygon3D>& Polygon3D(const TopoDS_Edge& E,
0116 TopLoc_Location& L);
0117
0118
0119
0120
0121
0122
0123
0124
0125 Standard_EXPORT static occ::handle<Geom2d_Curve> CurveOnSurface(const TopoDS_Edge& E,
0126 const TopoDS_Face& F,
0127 double& First,
0128 double& Last,
0129 bool* theIsStored = nullptr);
0130
0131
0132
0133
0134
0135
0136
0137
0138 Standard_EXPORT static occ::handle<Geom2d_Curve> CurveOnSurface(
0139 const TopoDS_Edge& E,
0140 const occ::handle<Geom_Surface>& S,
0141 const TopLoc_Location& L,
0142 double& First,
0143 double& Last,
0144 bool* theIsStored = nullptr);
0145
0146
0147
0148
0149
0150 Standard_EXPORT static occ::handle<Geom2d_Curve> CurveOnPlane(const TopoDS_Edge& E,
0151 const occ::handle<Geom_Surface>& S,
0152 const TopLoc_Location& L,
0153 double& First,
0154 double& Last);
0155
0156
0157
0158
0159
0160 Standard_EXPORT static void CurveOnSurface(const TopoDS_Edge& E,
0161 occ::handle<Geom2d_Curve>& C,
0162 occ::handle<Geom_Surface>& S,
0163 TopLoc_Location& L,
0164 double& First,
0165 double& Last);
0166
0167
0168
0169
0170
0171 Standard_EXPORT static void CurveOnSurface(const TopoDS_Edge& E,
0172 occ::handle<Geom2d_Curve>& C,
0173 occ::handle<Geom_Surface>& S,
0174 TopLoc_Location& L,
0175 double& First,
0176 double& Last,
0177 const int Index);
0178
0179
0180
0181
0182 Standard_EXPORT static occ::handle<Poly_Polygon2D> PolygonOnSurface(const TopoDS_Edge& E,
0183 const TopoDS_Face& F);
0184
0185
0186
0187
0188 Standard_EXPORT static occ::handle<Poly_Polygon2D> PolygonOnSurface(
0189 const TopoDS_Edge& E,
0190 const occ::handle<Geom_Surface>& S,
0191 const TopLoc_Location& L);
0192
0193
0194
0195
0196 Standard_EXPORT static void PolygonOnSurface(const TopoDS_Edge& E,
0197 occ::handle<Poly_Polygon2D>& C,
0198 occ::handle<Geom_Surface>& S,
0199 TopLoc_Location& L);
0200
0201
0202
0203
0204 Standard_EXPORT static void PolygonOnSurface(const TopoDS_Edge& E,
0205 occ::handle<Poly_Polygon2D>& C,
0206 occ::handle<Geom_Surface>& S,
0207 TopLoc_Location& L,
0208 const int Index);
0209
0210
0211
0212
0213 Standard_EXPORT static const occ::handle<Poly_PolygonOnTriangulation>& PolygonOnTriangulation(
0214 const TopoDS_Edge& E,
0215 const occ::handle<Poly_Triangulation>& T,
0216 const TopLoc_Location& L);
0217
0218
0219
0220
0221
0222 Standard_EXPORT static void PolygonOnTriangulation(const TopoDS_Edge& E,
0223 occ::handle<Poly_PolygonOnTriangulation>& P,
0224 occ::handle<Poly_Triangulation>& T,
0225 TopLoc_Location& L);
0226
0227
0228
0229
0230
0231 Standard_EXPORT static void PolygonOnTriangulation(const TopoDS_Edge& E,
0232 occ::handle<Poly_PolygonOnTriangulation>& P,
0233 occ::handle<Poly_Triangulation>& T,
0234 TopLoc_Location& L,
0235 const int Index);
0236
0237
0238
0239
0240 Standard_EXPORT static bool IsClosed(const TopoDS_Edge& E, const TopoDS_Face& F);
0241
0242
0243
0244
0245 Standard_EXPORT static bool IsClosed(const TopoDS_Edge& E,
0246 const occ::handle<Geom_Surface>& S,
0247 const TopLoc_Location& L);
0248
0249
0250
0251 Standard_EXPORT static bool IsClosed(const TopoDS_Edge& E,
0252 const occ::handle<Poly_Triangulation>& T,
0253 const TopLoc_Location& L);
0254
0255
0256 Standard_EXPORT static double Tolerance(const TopoDS_Edge& E);
0257
0258
0259 Standard_EXPORT static bool SameParameter(const TopoDS_Edge& E);
0260
0261
0262 Standard_EXPORT static bool SameRange(const TopoDS_Edge& E);
0263
0264
0265 Standard_EXPORT static bool Degenerated(const TopoDS_Edge& E);
0266
0267
0268 Standard_EXPORT static void Range(const TopoDS_Edge& E, double& First, double& Last);
0269
0270
0271 Standard_EXPORT static void Range(const TopoDS_Edge& E,
0272 const occ::handle<Geom_Surface>& S,
0273 const TopLoc_Location& L,
0274 double& First,
0275 double& Last);
0276
0277
0278 Standard_EXPORT static void Range(const TopoDS_Edge& E,
0279 const TopoDS_Face& F,
0280 double& First,
0281 double& Last);
0282
0283
0284 Standard_EXPORT static void UVPoints(const TopoDS_Edge& E,
0285 const occ::handle<Geom_Surface>& S,
0286 const TopLoc_Location& L,
0287 gp_Pnt2d& PFirst,
0288 gp_Pnt2d& PLast);
0289
0290
0291 Standard_EXPORT static void UVPoints(const TopoDS_Edge& E,
0292 const TopoDS_Face& F,
0293 gp_Pnt2d& PFirst,
0294 gp_Pnt2d& PLast);
0295
0296
0297 Standard_EXPORT static void SetUVPoints(const TopoDS_Edge& E,
0298 const occ::handle<Geom_Surface>& S,
0299 const TopLoc_Location& L,
0300 const gp_Pnt2d& PFirst,
0301 const gp_Pnt2d& PLast);
0302
0303
0304 Standard_EXPORT static void SetUVPoints(const TopoDS_Edge& E,
0305 const TopoDS_Face& F,
0306 const gp_Pnt2d& PFirst,
0307 const gp_Pnt2d& PLast);
0308
0309
0310
0311 Standard_EXPORT static bool HasContinuity(const TopoDS_Edge& E,
0312 const TopoDS_Face& F1,
0313 const TopoDS_Face& F2);
0314
0315
0316 Standard_EXPORT static GeomAbs_Shape Continuity(const TopoDS_Edge& E,
0317 const TopoDS_Face& F1,
0318 const TopoDS_Face& F2);
0319
0320
0321 Standard_EXPORT static bool HasContinuity(const TopoDS_Edge& E,
0322 const occ::handle<Geom_Surface>& S1,
0323 const occ::handle<Geom_Surface>& S2,
0324 const TopLoc_Location& L1,
0325 const TopLoc_Location& L2);
0326
0327
0328 Standard_EXPORT static GeomAbs_Shape Continuity(const TopoDS_Edge& E,
0329 const occ::handle<Geom_Surface>& S1,
0330 const occ::handle<Geom_Surface>& S2,
0331 const TopLoc_Location& L1,
0332 const TopLoc_Location& L2);
0333
0334
0335 Standard_EXPORT static bool HasContinuity(const TopoDS_Edge& E);
0336
0337
0338
0339 Standard_EXPORT static GeomAbs_Shape MaxContinuity(const TopoDS_Edge& theEdge);
0340
0341
0342 Standard_EXPORT static gp_Pnt Pnt(const TopoDS_Vertex& V);
0343
0344
0345 Standard_EXPORT static double Tolerance(const TopoDS_Vertex& V);
0346
0347
0348
0349
0350
0351
0352 Standard_EXPORT static bool Parameter(const TopoDS_Vertex& theV,
0353 const TopoDS_Edge& theE,
0354 double& theParam);
0355
0356
0357
0358 Standard_EXPORT static double Parameter(const TopoDS_Vertex& V, const TopoDS_Edge& E);
0359
0360
0361
0362 Standard_EXPORT static double Parameter(const TopoDS_Vertex& V,
0363 const TopoDS_Edge& E,
0364 const TopoDS_Face& F);
0365
0366
0367
0368 Standard_EXPORT static double Parameter(const TopoDS_Vertex& V,
0369 const TopoDS_Edge& E,
0370 const occ::handle<Geom_Surface>& S,
0371 const TopLoc_Location& L);
0372
0373
0374 Standard_EXPORT static gp_Pnt2d Parameters(const TopoDS_Vertex& V, const TopoDS_Face& F);
0375
0376
0377
0378
0379 Standard_EXPORT static double MaxTolerance(const TopoDS_Shape& theShape,
0380 const TopAbs_ShapeEnum theSubShape);
0381 };
0382
0383 #endif