|
||||
File indexing completed on 2025-01-18 10:04:55
0001 // Created on: 1998-06-03 0002 // Created by: data exchange team 0003 // Copyright (c) 1998-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _ShapeAnalysis_Wire_HeaderFile 0018 #define _ShapeAnalysis_Wire_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <TopoDS_Face.hxx> 0024 #include <Standard_Integer.hxx> 0025 #include <Standard_Transient.hxx> 0026 #include <IntRes2d_SequenceOfIntersectionPoint.hxx> 0027 #include <TColgp_SequenceOfPnt.hxx> 0028 #include <TColStd_SequenceOfReal.hxx> 0029 #include <TopTools_IndexedMapOfShape.hxx> 0030 #include <TopTools_DataMapOfShapeListOfShape.hxx> 0031 #include <TopTools_MapOfShape.hxx> 0032 #include <ShapeExtend_Status.hxx> 0033 class ShapeExtend_WireData; 0034 class ShapeAnalysis_Surface; 0035 class TopoDS_Wire; 0036 class Geom_Surface; 0037 class TopLoc_Location; 0038 class ShapeAnalysis_WireOrder; 0039 class Geom2d_Curve; 0040 class gp_Pnt2d; 0041 class TopoDS_Shape; 0042 class TopoDS_Edge; 0043 0044 // resolve name collisions with X11 headers 0045 #ifdef Status 0046 #undef Status 0047 #endif 0048 0049 class ShapeAnalysis_Wire; 0050 DEFINE_STANDARD_HANDLE(ShapeAnalysis_Wire, Standard_Transient) 0051 0052 //! This class provides analysis of a wire to be compliant to 0053 //! CAS.CADE requirements. 0054 //! 0055 //! The functionalities provided are the following: 0056 //! 1. consistency of 2d and 3d edge curve senses 0057 //! 2. connection of adjacent edges regarding to: 0058 //! a. their vertices 0059 //! b. their pcurves 0060 //! c. their 3d curves 0061 //! 3. adjacency of the edge vertices to its pcurve and 3d curve 0062 //! 4. if a wire is closed or not (considering its 3d and 2d 0063 //! contour) 0064 //! 5. if a wire is outer on its face (considering pcurves) 0065 //! 0066 //! This class can be used in conjunction with class 0067 //! ShapeFix_Wire, which will fix the problems detected by this class. 0068 //! 0069 //! The methods of the given class match to ones of the class 0070 //! ShapeFix_Wire, e.g., CheckSmall and FixSmall. 0071 //! This class also includes some auxiliary methods 0072 //! (e.g., CheckOuterBound, etc.), 0073 //! which have no pair in ShapeFix_Wire. 0074 //! 0075 //! Like methods of ShapeFix_Wire the ones of this class are 0076 //! grouped into two levels: 0077 //! - Public which are recommended for use (the most global 0078 //! method is Perform), 0079 //! - Advanced, for optional use only 0080 //! 0081 //! For analyzing result of Public API checking methods use 0082 //! corresponding Status... method. 0083 //! The 'advanced' functions share the single status field which 0084 //! contains the result of the last performed 'advanced' method. 0085 //! It is queried by the method LastCheckStatus(). 0086 //! 0087 //! In order to prepare an analyzer, it is necessary to load a wire, 0088 //! set face and precision. 0089 class ShapeAnalysis_Wire : public Standard_Transient 0090 { 0091 0092 public: 0093 0094 0095 //! Empty constructor 0096 Standard_EXPORT ShapeAnalysis_Wire(); 0097 0098 //! Creates object with standard TopoDS_Wire, face 0099 //! and precision 0100 Standard_EXPORT ShapeAnalysis_Wire(const TopoDS_Wire& wire, const TopoDS_Face& face, const Standard_Real precision); 0101 0102 //! Creates the object with WireData object, face 0103 //! and precision 0104 Standard_EXPORT ShapeAnalysis_Wire(const Handle(ShapeExtend_WireData)& sbwd, const TopoDS_Face& face, const Standard_Real precision); 0105 0106 //! Initializes the object with standard TopoDS_Wire, face 0107 //! and precision 0108 Standard_EXPORT void Init (const TopoDS_Wire& wire, const TopoDS_Face& face, const Standard_Real precision); 0109 0110 //! Initializes the object with WireData object, face 0111 //! and precision 0112 Standard_EXPORT void Init (const Handle(ShapeExtend_WireData)& sbwd, const TopoDS_Face& face, const Standard_Real precision); 0113 0114 //! Loads the object with standard TopoDS_Wire 0115 Standard_EXPORT void Load (const TopoDS_Wire& wire); 0116 0117 //! Loads the object with WireData object 0118 Standard_EXPORT void Load (const Handle(ShapeExtend_WireData)& sbwd); 0119 0120 //! Loads the face the wire lies on 0121 Standard_EXPORT void SetFace (const TopoDS_Face& face); 0122 0123 //! Loads the surface the wire lies on 0124 Standard_EXPORT void SetSurface (const Handle(Geom_Surface)& surface); 0125 0126 //! Loads the surface the wire lies on 0127 Standard_EXPORT void SetSurface (const Handle(Geom_Surface)& surface, const TopLoc_Location& location); 0128 0129 Standard_EXPORT void SetPrecision (const Standard_Real precision); 0130 0131 //! Unsets all the status and distance fields 0132 //! wire, face and precision are not cleared 0133 Standard_EXPORT void ClearStatuses(); 0134 0135 //! Returns True if wire is loaded and has number of edges >0 0136 Standard_Boolean IsLoaded() const; 0137 0138 //! Returns True if IsLoaded and underlying face is not null 0139 Standard_Boolean IsReady() const; 0140 0141 //! Returns the value of precision 0142 Standard_Real Precision() const; 0143 0144 //! Returns wire object being analyzed 0145 const Handle(ShapeExtend_WireData)& WireData() const; 0146 0147 //! Returns the number of edges in the wire, or 0 if it is not loaded 0148 Standard_Integer NbEdges() const; 0149 0150 //! Returns the working face 0151 const TopoDS_Face& Face() const; 0152 0153 //! Returns the working surface 0154 const Handle(ShapeAnalysis_Surface)& Surface() const; 0155 0156 //! Performs all the checks in the following order : 0157 //! CheckOrder, CheckSmall, CheckConnected, CheckEdgeCurves, 0158 //! CheckDegenerated, CheckSelfIntersection, CheckLacking, 0159 //! CheckClosed 0160 //! Returns: True if at least one method returned True; 0161 //! For deeper analysis use Status...(status) methods 0162 Standard_EXPORT Standard_Boolean Perform(); 0163 0164 //! Calls CheckOrder and returns False if wire is already 0165 //! ordered (tail-to-head), True otherwise 0166 //! Flag <isClosed> defines if the wire is closed or not 0167 //! Flag <mode3d> defines which mode is used (3d or 2d) 0168 Standard_EXPORT Standard_Boolean CheckOrder (const Standard_Boolean isClosed = Standard_True, const Standard_Boolean mode3d = Standard_True); 0169 0170 //! Calls to CheckConnected for each edge 0171 //! Returns: True if at least one pair of disconnected edges (not sharing the 0172 //! same vertex) was detected 0173 Standard_EXPORT Standard_Boolean CheckConnected (const Standard_Real prec = 0.0); 0174 0175 //! Calls to CheckSmall for each edge 0176 //! Returns: True if at least one small edge was detected 0177 Standard_EXPORT Standard_Boolean CheckSmall (const Standard_Real precsmall = 0.0); 0178 0179 //! Checks edges geometry (consistency of 2d and 3d senses, adjasment 0180 //! of curves to the vertices, etc.). 0181 //! The order of the checks : 0182 //! Call ShapeAnalysis_Wire to check: 0183 //! ShapeAnalysis_Edge::CheckCurve3dWithPCurve (1), 0184 //! ShapeAnalysis_Edge::CheckVertcesWithPCurve (2), 0185 //! ShapeAnalysis_Edge::CheckVertcesWithCurve3d (3), 0186 //! CheckSeam (4) 0187 //! Additional: 0188 //! CheckGap3d (5), 0189 //! CheckGap2d (6), 0190 //! ShapeAnalysis_Edge::CheckSameParameter (7) 0191 //! Returns: True if at least one check returned True 0192 //! Remark: The numbers in brackets show with what DONEi or FAILi 0193 //! the status can be queried 0194 Standard_EXPORT Standard_Boolean CheckEdgeCurves(); 0195 0196 //! Calls to CheckDegenerated for each edge 0197 //! Returns: True if at least one incorrect degenerated edge was detected 0198 Standard_EXPORT Standard_Boolean CheckDegenerated(); 0199 0200 //! Checks if wire is closed, performs CheckConnected, 0201 //! CheckDegenerated and CheckLacking for the first and the last edges 0202 //! Returns: True if at least one check returned True 0203 //! Status: 0204 //! FAIL1 or DONE1: see CheckConnected 0205 //! FAIL2 or DONE2: see CheckDegenerated 0206 Standard_EXPORT Standard_Boolean CheckClosed (const Standard_Real prec = 0.0); 0207 0208 //! Checks self-intersection of the wire (considering pcurves) 0209 //! Looks for self-intersecting edges and each pair of intersecting 0210 //! edges. 0211 //! Warning: It does not check each edge with any other one (only each two 0212 //! adjacent edges) 0213 //! The order of the checks : 0214 //! CheckSelfIntersectingEdge, CheckIntersectingEdges 0215 //! Returns: True if at least one check returned True 0216 //! Status: FAIL1 or DONE1 - see CheckSelfIntersectingEdge 0217 //! FAIL2 or DONE2 - see CheckIntersectingEdges 0218 Standard_EXPORT Standard_Boolean CheckSelfIntersection(); 0219 0220 //! Calls to CheckLacking for each edge 0221 //! Returns: True if at least one lacking edge was detected 0222 Standard_EXPORT Standard_Boolean CheckLacking(); 0223 0224 Standard_EXPORT Standard_Boolean CheckGaps3d(); 0225 0226 Standard_EXPORT Standard_Boolean CheckGaps2d(); 0227 0228 Standard_EXPORT Standard_Boolean CheckCurveGaps(); 0229 0230 //! Analyzes the order of the edges in the wire, 0231 //! uses class WireOrder for that purpose. 0232 //! Flag <isClosed> defines if the wire is closed or not 0233 //! Flag <theMode3D> defines 3D or 2d mode. 0234 //! Flag <theModeBoth> defines miscible mode and the flag <theMode3D> is ignored. 0235 //! Returns False if wire is already ordered (tail-to-head), 0236 //! True otherwise. 0237 //! Use returned WireOrder object for deeper analysis. 0238 //! Status: 0239 //! OK : the same edges orientation, the same edges sequence 0240 //! DONE1: the same edges orientation, not the same edges sequence 0241 //! DONE2: as DONE1 and gaps more than myPrecision 0242 //! DONE3: not the same edges orientation (some need to be reversed) 0243 //! DONE4: as DONE3 and gaps more than myPrecision 0244 //! FAIL : algorithm failed (could not detect order) 0245 Standard_EXPORT Standard_Boolean CheckOrder(ShapeAnalysis_WireOrder &sawo, 0246 Standard_Boolean isClosed = Standard_True, 0247 Standard_Boolean theMode3D = Standard_True, 0248 Standard_Boolean theModeBoth = Standard_False); 0249 0250 //! Checks connected edges (num-th and preceding). 0251 //! Tests with starting preci from <SBWD> or with <prec> if 0252 //! it is greater. 0253 //! Considers Vertices. 0254 //! Returns: False if edges are connected by the common vertex, else True 0255 //! Status : 0256 //! OK : Vertices (end of num-1 th edge and start on num-th one) 0257 //! are already the same 0258 //! DONE1 : Absolutely confused (gp::Resolution) 0259 //! DONE2 : Confused at starting <preci> from <SBWD> 0260 //! DONE3 : Confused at <prec> but not <preci> 0261 //! FAIL1 : Not confused 0262 //! FAIL2 : Not confused but confused with <preci> if reverse num-th edge 0263 Standard_EXPORT Standard_Boolean CheckConnected (const Standard_Integer num, const Standard_Real prec = 0.0); 0264 0265 //! Checks if an edge has a length not greater than myPreci or 0266 //! precsmall (if it is smaller) 0267 //! Returns: False if its length is greater than precision 0268 //! Status: 0269 //! OK : edge is not small or degenerated 0270 //! DONE1: edge is small, vertices are the same 0271 //! DONE2: edge is small, vertices are not the same 0272 //! FAIL : no 3d curve and pcurve 0273 Standard_EXPORT Standard_Boolean CheckSmall (const Standard_Integer num, const Standard_Real precsmall = 0.0); 0274 0275 //! Checks if a seam pcurves are correct oriented 0276 //! Returns: False (status OK) if given edge is not a seam or if it is OK 0277 //! C1 - current pcurve for FORWARD edge, 0278 //! C2 - current pcurve for REVERSED edge (if returns True they 0279 //! should be swapped for the seam), 0280 //! cf, cl - first and last parameters on curves 0281 //! Status: 0282 //! OK : Pcurves are correct or edge is not seam 0283 //! DONE : Seam pcurves should be swapped 0284 Standard_EXPORT Standard_Boolean CheckSeam (const Standard_Integer num, Handle(Geom2d_Curve)& C1, Handle(Geom2d_Curve)& C2, Standard_Real& cf, Standard_Real& cl); 0285 0286 //! Checks if a seam pcurves are correct oriented 0287 //! See previous functions for details 0288 Standard_EXPORT Standard_Boolean CheckSeam (const Standard_Integer num); 0289 0290 //! Checks for degenerated edge between two adjacent ones. 0291 //! Fills parameters dgnr1 and dgnr2 with points in parametric 0292 //! space that correspond to the singularity (either gap that 0293 //! needs to be filled by degenerated edge or that already filled) 0294 //! Returns: False if no singularity or edge is already degenerated, 0295 //! otherwise True 0296 //! Status: 0297 //! OK : No surface singularity, or edge is already degenerated 0298 //! DONE1: Degenerated edge should be inserted (gap in 2D) 0299 //! DONE2: Edge <num> should be made degenerated (recompute pcurve 0300 //! and set the flag) 0301 //! FAIL1: One of edges neighbouring to degenerated one has 0302 //! no pcurve 0303 //! FAIL2: Edge marked as degenerated and has no pcurve 0304 //! but singularity is not detected 0305 Standard_EXPORT Standard_Boolean CheckDegenerated (const Standard_Integer num, gp_Pnt2d& dgnr1, gp_Pnt2d& dgnr2); 0306 0307 //! Checks for degenerated edge between two adjacent ones. 0308 //! Remark : Calls previous function 0309 //! Status : See the function above for details 0310 Standard_EXPORT Standard_Boolean CheckDegenerated (const Standard_Integer num); 0311 0312 //! Checks gap between edges in 3D (3d curves). 0313 //! Checks the distance between ends of 3d curves of the num-th 0314 //! and preceding edge. 0315 //! The distance can be queried by MinDistance3d. 0316 //! 0317 //! Returns: True if status is DONE 0318 //! Status: 0319 //! OK : Gap is less than myPrecision 0320 //! DONE : Gap is greater than myPrecision 0321 //! FAIL : No 3d curve(s) on the edge(s) 0322 Standard_EXPORT Standard_Boolean CheckGap3d (const Standard_Integer num = 0); 0323 0324 //! Checks gap between edges in 2D (pcurves). 0325 //! Checks the distance between ends of pcurves of the num-th 0326 //! and preceding edge. 0327 //! The distance can be queried by MinDistance2d. 0328 //! 0329 //! Returns: True if status is DONE 0330 //! Status: 0331 //! OK : Gap is less than parametric precision out of myPrecision 0332 //! DONE : Gap is greater than parametric precision out of myPrecision 0333 //! FAIL : No pcurve(s) on the edge(s) 0334 Standard_EXPORT Standard_Boolean CheckGap2d (const Standard_Integer num = 0); 0335 0336 //! Checks gap between points on 3D curve and points on surface 0337 //! generated by pcurve of the num-th edge. 0338 //! The distance can be queried by MinDistance3d. 0339 //! 0340 //! Returns: True if status is DONE 0341 //! Status: 0342 //! OK : Gap is less than myPrecision 0343 //! DONE : Gap is greater than myPrecision 0344 //! FAIL : No 3d curve(s) on the edge(s) 0345 Standard_EXPORT Standard_Boolean CheckCurveGap (const Standard_Integer num = 0); 0346 0347 //! Checks if num-th edge is self-intersecting. 0348 //! Self-intersection is reported only if intersection point lies outside 0349 //! of both end vertices of the edge. 0350 //! Returns: True if edge is self-intersecting. 0351 //! If returns True it also fills the sequences of intersection points 0352 //! and corresponding 3d points (only that are not enclosed by a vertices) 0353 //! Status: 0354 //! FAIL1 : No pcurve 0355 //! FAIL2 : No vertices 0356 //! DONE1 : Self-intersection found 0357 Standard_EXPORT Standard_Boolean CheckSelfIntersectingEdge (const Standard_Integer num, IntRes2d_SequenceOfIntersectionPoint& points2d, TColgp_SequenceOfPnt& points3d); 0358 0359 Standard_EXPORT Standard_Boolean CheckSelfIntersectingEdge (const Standard_Integer num); 0360 0361 //! Checks two adjacent edges for intersecting. 0362 //! Intersection is reported only if intersection point is not enclosed 0363 //! by the common end vertex of the edges. 0364 //! Returns: True if intersection is found. 0365 //! If returns True it also fills the sequences of intersection points, 0366 //! corresponding 3d points, and errors for them (half-distances between 0367 //! intersection points in 3d calculated from one and from another edge) 0368 //! Status: 0369 //! FAIL1 : No pcurve 0370 //! FAIL2 : No vertices 0371 //! DONE1 : Self-intersection found 0372 Standard_EXPORT Standard_Boolean CheckIntersectingEdges (const Standard_Integer num, IntRes2d_SequenceOfIntersectionPoint& points2d, TColgp_SequenceOfPnt& points3d, TColStd_SequenceOfReal& errors); 0373 0374 //! Checks two adjacent edges for intersecting. 0375 //! Remark : Calls the previous method 0376 //! Status : See the function above for details 0377 Standard_EXPORT Standard_Boolean CheckIntersectingEdges (const Standard_Integer num); 0378 0379 //! Checks i-th and j-th edges for intersecting. 0380 //! Remark : See the previous method for details 0381 Standard_EXPORT Standard_Boolean CheckIntersectingEdges (const Standard_Integer num1, const Standard_Integer num2, IntRes2d_SequenceOfIntersectionPoint& points2d, TColgp_SequenceOfPnt& points3d, TColStd_SequenceOfReal& errors); 0382 0383 //! Checks i-th and j-th edges for intersecting. 0384 //! Remark : Calls previous method. 0385 //! Status : See the function above for details 0386 Standard_EXPORT Standard_Boolean CheckIntersectingEdges (const Standard_Integer num1, const Standard_Integer num2); 0387 0388 //! Checks if there is a gap in 2d between edges, not comprised by 0389 //! the tolerance of their common vertex. 0390 //! If <Tolerance> is greater than 0. and less than tolerance of 0391 //! the vertex, then this value is used for check. 0392 //! Returns: True if not closed gap was detected 0393 //! p2d1 and p2d2 are the endpoint of <num-1>th edge and start of 0394 //! the <num>th edge in 2d. 0395 //! Status: 0396 //! OK: No edge is lacking (3d and 2d connection) 0397 //! FAIL1: edges have no vertices (at least one of them) 0398 //! FAIL2: edges are neither connected by common vertex, nor have 0399 //! coincided vertices 0400 //! FAIL1: edges have no pcurves 0401 //! DONE1: the gap is detected which cannot be closed by the tolerance 0402 //! of the common vertex (or with value of <Tolerance>) 0403 //! DONE2: is set (together with DONE1) if gap is detected and the 0404 //! vector (p2d2 - p2d1) goes in direction opposite to the pcurves 0405 //! of the edges (if angle is more than 0.9*PI). 0406 Standard_EXPORT Standard_Boolean CheckLacking (const Standard_Integer num, const Standard_Real Tolerance, gp_Pnt2d& p2d1, gp_Pnt2d& p2d2); 0407 0408 //! Checks if there is a gap in 2D between edges and not comprised by vertex tolerance 0409 //! The value of SBWD.thepreci is used. 0410 //! Returns: False if no edge should be inserted 0411 //! Status: 0412 //! OK : No edge is lacking (3d and 2d connection) 0413 //! DONE1 : The vertex tolerance should be increased only (2d gap is 0414 //! small) 0415 //! DONE2 : Edge can be inserted (3d and 2d gaps are large enough) 0416 Standard_EXPORT Standard_Boolean CheckLacking (const Standard_Integer num, const Standard_Real Tolerance = 0.0); 0417 0418 //! Checks if wire defines an outer bound on the face 0419 //! Uses ShapeAnalysis::IsOuterBound for analysis 0420 //! If <APIMake> is True uses BRepAPI_MakeWire to build the 0421 //! wire, if False (to be used only when edges share common 0422 //! vertices) uses BRep_Builder to build the wire 0423 Standard_EXPORT Standard_Boolean CheckOuterBound (const Standard_Boolean APIMake = Standard_True); 0424 0425 //! Detects a notch 0426 Standard_EXPORT Standard_Boolean CheckNotchedEdges (const Standard_Integer num, Standard_Integer& shortNum, Standard_Real& param, const Standard_Real Tolerance = 0.0); 0427 0428 //! Checks if wire has parametric area less than precision. 0429 Standard_EXPORT Standard_Boolean CheckSmallArea (const TopoDS_Wire& theWire); 0430 0431 //! Checks with what orientation <shape> (wire or edge) can be 0432 //! connected to the wire. 0433 //! Tests distances with starting <preci> from <SBWD> (close confusion), 0434 //! but if given <prec> is greater, tests with <prec> (coarse confusion). 0435 //! The smallest found distance can be returned by MinDistance3d 0436 //! 0437 //! Returns: False if status is FAIL (see below) 0438 //! Status: 0439 //! DONE1 : If <shape> follows <SBWD>, direct sense (normal) 0440 //! DONE2 : If <shape> follows <SBWD>, but if reversed 0441 //! DONE3 : If <shape> precedes <SBWD>, direct sense 0442 //! DONE4 : If <shape> precedes <SBWD>, but if reversed 0443 //! FAIL1 : If <shape> is neither an edge nor a wire 0444 //! FAIL2 : If <shape> cannot be connected to <SBWD> 0445 //! 0446 //! DONE5 : To the tail of <SBWD> the <shape> is closer with 0447 //! direct sense 0448 //! DONE6 : To the head of <SBWD> the <shape> is closer with 0449 //! direct sense 0450 //! 0451 //! Remark: Statuses DONE1 - DONE4, FAIL1 - FAIL2 are basic and 0452 //! describe the nearest connection of the <shape> to <SBWD>. 0453 //! Statuses DONE5 and DONE6 are advanced and are to be used when 0454 //! analyzing with what sense (direct or reversed) the <shape> 0455 //! should be connected to <SBWD>: 0456 //! For tail of <SBWD> if DONE4 is True <shape> should be direct, 0457 //! otherwise reversed. 0458 //! For head of <SBWD> if DONE5 is True <shape> should be direct, 0459 //! otherwise reversed. 0460 Standard_EXPORT Standard_Boolean CheckShapeConnect (const TopoDS_Shape& shape, const Standard_Real prec = 0.0); 0461 0462 //! The same as previous CheckShapeConnect but is more advanced. 0463 //! It returns the distances between each end of <sbwd> and each 0464 //! end of <shape>. For example, <tailhead> stores distance 0465 //! between tail of <sbwd> and head of <shape> 0466 //! Remark: First method CheckShapeConnect calls this one 0467 Standard_EXPORT Standard_Boolean CheckShapeConnect (Standard_Real& tailhead, Standard_Real& tailtail, Standard_Real& headtail, Standard_Real& headhead, const TopoDS_Shape& shape, const Standard_Real prec = 0.0); 0468 0469 //! Checks existence of loop on wire and return vertices which are loop vertices 0470 //! (vertices belonging to a few pairs of edges) 0471 Standard_EXPORT Standard_Boolean CheckLoop (TopTools_IndexedMapOfShape& aMapLoopVertices, TopTools_DataMapOfShapeListOfShape& aMapVertexEdges, TopTools_MapOfShape& aMapSmallEdges, TopTools_MapOfShape& aMapSeemEdges); 0472 0473 Standard_EXPORT Standard_Boolean CheckTail (const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2, const Standard_Real theMaxSine, const Standard_Real theMaxWidth, const Standard_Real theMaxTolerance, TopoDS_Edge& theEdge11, TopoDS_Edge& theEdge12, TopoDS_Edge& theEdge21, TopoDS_Edge& theEdge22); 0474 0475 Standard_Boolean StatusOrder (const ShapeExtend_Status Status) const; 0476 0477 Standard_Boolean StatusConnected (const ShapeExtend_Status Status) const; 0478 0479 Standard_Boolean StatusEdgeCurves (const ShapeExtend_Status Status) const; 0480 0481 Standard_Boolean StatusDegenerated (const ShapeExtend_Status Status) const; 0482 0483 Standard_Boolean StatusClosed (const ShapeExtend_Status Status) const; 0484 0485 Standard_Boolean StatusSmall (const ShapeExtend_Status Status) const; 0486 0487 Standard_Boolean StatusSelfIntersection (const ShapeExtend_Status Status) const; 0488 0489 Standard_Boolean StatusLacking (const ShapeExtend_Status Status) const; 0490 0491 Standard_Boolean StatusGaps3d (const ShapeExtend_Status Status) const; 0492 0493 Standard_Boolean StatusGaps2d (const ShapeExtend_Status Status) const; 0494 0495 Standard_Boolean StatusCurveGaps (const ShapeExtend_Status Status) const; 0496 0497 Standard_Boolean StatusLoop (const ShapeExtend_Status Status) const; 0498 0499 //! Querying the status of the LAST performed 'Advanced' checking procedure 0500 Standard_Boolean LastCheckStatus (const ShapeExtend_Status Status) const; 0501 0502 //! Returns the last lowest distance in 3D computed by 0503 //! CheckOrientation, CheckConnected, CheckContinuity3d, 0504 //! CheckVertex, CheckNewVertex 0505 Standard_Real MinDistance3d() const; 0506 0507 //! Returns the last lowest distance in 2D-UV computed by 0508 //! CheckContinuity2d 0509 Standard_Real MinDistance2d() const; 0510 0511 //! Returns the last maximal distance in 3D computed by 0512 //! CheckOrientation, CheckConnected, CheckContinuity3d, 0513 //! CheckVertex, CheckNewVertex, CheckSameParameter 0514 Standard_Real MaxDistance3d() const; 0515 0516 //! Returns the last maximal distance in 2D-UV computed by 0517 //! CheckContinuity2d 0518 Standard_Real MaxDistance2d() const; 0519 0520 0521 0522 0523 DEFINE_STANDARD_RTTIEXT(ShapeAnalysis_Wire,Standard_Transient) 0524 0525 protected: 0526 0527 0528 Handle(ShapeExtend_WireData) myWire; 0529 TopoDS_Face myFace; 0530 Handle(ShapeAnalysis_Surface) mySurf; 0531 Standard_Real myPrecision; 0532 Standard_Real myMin3d; 0533 Standard_Real myMin2d; 0534 Standard_Real myMax3d; 0535 Standard_Real myMax2d; 0536 Standard_Integer myStatusOrder; 0537 Standard_Integer myStatusConnected; 0538 Standard_Integer myStatusEdgeCurves; 0539 Standard_Integer myStatusDegenerated; 0540 Standard_Integer myStatusClosed; 0541 Standard_Integer myStatusSmall; 0542 Standard_Integer myStatusSelfIntersection; 0543 Standard_Integer myStatusLacking; 0544 Standard_Integer myStatusGaps3d; 0545 Standard_Integer myStatusGaps2d; 0546 Standard_Integer myStatusCurveGaps; 0547 Standard_Integer myStatusLoop; 0548 Standard_Integer myStatus; 0549 0550 0551 private: 0552 0553 0554 0555 0556 }; 0557 0558 0559 #include <ShapeAnalysis_Wire.lxx> 0560 0561 0562 0563 0564 0565 #endif // _ShapeAnalysis_Wire_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |