1 // Created on: 1993-06-16
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TopOpeBRepBuild_WireEdgeSet_HeaderFile
18 #define _TopOpeBRepBuild_WireEdgeSet_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopoDS_Face.hxx>
25 #include <TopOpeBRepBuild_ShapeSet.hxx>
26 #include <Standard_Address.hxx>
27 #include <TopTools_ListOfShape.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <TopAbs_Orientation.hxx>
30 #include <Standard_Integer.hxx>
31 #include <TCollection_AsciiString.hxx>
37 class TCollection_AsciiString;
40 //! a bound is a wire, a boundelement is an edge.
41 //! The ShapeSet stores :
42 //! - a list of wire (bounds),
43 //! - a list of edge (boundelements) to start reconstructions,
44 //! - a map of vertex giving the list of edge incident to a vertex.
45 class TopOpeBRepBuild_WireEdgeSet : public TopOpeBRepBuild_ShapeSet
52 //! Creates a WireEdgeSet to build edges connected by vertices
53 //! on face F. Edges of the WireEdgeSet must have a representation
54 //! on surface of face F.
55 Standard_EXPORT TopOpeBRepBuild_WireEdgeSet(const TopoDS_Shape& F, const Standard_Address Addr = NULL);
57 //! value of field myFace
58 Standard_EXPORT const TopoDS_Face& Face() const;
60 Standard_EXPORT virtual void AddShape (const TopoDS_Shape& S) Standard_OVERRIDE;
62 Standard_EXPORT virtual void AddStartElement (const TopoDS_Shape& S) Standard_OVERRIDE;
64 Standard_EXPORT virtual void AddElement (const TopoDS_Shape& S) Standard_OVERRIDE;
66 Standard_EXPORT virtual void InitNeighbours (const TopoDS_Shape& E) Standard_OVERRIDE;
69 //! Build the list of neighbour edges of edge myCurrentShape
70 //! Initialize iterator of neighbour edges to edge myCurrentShape
71 Standard_EXPORT virtual void FindNeighbours() Standard_OVERRIDE;
73 Standard_EXPORT virtual const TopTools_ListOfShape& MakeNeighboursList (const TopoDS_Shape& E, const TopoDS_Shape& V) Standard_OVERRIDE;
75 Standard_EXPORT static void IsUVISO (const TopoDS_Edge& E, const TopoDS_Face& F, Standard_Boolean& uiso, Standard_Boolean& viso);
77 Standard_EXPORT virtual void DumpSS() Standard_OVERRIDE;
79 Standard_EXPORT virtual TCollection_AsciiString SName (const TopoDS_Shape& S, const TCollection_AsciiString& sb = "", const TCollection_AsciiString& sa = "") const Standard_OVERRIDE;
81 Standard_EXPORT virtual TCollection_AsciiString SName (const TopTools_ListOfShape& S, const TCollection_AsciiString& sb = "", const TCollection_AsciiString& sa = "") const Standard_OVERRIDE;
83 Standard_EXPORT virtual TCollection_AsciiString SNameori (const TopoDS_Shape& S, const TCollection_AsciiString& sb = "", const TCollection_AsciiString& sa = "") const Standard_OVERRIDE;
85 Standard_EXPORT virtual TCollection_AsciiString SNameori (const TopTools_ListOfShape& S, const TCollection_AsciiString& sb = "", const TCollection_AsciiString& sa = "") const Standard_OVERRIDE;
100 //! Indicates whether vertex V is a good connexity vertex between
102 //! i.e, returns True if V is shared by E1 and E2 and if V has different
103 //! orientations on E1 and E2.
104 //! If V is shared by E1 and E2, returns the orientation of V on E1 and E2
105 Standard_EXPORT Standard_Boolean VertexConnectsEdges (const TopoDS_Shape& V, const TopoDS_Shape& E1, const TopoDS_Shape& E2, TopAbs_Orientation& O1, TopAbs_Orientation& O2) const;
107 Standard_EXPORT Standard_Boolean VertexConnectsEdgesClosing (const TopoDS_Shape& V, const TopoDS_Shape& E1, const TopoDS_Shape& E2) const;
109 Standard_EXPORT Standard_Integer NbClosingShapes (const TopTools_ListOfShape& L) const;
111 Standard_EXPORT void LocalD1 (const TopoDS_Shape& F, const TopoDS_Shape& E, const TopoDS_Shape& V, gp_Pnt2d& p2, gp_Vec2d& v2) const;
113 //! indicates if the edge <E> is a closing edge of myFace
114 Standard_EXPORT Standard_Boolean IsClosed (const TopoDS_Shape& E) const;
116 //! indicates if the edge <E> is a closing edge on U of myFace
117 Standard_EXPORT Standard_Boolean IsUClosed (const TopoDS_Shape& E) const;
119 //! indicates if the edge <E> is a closing edge on V of myFace
120 Standard_EXPORT Standard_Boolean IsVClosed (const TopoDS_Shape& E) const;
122 Standard_EXPORT TCollection_AsciiString SNameVEE (const TopoDS_Shape& V, const TopoDS_Shape& E1, const TopoDS_Shape& E2) const;
124 Standard_EXPORT TCollection_AsciiString SNameVEL (const TopoDS_Shape& V, const TopoDS_Shape& E, const TopTools_ListOfShape& L) const;
138 #endif // _TopOpeBRepBuild_WireEdgeSet_HeaderFile