Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 1991-06-24 |
2 | -- Created by: Christophe MARION | |
3 | -- Copyright (c) 1991-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 | -- |
d5f74e42 | 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 | |
973c2be1 | 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 | |
17 | package DrawTrSurf | |
18 | ||
19 | ---Purpose: This package supports the display of parametric | |
20 | -- curves and surfaces. | |
21 | -- | |
22 | -- The Drawable deferred classes is inherited from | |
23 | -- the Drawable3D class from the package Draw, it | |
24 | -- adds methods to draw 3D Curves and Curves on 3D | |
25 | -- Surfaces. | |
26 | -- | |
27 | -- The classes Curve Curve2d and Surface are drawable | |
28 | -- and can be used to draw a single curve from | |
29 | -- packages Geom or Geom2d or a surface from Geom. | |
30 | -- | |
31 | -- The Triangulation and Polygon from the package | |
32 | -- Poly are also supported. | |
33 | ||
34 | uses | |
35 | MMgt, | |
36 | TCollection, | |
37 | TColStd, | |
38 | Draw, | |
39 | Adaptor3d, | |
40 | Adaptor2d, | |
41 | GeomAbs, | |
42 | Geom, | |
43 | Geom2d, | |
44 | gp, | |
45 | Poly | |
46 | ||
47 | is | |
48 | ||
49 | deferred class Drawable; | |
50 | ||
51 | class Point; | |
52 | ||
53 | class Curve; | |
54 | ||
55 | class BSplineCurve; | |
56 | ||
57 | class BezierCurve; | |
58 | ||
59 | ||
60 | class Curve2d; | |
61 | ||
62 | class BSplineCurve2d; | |
63 | ||
64 | class BezierCurve2d; | |
65 | ||
66 | class Triangulation2D; | |
67 | ||
68 | class Surface; | |
69 | ||
70 | class BSplineSurface; | |
71 | ||
72 | class BezierSurface; | |
73 | ||
74 | class Triangulation; | |
75 | ||
76 | class Polygon3D; | |
77 | ||
78 | class Polygon2D; | |
79 | ||
80 | ||
81 | -- | |
82 | -- package methods to handle named points curves and surface. | |
83 | -- | |
84 | ||
85 | Set(Name : CString; G : Pnt from gp); | |
86 | ---Purpose: Sets <G> in the variable <Name>. Overwrite the | |
87 | -- variable if already set. | |
88 | ||
89 | Set(Name : CString; G : Pnt2d from gp); | |
90 | ---Purpose: Sets <G> in the variable <Name>. Overwrite the | |
91 | -- variable if already set. | |
92 | ||
445f3267 S |
93 | Set(Name : CString; G : Geometry from Geom; |
94 | isSenseMarker : Boolean = Standard_True); | |
7fd59977 | 95 | ---Purpose: Sets <G> in the variable <Name>. Overwrite the |
96 | -- variable if already set. | |
445f3267 S |
97 | -- isSenseMarker indicates whether to render the |
98 | -- sense glyph (arrow) for curves or not | |
7fd59977 | 99 | |
445f3267 S |
100 | Set(Name : CString; C : Curve from Geom2d; |
101 | isSenseMarker : Boolean = Standard_True); | |
7fd59977 | 102 | ---Purpose: Sets <C> in the variable <Name>. Overwrite the |
103 | -- variable if already set. | |
445f3267 S |
104 | -- isSenseMarker indicates whether to render the |
105 | -- sense glyph (arrow) for curves or not | |
7fd59977 | 106 | |
107 | Set(Name : CString; T : Triangulation from Poly); | |
108 | ---Purpose: Sets <T> in the variable <Name>. Overwrite the | |
109 | -- variable if already set. | |
110 | ||
111 | Set(Name : CString; P : Polygon3D from Poly); | |
112 | ---Purpose: Sets <P> in the variable <Name>. Overwrite the | |
113 | -- variable if already set. | |
114 | ||
115 | Set(Name : CString; P : Polygon2D from Poly); | |
116 | ---Purpose: Sets <P> in the variable <Name>. Overwrite the | |
117 | -- variable if already set. | |
118 | ||
119 | ||
120 | -- if the variable name is a void string a graphic selection is made. | |
121 | ||
122 | Get(Name : in out CString) returns Geometry from Geom; | |
123 | ---Purpose: Get the variable <S>. Returns a null handle if | |
124 | -- none, and print a warning message. | |
125 | ||
126 | GetPoint(Name : in out CString; P : in out Pnt from gp) | |
127 | returns Boolean; | |
128 | ---Purpose: Gets the variable. Returns False if none and print | |
129 | -- a warning message. | |
130 | ||
131 | GetPoint2d(Name : in out CString; P : in out Pnt2d from gp) | |
132 | returns Boolean; | |
133 | ---Purpose: Gets the variable. Returns False if none and print | |
134 | -- a warning message. | |
135 | ||
136 | GetCurve(Name : in out CString) returns Curve from Geom; | |
137 | ---Purpose: Get the variable <S>. Returns a null handle if | |
138 | -- none, and print a warning message. | |
139 | ||
140 | GetBezierCurve(Name : in out CString) returns BezierCurve from Geom; | |
141 | ---Purpose: Get the variable <S>. Returns a null handle if | |
142 | -- none, and print a warning message. | |
143 | ||
144 | GetBSplineCurve(Name : in out CString) returns BSplineCurve from Geom; | |
145 | ---Purpose: Get the variable <S>. Returns a null handle if | |
146 | -- none, and print a warning message. | |
147 | ||
148 | GetCurve2d(Name : in out CString) returns Curve from Geom2d; | |
149 | ---Purpose: Get the variable <S>. Returns a null handle if | |
150 | -- none, and print a warning message. | |
151 | ||
152 | GetBezierCurve2d(Name : in out CString) returns BezierCurve from Geom2d; | |
153 | ---Purpose: Get the variable <S>. Returns a null handle if | |
154 | -- none, and print a warning message. | |
155 | ||
156 | GetBSplineCurve2d(Name : in out CString) returns BSplineCurve from Geom2d; | |
157 | ---Purpose: Get the variable <S>. Returns a null handle if | |
158 | -- none, and print a warning message. | |
159 | ||
160 | GetSurface(Name : in out CString) returns Surface from Geom; | |
161 | ---Purpose: Get the variable <S>. Returns a null handle if | |
162 | -- none, and print a warning message. | |
163 | ||
164 | GetBezierSurface(Name : in out CString) returns BezierSurface from Geom; | |
165 | ---Purpose: Get the variable <S>. Returns a null handle if | |
166 | -- none, and print a warning message. | |
167 | ||
168 | GetBSplineSurface(Name : in out CString) returns BSplineSurface from Geom; | |
169 | ---Purpose: Get the variable <S>. Returns a null handle if | |
170 | -- none, and print a warning message. | |
171 | ||
172 | GetTriangulation(Name : in out CString) returns Triangulation from Poly; | |
173 | ---Purpose: Get the variable <S>. Returns a null handle if | |
174 | -- none, and print a warning message. | |
175 | ||
176 | GetPolygon3D(Name : in out CString) returns Polygon3D from Poly; | |
177 | ---Purpose: Get the variable <S>. Returns a null handle if | |
178 | -- none, and print a warning message. | |
179 | ||
180 | GetPolygon2D(Name : in out CString) returns Polygon2D from Poly; | |
181 | ---Purpose: Get the variable <S>. Returns a null handle if | |
182 | -- none, and print a warning message. | |
183 | ||
184 | ||
185 | ||
186 | BasicCommands(I : in out Interpretor from Draw); | |
187 | ---Purpose: defines display commands. | |
188 | ||
189 | end DrawTrSurf; |