1 -- Created on: 1993-07-08
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
24 class MakeWire from BRepLib inherits MakeShape from BRepLib
26 ---Purpose: Provides methods to build wires.
28 -- A wire may be built :
30 -- * From a single edge.
32 -- * From a wire and an edge.
34 -- - A new wire is created with the edges of the
37 -- - If the edge is not connnected to the wire the
38 -- flag NotDone is set and the method Wire will
41 -- - The connection may be :
43 -- . Through an existing vertex. The edge is shared.
45 -- . Through a geometric coincidence of vertices.
46 -- The edge is copied and the vertices from the
47 -- edge are replaced by the vertices from the
50 -- . The new edge and the connection vertices are
51 -- kept by the algorithm.
54 -- * From 2, 3, 4 edges.
56 -- - A wire is created from the first edge, the
57 -- following edges are added.
61 -- - The following syntax may be used :
63 -- BRepLib_MakeWire MW;
65 -- // for all the edges ...
68 -- TopoDS_Wire W = MW;
73 WireError from BRepLib,
77 MapOfShape from TopTools,
78 ListOfShape from TopTools
86 ---Purpose: NotDone MakeWire.
88 returns MakeWire from BRepLib;
90 ----------------------------------------------
92 ----------------------------------------------
94 Create(E : Edge from TopoDS)
95 ---Purpose: Make a Wire from an edge.
97 returns MakeWire from BRepLib;
99 Create(E1,E2 : Edge from TopoDS)
100 ---Purpose: Make a Wire from two edges.
102 returns MakeWire from BRepLib;
104 Create(E1,E2,E3 : Edge from TopoDS)
105 ---Purpose: Make a Wire from three edges.
107 returns MakeWire from BRepLib;
109 Create(E1,E2,E3,E4 : Edge from TopoDS)
110 ---Purpose: Make a Wire from four edges.
112 returns MakeWire from BRepLib;
114 ----------------------------------------------
115 -- From wire and edge
116 ----------------------------------------------
118 Create(W : Wire from TopoDS)
119 ---Purpose: Make a Wire from a Wire. Usefull for adding later.
121 returns MakeWire from BRepLib;
123 Create(W : Wire from TopoDS; E : Edge from TopoDS)
124 ---Purpose: Add an edge to a wire.
126 returns MakeWire from BRepLib;
128 ----------------------------------------------
130 ----------------------------------------------
132 Add(me : in out; E : Edge from TopoDS)
133 ---Purpose: Add the edge <E> to the current wire.
137 Add(me : in out; W : Wire from TopoDS)
138 ---Purpose: Add the edges of <W> to the current wire.
142 Add(me : in out; L : ListOfShape from TopTools)
143 ---Purpose: Add the edges of <L> to the current wire.
144 -- The edges are not to be consecutive. But they are
145 -- to be all connected geometrically or topologically.
149 ----------------------------------------------
151 ----------------------------------------------
153 Error(me) returns WireError from BRepLib
157 Wire(me) returns Wire from TopoDS
158 ---Purpose: Returns the new wire.
160 ---C++: return const &
161 ---C++: alias "Standard_EXPORT operator TopoDS_Wire() const;"
167 Edge(me) returns Edge from TopoDS
168 ---Purpose: Returns the last edge added to the wire.
170 ---C++: return const &
176 Vertex(me) returns Vertex from TopoDS
177 ---Purpose: Returns the last connecting vertex.
179 ---C++: return const &
187 myError : WireError from BRepLib;
188 myEdge : Edge from TopoDS;
189 myVertex : Vertex from TopoDS;
190 myVertices : MapOfShape from TopTools;
191 FirstVertex : Vertex from TopoDS;
192 VF, VL : Vertex from TopoDS;