File indexing completed on 2026-09-20 09:18:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _ShapeAnalysis_Edge_HeaderFile
0018 #define _ShapeAnalysis_Edge_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_Integer.hxx>
0025 #include <ShapeExtend_Status.hxx>
0026 class TopoDS_Edge;
0027 class Geom_Curve;
0028 class TopoDS_Face;
0029 class Geom_Surface;
0030 class TopLoc_Location;
0031 class Geom2d_Curve;
0032 class gp_Pnt2d;
0033 class TopoDS_Vertex;
0034 class gp_Vec2d;
0035 class gp_Pnt;
0036
0037
0038 #ifdef Status
0039 #undef Status
0040 #endif
0041
0042
0043
0044
0045
0046
0047
0048 class ShapeAnalysis_Edge
0049 {
0050 public:
0051 DEFINE_STANDARD_ALLOC
0052
0053
0054 Standard_EXPORT ShapeAnalysis_Edge();
0055
0056
0057 Standard_EXPORT bool HasCurve3d(const TopoDS_Edge& edge) const;
0058
0059
0060
0061
0062
0063 Standard_EXPORT bool Curve3d(const TopoDS_Edge& edge,
0064 occ::handle<Geom_Curve>& C3d,
0065 double& cf,
0066 double& cl,
0067 const bool orient = true) const;
0068
0069
0070
0071 Standard_EXPORT bool IsClosed3d(const TopoDS_Edge& edge) const;
0072
0073
0074 Standard_EXPORT bool HasPCurve(const TopoDS_Edge& edge, const TopoDS_Face& face) const;
0075
0076
0077 Standard_EXPORT bool HasPCurve(const TopoDS_Edge& edge,
0078 const occ::handle<Geom_Surface>& surface,
0079 const TopLoc_Location& location) const;
0080
0081 Standard_EXPORT bool PCurve(const TopoDS_Edge& edge,
0082 const TopoDS_Face& face,
0083 occ::handle<Geom2d_Curve>& C2d,
0084 double& cf,
0085 double& cl,
0086 const bool orient = true) const;
0087
0088
0089
0090
0091
0092
0093 Standard_EXPORT bool PCurve(const TopoDS_Edge& edge,
0094 const occ::handle<Geom_Surface>& surface,
0095 const TopLoc_Location& location,
0096 occ::handle<Geom2d_Curve>& C2d,
0097 double& cf,
0098 double& cl,
0099 const bool orient = true) const;
0100
0101 Standard_EXPORT bool BoundUV(const TopoDS_Edge& edge,
0102 const TopoDS_Face& face,
0103 gp_Pnt2d& first,
0104 gp_Pnt2d& last) const;
0105
0106
0107
0108 Standard_EXPORT bool BoundUV(const TopoDS_Edge& edge,
0109 const occ::handle<Geom_Surface>& surface,
0110 const TopLoc_Location& location,
0111 gp_Pnt2d& first,
0112 gp_Pnt2d& last) const;
0113
0114 Standard_EXPORT bool IsSeam(const TopoDS_Edge& edge, const TopoDS_Face& face) const;
0115
0116
0117 Standard_EXPORT bool IsSeam(const TopoDS_Edge& edge,
0118 const occ::handle<Geom_Surface>& surface,
0119 const TopLoc_Location& location) const;
0120
0121
0122
0123 Standard_EXPORT TopoDS_Vertex FirstVertex(const TopoDS_Edge& edge) const;
0124
0125
0126
0127 Standard_EXPORT TopoDS_Vertex LastVertex(const TopoDS_Edge& edge) const;
0128
0129 Standard_EXPORT bool GetEndTangent2d(const TopoDS_Edge& edge,
0130 const TopoDS_Face& face,
0131 const bool atEnd,
0132 gp_Pnt2d& pos,
0133 gp_Vec2d& tang,
0134 const double dparam = 0.0) const;
0135
0136
0137
0138
0139
0140
0141 Standard_EXPORT bool GetEndTangent2d(const TopoDS_Edge& edge,
0142 const occ::handle<Geom_Surface>& surface,
0143 const TopLoc_Location& location,
0144 const bool atEnd,
0145 gp_Pnt2d& pos,
0146 gp_Vec2d& tang,
0147 const double dparam = 0.0) const;
0148
0149
0150
0151
0152
0153
0154
0155
0156 Standard_EXPORT bool CheckVerticesWithCurve3d(const TopoDS_Edge& edge,
0157 const double preci = -1,
0158 const int vtx = 0);
0159
0160 Standard_EXPORT bool CheckVerticesWithPCurve(const TopoDS_Edge& edge,
0161 const TopoDS_Face& face,
0162 const double preci = -1,
0163 const int vtx = 0);
0164
0165
0166
0167
0168
0169
0170
0171
0172 Standard_EXPORT bool CheckVerticesWithPCurve(const TopoDS_Edge& edge,
0173 const occ::handle<Geom_Surface>& surface,
0174 const TopLoc_Location& location,
0175 const double preci = -1,
0176 const int vtx = 0);
0177
0178 Standard_EXPORT bool CheckVertexTolerance(const TopoDS_Edge& edge,
0179 const TopoDS_Face& face,
0180 double& toler1,
0181 double& toler2);
0182
0183
0184
0185
0186
0187
0188
0189 Standard_EXPORT bool CheckVertexTolerance(const TopoDS_Edge& edge,
0190 double& toler1,
0191 double& toler2);
0192
0193 Standard_EXPORT bool CheckCurve3dWithPCurve(const TopoDS_Edge& edge, const TopoDS_Face& face);
0194
0195
0196
0197 Standard_EXPORT bool CheckCurve3dWithPCurve(const TopoDS_Edge& edge,
0198 const occ::handle<Geom_Surface>& surface,
0199 const TopLoc_Location& location);
0200
0201
0202 Standard_EXPORT bool Status(const ShapeExtend_Status status) const;
0203
0204
0205
0206
0207
0208
0209
0210
0211 Standard_EXPORT bool CheckSameParameter(const TopoDS_Edge& edge,
0212 double& maxdev,
0213 const int NbControl = 23);
0214
0215
0216
0217
0218
0219
0220
0221
0222 Standard_EXPORT bool CheckSameParameter(const TopoDS_Edge& theEdge,
0223 const TopoDS_Face& theFace,
0224 double& theMaxdev,
0225 const int theNbControl = 23);
0226
0227
0228
0229 Standard_EXPORT bool CheckPCurveRange(const double theFirst,
0230 const double theLast,
0231 const occ::handle<Geom2d_Curve>& thePC);
0232
0233
0234
0235
0236
0237 Standard_EXPORT bool CheckOverlapping(const TopoDS_Edge& theEdge1,
0238 const TopoDS_Edge& theEdge2,
0239 double& theTolOverlap,
0240 const double theDomainDist = 0.0);
0241
0242 protected:
0243 int myStatus;
0244
0245 private:
0246
0247
0248
0249
0250 Standard_EXPORT bool CheckPoints(const gp_Pnt& P1A,
0251 const gp_Pnt& P1B,
0252 const gp_Pnt& P2A,
0253 const gp_Pnt& P2B,
0254 const double preci1,
0255 const double preci2);
0256 };
0257
0258 #endif