1 |
import TSTTB; |
---|
2 |
|
---|
3 |
package TSTTG version 0.5.1 |
---|
4 |
{ |
---|
5 |
|
---|
6 |
//This file shows the high level organization of the methods into |
---|
7 |
//interface groupings and classes |
---|
8 |
|
---|
9 |
//==================================================================== |
---|
10 |
// Enumerator GEntityType |
---|
11 |
//==================================================================== |
---|
12 |
|
---|
13 |
/** |
---|
14 |
* TSTT supports zero-, one-, two-, and three-dimensional entities associated |
---|
15 |
* with a mesh infrastructure, we allow users to access these dimensional |
---|
16 |
* entities using the enumerated type EntityType which contains |
---|
17 |
* @param GVERTEX a zero-dimensional entity (value=0) |
---|
18 |
* @param GEDGE a one-dimensional entity (value=1) |
---|
19 |
* @param GFACE a two-dimensional entity (value=2) |
---|
20 |
* @param GREGION a three-dimensional entity (value=3) |
---|
21 |
* @param GNUMBER_OF_ENTITY_TYPES the number of entities (value=4) |
---|
22 |
* @param GALL_TYPES allows the user to request information about all |
---|
23 |
* entity types (value=5) |
---|
24 |
*/ |
---|
25 |
|
---|
26 |
enum GentityType { |
---|
27 |
GVERTEX, |
---|
28 |
GEDGE, |
---|
29 |
GFACE, |
---|
30 |
GREGION, |
---|
31 |
GALL_TYPES |
---|
32 |
} |
---|
33 |
|
---|
34 |
//=========================================================================== |
---|
35 |
// Fundamental interface from which all geometry related interfaces inherit. |
---|
36 |
//=========================================================================== |
---|
37 |
/** |
---|
38 |
* This serves as a base interface for all the TSTT geometry query interfaces. |
---|
39 |
* This interface does not have any methods. |
---|
40 |
*/ |
---|
41 |
interface Geometry { |
---|
42 |
|
---|
43 |
} |
---|
44 |
|
---|
45 |
//=========================================================================== |
---|
46 |
// Core entity set query through primitive arrays |
---|
47 |
//=========================================================================== |
---|
48 |
interface CoreQuery extends Geometry { |
---|
49 |
|
---|
50 |
//==========================gLoad============================= |
---|
51 |
/** |
---|
52 |
* Load a model specified by name. Which formats are supported and the |
---|
53 |
* specific meaning of this name string (e.g. file name, model name, |
---|
54 |
* etc.) are implementation-dependent. Options are also implementation- |
---|
55 |
* dependent. |
---|
56 |
* @param name Name of the model |
---|
57 |
* @param options String options |
---|
58 |
*/ |
---|
59 |
void gLoad(in string name, in array<string> options, |
---|
60 |
in int options_size) |
---|
61 |
throws TSTTB.Error; |
---|
62 |
|
---|
63 |
//==========================gSave============================= |
---|
64 |
/** |
---|
65 |
* Save a model to a file specified by name. Which formats are supported and the |
---|
66 |
* specific meaning of this name string (e.g. file name, model name, |
---|
67 |
* etc.) are implementation-dependent. Options are also implementation- |
---|
68 |
* dependent. |
---|
69 |
* @param name Name of the file to save to |
---|
70 |
* @param options String options |
---|
71 |
*/ |
---|
72 |
void gSave(in string name, in array<string> options, |
---|
73 |
in int options_size) |
---|
74 |
throws TSTTB.Error; |
---|
75 |
|
---|
76 |
} |
---|
77 |
|
---|
78 |
//=========================================================================== |
---|
79 |
// Topology functions |
---|
80 |
//=========================================================================== |
---|
81 |
/** |
---|
82 |
* Functions for evaluating topological characteristics of and relations |
---|
83 |
* between gentities of various dimensions. |
---|
84 |
*/ |
---|
85 |
interface Topology extends Geometry { |
---|
86 |
|
---|
87 |
//==========================gentitysetGetGentitiesOfType================= |
---|
88 |
/** |
---|
89 |
* Return gentities of specified dimension in this set, or in whole model. |
---|
90 |
* @param set_handle Entity set being queried (if 0, whole model) |
---|
91 |
* @param gentity_dimension Dimension of entities being queried |
---|
92 |
* @param gentity_handles Gentity handles |
---|
93 |
*/ |
---|
94 |
void gentitysetGetGentitiesOfType(in opaque set_handle, |
---|
95 |
in GentityType gentity_type, |
---|
96 |
inout array<opaque> gentity_handles, |
---|
97 |
out int gentity_handles_size) |
---|
98 |
throws TSTTB.Error; |
---|
99 |
|
---|
100 |
//==========================gentitysetGetNumberGentitiesOfType================= |
---|
101 |
/** |
---|
102 |
* Return number of gentities of specified dimension in this set, or in |
---|
103 |
* whole model. |
---|
104 |
* @param set_handle Entity set being queried (if 0, whole model) |
---|
105 |
* @param gentity_dimension Dimension of entities being queried |
---|
106 |
* @return Number of entities |
---|
107 |
*/ |
---|
108 |
int gentitysetGetNumberGentitiesOfType(in opaque set_handle, |
---|
109 |
in GentityType gentity_type) |
---|
110 |
throws TSTTB.Error; |
---|
111 |
|
---|
112 |
//==========================gentityGetType================= |
---|
113 |
/** |
---|
114 |
* Returns an integer array of topological dimensions for an input |
---|
115 |
* array of entity handles. |
---|
116 |
*/ |
---|
117 |
void gentityGetType(in array<opaque> gentity_handles, |
---|
118 |
in int gentity_handles_size, |
---|
119 |
inout array<GentityType> gtype, |
---|
120 |
inout int gtype_size) |
---|
121 |
throws TSTTB.Error; |
---|
122 |
|
---|
123 |
|
---|
124 |
//==========================gentityGetAdjacencies================= |
---|
125 |
/** |
---|
126 |
* Get the adjacent entities of a given dimension. |
---|
127 |
* @param gentity_handle Entity for which adjacencies are requested |
---|
128 |
* @param to_dimension Target dimension of adjacent entities |
---|
129 |
* @param adj_gentities List returned with adjacent entities |
---|
130 |
*/ |
---|
131 |
void gentityGetAdjacencies(in opaque gentity_handle, |
---|
132 |
in int to_dimension, |
---|
133 |
inout array<opaque> adj_gentities, |
---|
134 |
inout int adj_gentities_size) |
---|
135 |
throws TSTTB.Error; |
---|
136 |
|
---|
137 |
|
---|
138 |
//==========================gentityGet2OAdjacencies================= |
---|
139 |
/** |
---|
140 |
* Get the "2nd order" adjacent entities, through a specified "bridge" |
---|
141 |
* dimension, of a target dimension. For example, given a region, return |
---|
142 |
* the regions (to_dimension=3) sharing an edge (bridge_dimension=1) |
---|
143 |
* with that region. bridge_dimension must be less than dimension of |
---|
144 |
* gentity_handle, and to_dimension must be greater than bridge dimension. |
---|
145 |
* |
---|
146 |
* @param gentity_handle Entity for which 2nd order adjacencies are requested |
---|
147 |
* @param to_dimension Target dimension of 2nd order adjacent entities |
---|
148 |
* @param bridge_dimension Dimension of "bridge" entities |
---|
149 |
* @param adj_gentities List returned with 2nd order adjacent entities |
---|
150 |
*/ |
---|
151 |
void gentityGet2OAdjacencies(in opaque gentity_handle, |
---|
152 |
in int bridge_dimension, |
---|
153 |
in int to_dimension, |
---|
154 |
inout array<opaque> adjacent_gentities, |
---|
155 |
out int adjacent_gentities_size) |
---|
156 |
throws TSTTB.Error; |
---|
157 |
|
---|
158 |
//==========================gentityIsAdjacent================= |
---|
159 |
/** |
---|
160 |
* Return whether or not entities are adjacent. |
---|
161 |
* @param gentity_handle1 1st entity |
---|
162 |
* @param gentity_handle2 2nd entity |
---|
163 |
* @param are_adjacent If true, entities are adjacent |
---|
164 |
*/ |
---|
165 |
void gentityIsAdjacent(in opaque gentity_handle1, |
---|
166 |
in opaque gentity_handle2, |
---|
167 |
out bool are_adjacent) |
---|
168 |
throws TSTTB.Error; |
---|
169 |
|
---|
170 |
|
---|
171 |
} |
---|
172 |
|
---|
173 |
//=========================================================================== |
---|
174 |
// Shape functions |
---|
175 |
//=========================================================================== |
---|
176 |
/** |
---|
177 |
* Functions for evaluating shape characteristics of gentities of |
---|
178 |
* various dimensions. |
---|
179 |
*/ |
---|
180 |
interface Shape extends Geometry { |
---|
181 |
|
---|
182 |
//==========================gentityClosestPoint================= |
---|
183 |
/** |
---|
184 |
* Return a points on specified entities closest to specified points |
---|
185 |
* in space. Input coordinates and output points are interleaved in |
---|
186 |
* the arrays. |
---|
187 |
* @param gentity_handles The gentities being queried |
---|
188 |
* @param near_coordinates Input coordinates |
---|
189 |
* @param on_coordinates Closest point on gentity |
---|
190 |
*/ |
---|
191 |
void gentityClosestPoint(in array<opaque> gentity_handles, |
---|
192 |
in int gentity_handles_size, |
---|
193 |
in array <double> near_coordinates, |
---|
194 |
in int near_coordinates_size, |
---|
195 |
inout array <double> on_coordinates, |
---|
196 |
out int on_coordinates_size) |
---|
197 |
throws TSTTB.Error; |
---|
198 |
|
---|
199 |
//==========================gentityNormal================= |
---|
200 |
/** |
---|
201 |
* Return the normals at point on specified entities. Returns error |
---|
202 |
* if any input entity is not a gface. Input coordinates and normals |
---|
203 |
* are interleaved in the arrays. |
---|
204 |
* @param gentity_handles The gentities being queried |
---|
205 |
* @param coordinates Input coordinates, interleaved |
---|
206 |
* @param normals The normals at the specified points, interleaved |
---|
207 |
*/ |
---|
208 |
void gentityNormal(in array<opaque> gentity_handles, |
---|
209 |
in int gentity_handles_size, |
---|
210 |
in array <double> coordinates, |
---|
211 |
in int coordinates_size, |
---|
212 |
inout array <double> normals, |
---|
213 |
out int normals_size) |
---|
214 |
throws TSTTB.Error; |
---|
215 |
|
---|
216 |
//==========================gentityClosestPointAndNormal================= |
---|
217 |
/** |
---|
218 |
* Return points and normals on specified entities closest to specified points |
---|
219 |
* in space. Input coordinates and output points are interleaved in |
---|
220 |
* the arrays. |
---|
221 |
* @param gentity_handles The gentities being queried |
---|
222 |
* @param near_coordinates Input coordinates |
---|
223 |
* @param on_coordinates Closest point on gentity |
---|
224 |
* @param normals Normals on gentity |
---|
225 |
*/ |
---|
226 |
void gentityClosestPointAndNormal(in array<opaque> gentity_handles, |
---|
227 |
in int gentity_handles_size, |
---|
228 |
in array <double> near_coordinates, |
---|
229 |
in int near_coordinates_size, |
---|
230 |
inout array <double> on_coordinates, |
---|
231 |
out int on_coordinates_size, |
---|
232 |
inout array <double> normals, |
---|
233 |
out int normals_size) |
---|
234 |
throws TSTTB.Error; |
---|
235 |
|
---|
236 |
//==========================gentityTangent================= |
---|
237 |
/** |
---|
238 |
* Return the tangent at point on specified entities. Returns error |
---|
239 |
* if any input entity is not a gedge. Input coordinates and tangents |
---|
240 |
* are interleaved in the arrays. |
---|
241 |
* @param gentity_handles The gentities being queried |
---|
242 |
* @param coordinates Input coordinates, interleaved |
---|
243 |
* @param tangents The tangents at the specified points, interleaved |
---|
244 |
*/ |
---|
245 |
void gentityTangent(in array<opaque> gentity_handles, |
---|
246 |
in int gentity_handles_size, |
---|
247 |
in array <double> coordinates, |
---|
248 |
in int coordinates_size, |
---|
249 |
inout array <double> tangents, |
---|
250 |
out int tangents_size) |
---|
251 |
throws TSTTB.Error; |
---|
252 |
|
---|
253 |
// Various Derivatives |
---|
254 |
|
---|
255 |
//==========================gentityBoundingBox================= |
---|
256 |
/** |
---|
257 |
* Return the bounding boxex of given entities; coordinates returned |
---|
258 |
* interleaved. |
---|
259 |
* @param gentity_handles The gentities being queried |
---|
260 |
* @param min_corners Minimum corner coordinates of the boxes, interleaved |
---|
261 |
* @param max_corners Maximum corner coordinates of the boxes, interleaved |
---|
262 |
*/ |
---|
263 |
void gentityBoundingBox(in array<opaque> gentity_handles, |
---|
264 |
in int gentity_handles_size, |
---|
265 |
inout array <double> min_corner, |
---|
266 |
out int min_corner_size, |
---|
267 |
inout array <double> max_corner, |
---|
268 |
out int max_corner_size) |
---|
269 |
throws TSTTB.Error; |
---|
270 |
|
---|
271 |
//==========================getGvertexCoordinates================= |
---|
272 |
/** |
---|
273 |
* Return the coordinates of the specified vertices; returns error if any |
---|
274 |
* of the entities are not gvertices. Coordinates returned interleaved. |
---|
275 |
* @param gentity_handles The gentities being queried |
---|
276 |
* @param coordinates The coordinates of the gvertices, interleaved. |
---|
277 |
*/ |
---|
278 |
void getGvertexCoordinates(in array<opaque> gentity_handles, |
---|
279 |
in int gentity_handles_size, |
---|
280 |
inout array <double> coordinates, |
---|
281 |
out int coordinates_size) |
---|
282 |
throws TSTTB.Error; |
---|
283 |
|
---|
284 |
//==========================getGnormalSense================= |
---|
285 |
/** |
---|
286 |
* Return the sense of a gface with respect to a gregion. Sense is either |
---|
287 |
* forward (=1), reverse (=-1), both (=2), or unknown (=0). Error is returned |
---|
288 |
* if first entity is not a gface or second entity is not a gregion. |
---|
289 |
* @param gface Gface whose sense is being queried. |
---|
290 |
* @param gregion Gregion gface is being queried with respect to |
---|
291 |
*/ |
---|
292 |
int getGnormalSense(in opaque gface, |
---|
293 |
in opaque gregion) |
---|
294 |
throws TSTTB.Error; |
---|
295 |
|
---|
296 |
//==========================getGtangentSense================= |
---|
297 |
/** |
---|
298 |
* Return the sense of a gedge with respect to a gface. Sense is either |
---|
299 |
* forward (=1), reverse (=-1), both (=2), or unknown (=0). Error is returned |
---|
300 |
* if first entity is not a gedge or second entity is not a gface. |
---|
301 |
* @param gedge Gedge whose sense is being queried. |
---|
302 |
* @param gface Gface gedge is being queried with respect to |
---|
303 |
*/ |
---|
304 |
int getGtangentSense(in opaque gedge, |
---|
305 |
in opaque gface) |
---|
306 |
throws TSTTB.Error; |
---|
307 |
|
---|
308 |
//==========================getGvertexTangentSense================= |
---|
309 |
/** |
---|
310 |
* Return the sense of a gedge with respect to a specified order of |
---|
311 |
* vertices bounding the gedge. Sense is either forward (=1), reverse (=-1), |
---|
312 |
* or unknown (=0). Error is returned if any gentities are not the expected |
---|
313 |
* type or if the gedge is bounded by only one gvertex (in this case, use |
---|
314 |
* getGtangentSense). |
---|
315 |
* @param gedge Gedge whose sense is being queried. |
---|
316 |
* @param gvertex1 First gvertex |
---|
317 |
* @param gvertex2 Second gvertex |
---|
318 |
*/ |
---|
319 |
int getGvertexTangentSense(in opaque gedge, |
---|
320 |
in opaque gvertex1, |
---|
321 |
in opaque gvertex2) |
---|
322 |
throws TSTTB.Error; |
---|
323 |
|
---|
324 |
} |
---|
325 |
|
---|
326 |
//=========================================================================== |
---|
327 |
// Parametric interface |
---|
328 |
//=========================================================================== |
---|
329 |
/** |
---|
330 |
* Functions dealing with parametric space and parameter-based evaluation |
---|
331 |
*/ |
---|
332 |
interface Parametric extends Geometry { |
---|
333 |
|
---|
334 |
//==========================gentityIsParametric================= |
---|
335 |
/** |
---|
336 |
* Return whether a given gentity is parametric or not. If a gentity |
---|
337 |
* is not parametric, all of the following functions will return an error |
---|
338 |
* when called on that entity. |
---|
339 |
* @param gentity_handle Gentity being queried. |
---|
340 |
*/ |
---|
341 |
int gentityIsParametric(in opaque gentity_handle) |
---|
342 |
throws TSTTB.Error; |
---|
343 |
|
---|
344 |
//==========================gentityUvToXyz================= |
---|
345 |
/** |
---|
346 |
* Given sets of parametric coordinates, return the corresponding real |
---|
347 |
* space coordinates on the gentities. Input and output coordinates are |
---|
348 |
* interleaved. |
---|
349 |
* @param gentity_handles Gentities being queried. |
---|
350 |
* @param uv Input parametric coordinates |
---|
351 |
* @param xyz Output real space coordinates |
---|
352 |
*/ |
---|
353 |
void gentityUvToXyz(in array<opaque> gentity_handles, |
---|
354 |
in int gentity_handles_size, |
---|
355 |
in array <double> uv, |
---|
356 |
in int uv_size, |
---|
357 |
inout array <double> coordinates, |
---|
358 |
out int coordinates_size) |
---|
359 |
throws TSTTB.Error; |
---|
360 |
|
---|
361 |
//==========================gentityXyzToUv================= |
---|
362 |
/** |
---|
363 |
* Given sets of real space coordinates, return the corresponding |
---|
364 |
* parametric coordinates on the gentities. Input and output coordinates |
---|
365 |
* are interleaved. |
---|
366 |
* @param gentity_handles Gentities being queried. |
---|
367 |
* @param xyz Input real space coordinates |
---|
368 |
* @param uv Output parametric coordinates |
---|
369 |
*/ |
---|
370 |
void gentityXyzToUv(in array<opaque> gentity_handles, |
---|
371 |
in int gentity_handles_size, |
---|
372 |
in array <double> coordinates, |
---|
373 |
in int coordinates_size, |
---|
374 |
inout array <double> uv, |
---|
375 |
out int uv_size) |
---|
376 |
throws TSTTB.Error; |
---|
377 |
|
---|
378 |
//==========================gentityUvRange================= |
---|
379 |
/** |
---|
380 |
* Return the uv range of the specified gentities. Parameters are interleaved. |
---|
381 |
* @param gentity_handles Gentities being queried. |
---|
382 |
* @param uv_min Minimum parameters of gentities, interleaved |
---|
383 |
* @param uv_max Maximum parameters of gentities, interleaved |
---|
384 |
*/ |
---|
385 |
void gentityUvRange(in array<opaque> gentity_handles, |
---|
386 |
in int gentity_handles_size, |
---|
387 |
inout array <double> uv_min, |
---|
388 |
out int uv_min_size, |
---|
389 |
inout array <double> uv_max, |
---|
390 |
out int uv_max_size) |
---|
391 |
throws TSTTB.Error; |
---|
392 |
|
---|
393 |
//==========================getAdjacentUv================= |
---|
394 |
/** |
---|
395 |
* Given source gentities, parametric positions on those gentities, and |
---|
396 |
* bounding gentities, return the parametric positions on the bounding |
---|
397 |
* gentities. If a source gentity is a gvertex, parametric positions for |
---|
398 |
* that entry are ignored. In cases where multiple source entities are |
---|
399 |
* input, two input and output parameters per gentity is assumed, even if |
---|
400 |
* input consists only of gedges or gvertices. |
---|
401 |
* @param src_gentity_handles Source gentities |
---|
402 |
* @param src_uv Uv positions on source gentities |
---|
403 |
* @param trg_gentity_handles Target gentities |
---|
404 |
* @param trg_uv Uv positions on target gentities |
---|
405 |
*/ |
---|
406 |
void Greparam_edge_face(in array<opaque> src_gentity_handles, |
---|
407 |
in int src_gentity_handles_size, |
---|
408 |
in array<double> src_uv, |
---|
409 |
in int src_uv_size, |
---|
410 |
in array<opaque> trg_gentity_handles, |
---|
411 |
in int trg_gentity_handles_size, |
---|
412 |
in array<double> trg_uv, |
---|
413 |
in int trg_uv_size) |
---|
414 |
throws TSTTB.Error; |
---|
415 |
|
---|
416 |
//==========================gentityNormalUv================= |
---|
417 |
/** |
---|
418 |
* Return the normals at specified uv positions on gfaces. If any |
---|
419 |
* gentity input is not a face, returns error. Input parameters and |
---|
420 |
* output normals are interleaved. |
---|
421 |
* @param gface_handles The entities being queried |
---|
422 |
* @param parameters The uv parameters of points being queried, interleaved |
---|
423 |
* @param normals Normals at specified points, interleaved |
---|
424 |
*/ |
---|
425 |
void gentityNormalUv(in array<opaque> gface_handles, |
---|
426 |
in int gface_handles_size, |
---|
427 |
in array <double> parameters, |
---|
428 |
in int parameters_size, |
---|
429 |
inout array <double> normals, |
---|
430 |
in int normals_size) |
---|
431 |
throws TSTTB.Error; |
---|
432 |
|
---|
433 |
//==========================gentityTangentU================= |
---|
434 |
/** |
---|
435 |
* Return the tangents at specified u positions on gedges. If any |
---|
436 |
* gentity input is not a face, returns error. Output normals are |
---|
437 |
* interleaved. |
---|
438 |
* @param gentity_handles The gedges being queried |
---|
439 |
* @param parameters The u parameters of points being queried |
---|
440 |
* @param tangents Tangents at specified points, interleaved |
---|
441 |
*/ |
---|
442 |
void gentityTangentU(in array<opaque> gedge_handles, |
---|
443 |
in int gedge_handles_size, |
---|
444 |
in array <double> parameters, |
---|
445 |
in int parameters_size, |
---|
446 |
inout array <double> tangents, |
---|
447 |
out int tangents_size) |
---|
448 |
throws TSTTB.Error; |
---|
449 |
|
---|
450 |
} |
---|
451 |
|
---|
452 |
|
---|
453 |
//=========================================================================== |
---|
454 |
// Tolerance interface |
---|
455 |
//=========================================================================== |
---|
456 |
/** |
---|
457 |
* Tolerances (relative and absolute) for models and gentities in a model |
---|
458 |
*/ |
---|
459 |
interface Tolerance extends Geometry { |
---|
460 |
|
---|
461 |
//==========================getGtolerance================= |
---|
462 |
/** |
---|
463 |
* Return the relative and absolute tolerances at the modeler level. If |
---|
464 |
* model does not have a modeler-wide tolerance, zero is returned for both |
---|
465 |
* values. |
---|
466 |
* @param relative_tolerance Relative tolerance for model as a whole |
---|
467 |
* @param absolute_tolerance Absolute tolerance for model as a whole |
---|
468 |
*/ |
---|
469 |
void getGtolerance(out double relative_tolerance, |
---|
470 |
out double absolute_tolerance) |
---|
471 |
throws TSTTB.Error; |
---|
472 |
|
---|
473 |
//==========================getGentityTolerance================= |
---|
474 |
/** |
---|
475 |
* Return the relative and absolute tolerances for specified gentities. If |
---|
476 |
* a gentity does not have a specific tolerance, zero is returned for both |
---|
477 |
* values. |
---|
478 |
* @param gentity_handles Gentities being queried |
---|
479 |
* @param relative_tolerances Relative tolerances |
---|
480 |
* @param absolute_tolerances Absolute tolerances |
---|
481 |
*/ |
---|
482 |
void getGentityTolerance(in array<opaque> gentity_handles, |
---|
483 |
in int gentity_handles_size, |
---|
484 |
inout array<double> relative_tolerances, |
---|
485 |
out int relative_tolerances_size, |
---|
486 |
inout array<double> absolute_tolerances, |
---|
487 |
out int absolute_tolerances_size) |
---|
488 |
throws TSTTB.Error; |
---|
489 |
|
---|
490 |
} |
---|
491 |
|
---|
492 |
//=========================================================================== |
---|
493 |
// Iterators interface |
---|
494 |
//=========================================================================== |
---|
495 |
/** |
---|
496 |
* This interface provides a means for iterating over all gentities of |
---|
497 |
* a given topological dimension |
---|
498 |
*/ |
---|
499 |
interface Iterators extends Geometry { |
---|
500 |
|
---|
501 |
//==========================gentityIteratorInit================= |
---|
502 |
/** |
---|
503 |
* Initialize an iterator over gentities of a specified dimension. |
---|
504 |
* @param gentity_dimension Dimension of gentities to be iterated over |
---|
505 |
* @param gentity_iterator Iterator initialized by this function |
---|
506 |
*/ |
---|
507 |
void gentityIteratorInit(in int gentity_dimension, |
---|
508 |
out opaque gentity_iterator) |
---|
509 |
throws TSTTB.Error; |
---|
510 |
|
---|
511 |
//==========================gentityIteratorNext================= |
---|
512 |
/** |
---|
513 |
* Get the next entity for this iterator. |
---|
514 |
* @param gentity_iterator Iterator being iterated over |
---|
515 |
* @param gentity_handle Next gentity |
---|
516 |
* @return If true, there are more gentities, if false, this is the last one |
---|
517 |
*/ |
---|
518 |
bool gentityIteratorNext(inout opaque gentity_iterator, |
---|
519 |
out opaque gentity_handle) |
---|
520 |
throws TSTTB.Error; |
---|
521 |
|
---|
522 |
//==========================gentityIteratorReset================= |
---|
523 |
/** |
---|
524 |
* Reset an iterator back to the first gentity |
---|
525 |
* @param gentity_iterator Iterator reset by this function |
---|
526 |
*/ |
---|
527 |
void gentityIteratorReset (inout opaque gentity_iterator) |
---|
528 |
throws TSTTB.Error; |
---|
529 |
|
---|
530 |
//==========================gentityIteratorDelete================= |
---|
531 |
/** |
---|
532 |
* Delete an iterator |
---|
533 |
* @param gentity_iterator Iterator deleted by this function |
---|
534 |
*/ |
---|
535 |
void gentityIteratorDelete (in opaque Gentity_dim_iterator) |
---|
536 |
throws TSTTB.Error; |
---|
537 |
|
---|
538 |
} |
---|
539 |
|
---|
540 |
|
---|
541 |
interface Modify extends Geometry |
---|
542 |
{ |
---|
543 |
} |
---|
544 |
|
---|
545 |
interface Construct extends Modify |
---|
546 |
{ |
---|
547 |
/* Duplicate the input entity |
---|
548 |
*/ |
---|
549 |
void Copy(in opaque geom_entity, |
---|
550 |
out opaque geom_entity2) |
---|
551 |
throws TSTTB.Error; |
---|
552 |
|
---|
553 |
/* Sweep the entity around axis specified by normal, by angle specified in degrees. |
---|
554 |
* Generates a new entity, leaving input entity unchanged. |
---|
555 |
* Result undefined if region (dim = 3) is specified |
---|
556 |
*/ |
---|
557 |
void SweepAboutAxis(in opaque geom_entity, |
---|
558 |
in double angle, |
---|
559 |
in double axis_normal_x, |
---|
560 |
in double axis_normal_y, |
---|
561 |
in double axis_normal_z, |
---|
562 |
out opaque geom_entity2) |
---|
563 |
throws TSTTB.Error; |
---|
564 |
|
---|
565 |
/* Delete the specified entity. Deletes any lower-dimensional entities. |
---|
566 |
* Result undefined if any higher-dimensional entities still use input |
---|
567 |
* entity. |
---|
568 |
*/ |
---|
569 |
void Delete(in opaque geom_entity) |
---|
570 |
throws TSTTB.Error; |
---|
571 |
} |
---|
572 |
|
---|
573 |
interface Primitives extends Modify |
---|
574 |
{ |
---|
575 |
/* Construct a brick with specified dimensions. If both y and z are |
---|
576 |
* zero, a cube of dimension x is constructed. |
---|
577 |
* Result is undefined if only one dimension is zero. |
---|
578 |
*/ |
---|
579 |
void Brick(in double x, in double y, in double z, |
---|
580 |
out opaque geom_entity) |
---|
581 |
throws TSTTB.Error; |
---|
582 |
|
---|
583 |
/* Construct a cylinder with specified height and major/minor radii. |
---|
584 |
* Major radius is along x axis, minor along y axis, and height along z. |
---|
585 |
* If minor radius is zero, a circular cylinder is produced. |
---|
586 |
*/ |
---|
587 |
void Cylinder(in double height, in double major_rad, in double minor_rad, |
---|
588 |
out opaque geom_entity) |
---|
589 |
throws TSTTB.Error; |
---|
590 |
|
---|
591 |
/* Construct a torus with circular cross-section, with major and minor |
---|
592 |
* radii specified. Torus is aligned with z axis, i.e. the locus of points |
---|
593 |
* defined by the cross-section centers lies in the xy plane. |
---|
594 |
*/ |
---|
595 |
void Torus(in double major_rad, in double minor_rad, |
---|
596 |
out opaque geom_entity) |
---|
597 |
throws TSTTB.Error; |
---|
598 |
} |
---|
599 |
|
---|
600 |
interface Transforms extends Modify |
---|
601 |
{ |
---|
602 |
/* Move the specified entity by the specified vector |
---|
603 |
*/ |
---|
604 |
void Move(inout opaque geom_entity, |
---|
605 |
in double x, in double y, in double z) |
---|
606 |
throws TSTTB.Error; |
---|
607 |
|
---|
608 |
/* Rotate the specified entity the specified angle (in degrees) about the |
---|
609 |
* specified axis; axis_normal is assumed to pass through the origin. |
---|
610 |
*/ |
---|
611 |
void Rotate(inout opaque geom_entity, |
---|
612 |
in double angle, |
---|
613 |
in double axis_normal_x, |
---|
614 |
in double axis_normal_y, |
---|
615 |
in double axis_normal_z) |
---|
616 |
throws TSTTB.Error; |
---|
617 |
|
---|
618 |
/* Reflect the specified entity through a plane defined by the specified normal |
---|
619 |
*/ |
---|
620 |
void Reflect(inout opaque geom_entity, |
---|
621 |
in double plane_normal_x, |
---|
622 |
in double plane_normal_y, |
---|
623 |
in double plane_normal_z) |
---|
624 |
throws TSTTB.Error; |
---|
625 |
|
---|
626 |
/* scale the specified entity |
---|
627 |
*/ |
---|
628 |
void Scale(inout opaque geom_entity, |
---|
629 |
in double scale_x, |
---|
630 |
in double scale_y, |
---|
631 |
in double scale_z) |
---|
632 |
throws TSTTB.Error; |
---|
633 |
} |
---|
634 |
|
---|
635 |
interface Booleans extends Modify |
---|
636 |
{ |
---|
637 |
/* Unite the specified entities, resulting in a new entity; original entities |
---|
638 |
* are unmodified |
---|
639 |
*/ |
---|
640 |
void Unite(in array<opaque> geom_entities, |
---|
641 |
in int geom_entities_size, |
---|
642 |
out opaque geom_entity) |
---|
643 |
throws TSTTB.Error; |
---|
644 |
|
---|
645 |
/* Subtract the tool from the blank, resulting in a new entity; original |
---|
646 |
* entities are unmodified |
---|
647 |
*/ |
---|
648 |
void Subtract(in opaque blank, in opaque tool, |
---|
649 |
out opaque geom_entity) |
---|
650 |
throws TSTTB.Error; |
---|
651 |
|
---|
652 |
/* Cut the specified entity with a plane containing the origin defined by |
---|
653 |
* the specified normal, discarding anything on the negative side of the |
---|
654 |
* plane (as defined by the normal direction). If offset is specified, |
---|
655 |
* plane is offset along the normal direction by the specified distance. |
---|
656 |
* If reverse is true, positive side of the plane is discarded instead. |
---|
657 |
*/ |
---|
658 |
void Section(inout opaque geom_entity, |
---|
659 |
in double plane_normal_x, |
---|
660 |
in double plane_normal_y, |
---|
661 |
in double plane_normal_z, |
---|
662 |
in double offset, in bool reverse, |
---|
663 |
out opaque geom_entity2) |
---|
664 |
throws TSTTB.Error; |
---|
665 |
|
---|
666 |
/* Imprint the entities in the input list together. |
---|
667 |
*/ |
---|
668 |
void Imprint(in array<opaque> geom_entities, |
---|
669 |
in int geom_entities_size) |
---|
670 |
throws TSTTB.Error; |
---|
671 |
|
---|
672 |
/* Merge coincident topology in the entities in the input list. |
---|
673 |
*/ |
---|
674 |
void Merge(in array<opaque> geom_entities, |
---|
675 |
in int geom_entities_size, |
---|
676 |
in double tolerance) |
---|
677 |
throws TSTTB.Error; |
---|
678 |
} |
---|
679 |
} |
---|
680 |
|
---|