|
||||
File indexing completed on 2025-01-18 10:03:17
0001 // Created on: 1993-01-21 0002 // Created by: Remi LEQUETTE 0003 // Copyright (c) 1993-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 _BRepTools_WireExplorer_HeaderFile 0018 #define _BRepTools_WireExplorer_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <TopTools_DataMapOfShapeListOfShape.hxx> 0024 #include <TopoDS_Edge.hxx> 0025 #include <TopoDS_Vertex.hxx> 0026 #include <TopoDS_Face.hxx> 0027 #include <TopTools_MapOfShape.hxx> 0028 #include <TopAbs_Orientation.hxx> 0029 class TopoDS_Wire; 0030 0031 0032 //! The WireExplorer is a tool to explore the edges of 0033 //! a wire in a connection order. 0034 //! 0035 //! i.e. each edge is connected to the previous one by 0036 //! its origin. 0037 //! If a wire is not closed returns only a segment of edges which 0038 //! length depends on started in exploration edge. 0039 //! Algorithm suggests that wire is valid and has no any defects, which 0040 //! can stop edge exploration. Such defects can be loops, wrong orientation of edges 0041 //! (two edges go in to shared vertex or go out from shared vertex), branching of edges, 0042 //! the presens of edges with INTERNAL or EXTERNAL orientation. If wire has 0043 //! such kind of defects WireExplorer can return not all 0044 //! edges in a wire. it depends on type of defect and position of starting edge. 0045 class BRepTools_WireExplorer 0046 { 0047 public: 0048 0049 DEFINE_STANDARD_ALLOC 0050 0051 0052 //! Constructs an empty explorer (which can be initialized using Init) 0053 Standard_EXPORT BRepTools_WireExplorer(); 0054 0055 //! IInitializes an exploration of the wire <W>. 0056 Standard_EXPORT BRepTools_WireExplorer(const TopoDS_Wire& W); 0057 0058 //! Initializes an exploration of the wire <W>. 0059 //! F is used to select the edge connected to the 0060 //! previous in the parametric representation of <F>. 0061 Standard_EXPORT BRepTools_WireExplorer(const TopoDS_Wire& W, const TopoDS_Face& F); 0062 0063 //! Initializes an exploration of the wire <W>. 0064 Standard_EXPORT void Init (const TopoDS_Wire& W); 0065 0066 //! Initializes an exploration of the wire <W>. 0067 //! F is used to select the edge connected to the 0068 //! previous in the parametric representation of <F>. 0069 Standard_EXPORT void Init (const TopoDS_Wire& W, const TopoDS_Face& F); 0070 0071 //! Initializes an exploration of the wire <W>. 0072 //! F is used to select the edge connected to the 0073 //! previous in the parametric representation of <F>. 0074 //! <UMIn>, <UMax>, <VMin>, <VMax> - the UV bounds of the face <F>. 0075 Standard_EXPORT void Init(const TopoDS_Wire& W, 0076 const TopoDS_Face& F, 0077 const Standard_Real UMin, 0078 const Standard_Real UMax, 0079 const Standard_Real VMin, 0080 const Standard_Real VMax); 0081 0082 //! Returns True if there is a current edge. 0083 Standard_EXPORT Standard_Boolean More() const; 0084 0085 //! Proceeds to the next edge. 0086 Standard_EXPORT void Next(); 0087 0088 //! Returns the current edge. 0089 Standard_EXPORT const TopoDS_Edge& Current() const; 0090 0091 //! Returns an Orientation for the current edge. 0092 Standard_EXPORT TopAbs_Orientation Orientation() const; 0093 0094 //! Returns the vertex connecting the current edge to 0095 //! the previous one. 0096 Standard_EXPORT const TopoDS_Vertex& CurrentVertex() const; 0097 0098 //! Clears the content of the explorer. 0099 Standard_EXPORT void Clear(); 0100 0101 0102 0103 0104 protected: 0105 0106 0107 0108 0109 0110 private: 0111 0112 0113 0114 TopTools_DataMapOfShapeListOfShape myMap; 0115 TopoDS_Edge myEdge; 0116 TopoDS_Vertex myVertex; 0117 TopoDS_Face myFace; 0118 TopTools_MapOfShape myDoubles; 0119 Standard_Boolean myReverse; 0120 Standard_Real myTolU; 0121 Standard_Real myTolV; 0122 0123 0124 }; 0125 0126 0127 0128 0129 0130 0131 0132 #endif // _BRepTools_WireExplorer_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |