0024428: Implementation of LGPL license
[occt.git] / src / BRepLib / BRepLib_MakePolygon.cdl
CommitLineData
b311480e 1-- Created on: 1993-07-29
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 MakePolygon from BRepLib inherits MakeShape from BRepLib
18
19 ---Purpose: Class to build polygonal wires.
20 --
21 -- A polygonal wire may be build from
22 --
23 -- - 2,4,3 points.
24 --
25 -- - 2,3,4 vertices.
26 --
27 -- - any number of points.
28 --
29 -- - any number of vertices.
30 --
31 --
32 -- When a point or vertex is added to the polygon if
33 -- it is identic to the previous point no edge is
34 -- built. The method added can be used to test it.
35
36uses
37 Wire from TopoDS,
38 Edge from TopoDS,
39 Vertex from TopoDS,
40 Pnt from gp
41
42raises
43 NotDone from StdFail
44
45is
46 Create
47 returns MakePolygon from BRepLib;
48 ---Purpose: Creates an empty MakePolygon.
49 ---Level: Public
50
51 Create(P1, P2 : Pnt from gp)
52 ---Level: Public
53 returns MakePolygon from BRepLib;
54
55 Create(P1, P2, P3 : Pnt from gp;
56 Close : Boolean = Standard_False)
57 ---Level: Public
58 returns MakePolygon from BRepLib;
59
60 Create(P1, P2, P3, P4 : Pnt from gp;
61 Close : Boolean = Standard_False)
62 ---Level: Public
63 returns MakePolygon from BRepLib;
64
65 Create(V1, V2 : Vertex from TopoDS)
66 ---Level: Public
67 returns MakePolygon from BRepLib;
68
69 Create(V1, V2, V3 : Vertex from TopoDS;
70 Close : Boolean = Standard_False)
71 ---Level: Public
72 returns MakePolygon from BRepLib;
73
74 Create(V1, V2, V3, V4 : Vertex from TopoDS;
75 Close : Boolean = Standard_False)
76 ---Level: Public
77 returns MakePolygon from BRepLib;
78
79
80 Add(me : in out; P : Pnt from gp)
81 ---Level: Public
82 is static;
83
84 Add(me : in out; V : Vertex from TopoDS)
85 ---Level: Public
86 is static;
87
88 Added(me) returns Boolean
89 ---Purpose: Returns True if the last vertex or point was
90 -- succesfully added.
91 ---Level: Public
92 is static;
93
94 Close(me : in out)
95 ---Level: Public
96 is static;
97
98 FirstVertex(me) returns Vertex from TopoDS
99 ---C++: return const &
100 ---Level: Public
101 is static;
102
103 LastVertex(me) returns Vertex from TopoDS
104 ---C++: return const &
105 ---Level: Public
106 is static;
107
108 Edge(me) returns Edge from TopoDS
109 ---Purpose: Returns the last edge added to the polygon.
110 --
111 ---C++: return const &
112 ---C++: alias "Standard_EXPORT operator TopoDS_Edge() const;"
113 ---Level: Public
114 raises
115 NotDone from StdFail
116 is static;
117
118 Wire(me) returns Wire from TopoDS
119 ---C++: return const &
120 ---C++: alias "Standard_EXPORT operator TopoDS_Wire() const;"
121 ---Level: Public
122 raises
123 NotDone from StdFail
124 is static;
125
126fields
127
128 myFirstVertex : Vertex from TopoDS;
129 myLastVertex : Vertex from TopoDS;
130 myEdge : Edge from TopoDS;
131
132end MakePolygon;