0024203: Command "sameparameter" in DRAW on attached edge set tolerance equal to...
[occt.git] / src / BRepLib / BRepLib_MakeWire.cdl
CommitLineData
b311480e 1-- Created on: 1993-07-08
2-- Created by: Remi LEQUETTE
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class MakeWire from BRepLib inherits MakeShape from BRepLib
18
19 ---Purpose: Provides methods to build wires.
20 --
21 -- A wire may be built :
22 --
23 -- * From a single edge.
24 --
25 -- * From a wire and an edge.
26 --
27 -- - A new wire is created with the edges of the
28 -- wire + the edge.
29 --
30 -- - If the edge is not connnected to the wire the
31 -- flag NotDone is set and the method Wire will
32 -- raise an error.
33 --
34 -- - The connection may be :
35 --
36 -- . Through an existing vertex. The edge is shared.
37 --
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
41 -- wire.
42 --
43 -- . The new edge and the connection vertices are
44 -- kept by the algorithm.
45 --
46 --
47 -- * From 2, 3, 4 edges.
48 --
49 -- - A wire is created from the first edge, the
50 -- following edges are added.
51 --
52 -- * From many edges.
53 --
54 -- - The following syntax may be used :
55 --
56 -- BRepLib_MakeWire MW;
57 --
58 -- // for all the edges ...
59 -- MW.Add(anEdge);
60 --
61 -- TopoDS_Wire W = MW;
62
63
64
65uses
66 WireError from BRepLib,
67 Wire from TopoDS,
68 Edge from TopoDS,
69 Vertex from TopoDS,
70 MapOfShape from TopTools,
71 ListOfShape from TopTools
72
73raises
74 NotDone from StdFail
75
76is
77
78 Create
79 ---Purpose: NotDone MakeWire.
80 ---Level: Public
81 returns MakeWire from BRepLib;
82
83 ----------------------------------------------
84 -- From edges
85 ----------------------------------------------
86
87 Create(E : Edge from TopoDS)
88 ---Purpose: Make a Wire from an edge.
89 ---Level: Public
90 returns MakeWire from BRepLib;
91
92 Create(E1,E2 : Edge from TopoDS)
93 ---Purpose: Make a Wire from two edges.
94 ---Level: Public
95 returns MakeWire from BRepLib;
96
97 Create(E1,E2,E3 : Edge from TopoDS)
98 ---Purpose: Make a Wire from three edges.
99 ---Level: Public
100 returns MakeWire from BRepLib;
101
102 Create(E1,E2,E3,E4 : Edge from TopoDS)
103 ---Purpose: Make a Wire from four edges.
104 ---Level: Public
105 returns MakeWire from BRepLib;
106
107 ----------------------------------------------
108 -- From wire and edge
109 ----------------------------------------------
110
111 Create(W : Wire from TopoDS)
112 ---Purpose: Make a Wire from a Wire. Usefull for adding later.
113 ---Level: Public
114 returns MakeWire from BRepLib;
115
116 Create(W : Wire from TopoDS; E : Edge from TopoDS)
117 ---Purpose: Add an edge to a wire.
118 ---Level: Public
119 returns MakeWire from BRepLib;
120
121 ----------------------------------------------
122 -- Auxiliary methods
123 ----------------------------------------------
124
125 Add(me : in out; E : Edge from TopoDS)
126 ---Purpose: Add the edge <E> to the current wire.
127 ---Level: Public
128 is static;
129
130 Add(me : in out; W : Wire from TopoDS)
131 ---Purpose: Add the edges of <W> to the current wire.
132 ---Level: Public
133 is static;
134
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.
139 ---Level: Public
140 is static;
141
142 ----------------------------------------------
143 -- Results
144 ----------------------------------------------
145
146 Error(me) returns WireError from BRepLib
147 ---Level: Public
148 is static;
149
150 Wire(me) returns Wire from TopoDS
151 ---Purpose: Returns the new wire.
152 --
153 ---C++: return const &
154 ---C++: alias "Standard_EXPORT operator TopoDS_Wire() const;"
155 ---Level: Public
156 raises
157 NotDone from StdFail
158 is static;
159
160 Edge(me) returns Edge from TopoDS
161 ---Purpose: Returns the last edge added to the wire.
162 --
163 ---C++: return const &
164 ---Level: Public
165 raises
166 NotDone from StdFail
167 is static;
168
169 Vertex(me) returns Vertex from TopoDS
170 ---Purpose: Returns the last connecting vertex.
171 --
172 ---C++: return const &
173 ---Level: Public
174 raises
175 NotDone from StdFail
176 is static;
177
178
179fields
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;
186
187end MakeWire;