1 -- Created on: 1993-07-08
2 -- Created by: Remi LEQUETTE
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
9 -- under the terms of the GNU Lesser General Public 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 class MakeWire from BRepLib inherits MakeShape from BRepLib
19 ---Purpose: Provides methods to build wires.
21 -- A wire may be built :
23 -- * From a single edge.
25 -- * From a wire and an edge.
27 -- - A new wire is created with the edges of the
30 -- - If the edge is not connnected to the wire the
31 -- flag NotDone is set and the method Wire will
34 -- - The connection may be :
36 -- . Through an existing vertex. The edge is shared.
38 -- . Through a geometric coincidence of vertices.
39 -- The edge is copied and the vertices from the
40 -- edge are replaced by the vertices from the
43 -- . The new edge and the connection vertices are
44 -- kept by the algorithm.
47 -- * From 2, 3, 4 edges.
49 -- - A wire is created from the first edge, the
50 -- following edges are added.
54 -- - The following syntax may be used :
56 -- BRepLib_MakeWire MW;
58 -- // for all the edges ...
61 -- TopoDS_Wire W = MW;
66 WireError from BRepLib,
70 MapOfShape from TopTools,
71 ListOfShape from TopTools
79 ---Purpose: NotDone MakeWire.
81 returns MakeWire from BRepLib;
83 ----------------------------------------------
85 ----------------------------------------------
87 Create(E : Edge from TopoDS)
88 ---Purpose: Make a Wire from an edge.
90 returns MakeWire from BRepLib;
92 Create(E1,E2 : Edge from TopoDS)
93 ---Purpose: Make a Wire from two edges.
95 returns MakeWire from BRepLib;
97 Create(E1,E2,E3 : Edge from TopoDS)
98 ---Purpose: Make a Wire from three edges.
100 returns MakeWire from BRepLib;
102 Create(E1,E2,E3,E4 : Edge from TopoDS)
103 ---Purpose: Make a Wire from four edges.
105 returns MakeWire from BRepLib;
107 ----------------------------------------------
108 -- From wire and edge
109 ----------------------------------------------
111 Create(W : Wire from TopoDS)
112 ---Purpose: Make a Wire from a Wire. Usefull for adding later.
114 returns MakeWire from BRepLib;
116 Create(W : Wire from TopoDS; E : Edge from TopoDS)
117 ---Purpose: Add an edge to a wire.
119 returns MakeWire from BRepLib;
121 ----------------------------------------------
123 ----------------------------------------------
125 Add(me : in out; E : Edge from TopoDS)
126 ---Purpose: Add the edge <E> to the current wire.
130 Add(me : in out; W : Wire from TopoDS)
131 ---Purpose: Add the edges of <W> to the current wire.
135 Add(me : in out; L : ListOfShape from TopTools)
136 ---Purpose: Add the edges of <L> to the current wire.
137 -- The edges are not to be consecutive. But they are
138 -- to be all connected geometrically or topologically.
142 ----------------------------------------------
144 ----------------------------------------------
146 Error(me) returns WireError from BRepLib
150 Wire(me) returns Wire from TopoDS
151 ---Purpose: Returns the new wire.
153 ---C++: return const &
154 ---C++: alias "Standard_EXPORT operator TopoDS_Wire() const;"
160 Edge(me) returns Edge from TopoDS
161 ---Purpose: Returns the last edge added to the wire.
163 ---C++: return const &
169 Vertex(me) returns Vertex from TopoDS
170 ---Purpose: Returns the last connecting vertex.
172 ---C++: return const &
180 myError : WireError from BRepLib;
181 myEdge : Edge from TopoDS;
182 myVertex : Vertex from TopoDS;
183 myVertices : MapOfShape from TopTools;
184 FirstVertex : Vertex from TopoDS;
185 VF, VL : Vertex from TopoDS;