root/cgm/cgm_apps/ccapi/geom/GeometryTool_ccapi.cpp @ 1040

Revision 1040, 97.5 KB (checked in by tautges, 2 years ago)

Version 10.2 of cgm.

Line 
1/**
2 * \file geom_ccapi.cpp
3 *
4 * \brief C api to classes in CUBIT geom subdirectory
5 *
6 * This file contains api functions for public members of the following classes:
7 *
8 * GeometryTool
9 * MergeTool
10 *
11 * Classes should not be added to this list unless they are located in this
12 * subdirectory (avoids illegal dependencies between directories)
13 *
14 * These functions are compiled with the C++ compiler (so that they
15 * can call C++ member functions and understand C++ classes), but with
16 * linkage for the C language (so they can be called from C functions)
17 *
18 * NAMING CONVENTIONS
19 * In general, given a CUBIT class ClassName, which uses the CUBIT
20 * convention for naming classes, the api functions that access member
21 * functions will have the same name, but with a CN_ prefix.  For example,
22 * ClassName::function_name() will have a corresponding api function
23 * CN_function_name(). 
24 *
25 * ARGUMENT AND RETURN TYPE CONVERSION CONVENTIONS
26 * Some types of arguments and return types are not usable in C, namely
27 * classes and their pointers.  Therefore, the following types of arguments
28 * and return types are converted to or from (void *) before being input to or
29 * output from these api functions:
30 *
31 * CubitClass *, CubitClass &, CubitClass *&, DLCubitEntList &, DLCubitEntList *&
32 *
33 * AUXILLIARY DATASTRUCTURES
34 * Certain CUBIT objects are used extensively in the geometry interface; it
35 * makes sense to define auxilliary structures which hold the data in these
36 * classes, and which can be used directly in the application code.  Auxilliary
37 * structures are named by appending 'Struct' to the CUBIT class name,
38 * e.g. CubitVectorStruct.  The CUBIT classes for which auxilliary
39 * structures are defined are:
40 *
41 * CubitVector, CubitPlane, CubitBox
42 *
43 * In addition, (char *) is used in place of CubitString.
44 *
45 * The argument and return type conversions between these classes and
46 * their structures are defined as follows, where Xxx denotes the CUBIT
47 * class name:
48 *
49 * Xxx *  => XxxStruct *
50 * Xxx &  => XxxStruct &
51 * DLXxxList &  => XxxStruct **
52 * DLXxxList *& => XxxStruct ***
53 *
54 * \author Tim Tautges
55 *
56 * \date 1/2000
57 *
58 */
59
60#include "GeometryTool_ccapi.h"
61#include "GeometryTool.hpp"
62#include "CubitDefines.h"
63#include "GeometryDefines.h"
64#include "SolidModelingEngine.hpp"
65#include "RefEntity.hpp"
66#include "RefVertex.hpp"
67#include "RefEdge.hpp"
68#include "RefFace.hpp"
69#include "RefVolume.hpp"
70#include "RefAssembly.hpp"
71#include "RefPart.hpp"
72#include "RefCoordSys.hpp"
73#include "Chain.hpp"
74#include "Loop.hpp"
75#include "Shell.hpp"
76#include "Body.hpp"
77#include "Lump.hpp"
78#include "SurfaceSM.hpp"
79#include "CurveSM.hpp"
80#include "PointSM.hpp"
81#include "BodySM.hpp"
82#include "ShellSM.hpp"
83#include "LoopSM.hpp"
84#include "CoEdgeSM.hpp"
85#include "CubitVector.hpp"
86#include "CubitPlane.hpp"
87#include "DLIList.hpp"
88#include "DLPointList.hpp"
89#include "DLBodyList.hpp"
90#include "DLRefFaceList.hpp"
91#include "DLRefEdgeList.hpp"
92#include "DLRefVertexList.hpp"
93#include "DLCubitEntityList.hpp"
94#include "DLTopologyEntityList.hpp"
95
96#include "copy_defines.h"
97
98/* GeometryTool * */ void *GeometryTool_instance(/* SolidModelingEngine * */ void *SMEPtr)
99{
100  SolidModelingEngine *temp_SMEPtr = (SolidModelingEngine *) SMEPtr;
101 
102  return GeometryTool::instance(temp_SMEPtr);
103}
104 
105CubitStatus GeometryTool_cubit_entity_list(const char *keyword, 
106                                   /* DLRefEntityList & */ void ***entity_list, 
107                                 int *entity_list_size,
108                                 const CubitBoolean print_errors)
109/* < API function for GeometryTool::cubit_entity_list */
110{
111
112  DLCubitEntityList temp_list;
113  CubitStatus status = GTI->cubit_entity_list(keyword, temp_list, 
114                                              print_errors);
115 
116  COPY_LIST_TO_ARRAY(temp_list, *entity_list, *entity_list_size);
117 
118  return status;
119}
120
121
122CubitStatus GeometryTool_ref_entity_list( char const* keyword,
123                                  /* DLRefEntityList &*/ void ***entity_list,
124                                int *entity_list_size,
125                                const CubitBoolean print_errors) 
126{
127/* < API function for GeometryTool::ref_entity_list */
128  DLRefEntityList temp_list;
129
130  CubitStatus status = GTI->ref_entity_list(keyword, temp_list, 
131                                            print_errors);
132 
133  COPY_LIST_TO_ARRAY(temp_list, *entity_list, *entity_list_size);
134 
135  return status;
136}
137
138void GeometryTool_bodies (/*DLBodyList &*/ void ***bodies, int *bodies_size)
139{
140  DLBodyList temp_list;
141  GTI->bodies(temp_list);
142  COPY_LIST_TO_ARRAY(temp_list, *bodies, *bodies_size);
143}
144
145void GeometryTool_ref_volumes (/*DLRefVolumeList &*/ void ***ref_volumes, int *ref_volumes_size)
146{
147  DLRefVolumeList temp_list;
148  GTI->ref_volumes(temp_list);
149  COPY_LIST_TO_ARRAY(temp_list, *ref_volumes, *ref_volumes_size);
150}
151
152void GeometryTool_ref_groups (/*DLRefGroupList &*/ void ***ref_groups, int *ref_groups_size)
153{
154  DLRefGroupList temp_list;
155  GTI->ref_groups(temp_list);
156  COPY_LIST_TO_ARRAY(temp_list, *ref_groups, *ref_groups_size);
157}
158
159void GeometryTool_ref_parts (/*DLRefPartList &*/ void ***ref_parts, int *ref_parts_size)
160{
161  DLRefPartList temp_list;
162  GTI->ref_parts(temp_list);
163  COPY_LIST_TO_ARRAY(temp_list, *ref_parts, *ref_parts_size);
164}
165
166void GeometryTool_ref_assemblies (/*DLRefAssemblyList &*/ void ***ref_assemblies, int *ref_assemblies_size)
167{
168  DLRefAssemblyList temp_list;
169  GTI->ref_assemblies(temp_list);
170  COPY_LIST_TO_ARRAY(temp_list, *ref_assemblies, *ref_assemblies_size);
171}
172
173void GeometryTool_ref_faces (/*DLRefFaceList &*/ void ***ref_faces, int *ref_faces_size)
174{
175  DLRefFaceList temp_list;
176  GTI->ref_faces(temp_list);
177  COPY_LIST_TO_ARRAY(temp_list, *ref_faces, *ref_faces_size);
178}
179
180void GeometryTool_ref_edges (/*DLRefEdgeList &*/ void ***ref_edges, int *ref_edges_size)
181{
182  DLRefEdgeList temp_list;
183  GTI->ref_edges(temp_list);
184  COPY_LIST_TO_ARRAY(temp_list, *ref_edges, *ref_edges_size);
185}
186
187void GeometryTool_ref_vertices (/*DLRefVertexList &*/ void ***ref_vertices, int *ref_vertices_size)
188{
189  DLRefVertexList temp_list;
190  GTI->ref_vertices(temp_list);
191  COPY_LIST_TO_ARRAY(temp_list, *ref_vertices, *ref_vertices_size);
192}
193
194void GeometryTool_ref_coordsys (/*DLRefCoordSysList &*/ void ***ref_coordsys, int *ref_coordsys_size)
195{
196  DLRefCoordSysList temp_list;
197  GTI->ref_coordsys(temp_list);
198  COPY_LIST_TO_ARRAY(temp_list, *ref_coordsys, *ref_coordsys_size);
199}
200
201int GeometryTool_num_bodies() {return GTI->num_bodies();};
202/* < API function for GeometryTool::num_bodies */
203
204int GeometryTool_num_ref_volumes() {return GTI->num_ref_volumes();};
205/* < API function for GeometryTool::num_ref_volumes */
206
207int GeometryTool_num_ref_groups() {return GTI->num_ref_groups();};
208/* < API function for GeometryTool::num_ref_groups */
209
210int GeometryTool_num_ref_parts() {return GTI->num_ref_parts();};
211/* < API function for GeometryTool::num_ref_parts */
212
213int GeometryTool_num_ref_assemblies() {return GTI->num_ref_assemblies();};
214/* < API function for GeometryTool::num_ref_assemblies */
215
216int GeometryTool_num_ref_faces() {return GTI->num_ref_faces();};
217/* < API function for GeometryTool::num_ref_faces */
218
219int GeometryTool_num_ref_edges() {return GTI->num_ref_edges();};
220/* < API function for GeometryTool::num_ref_edges */
221
222int GeometryTool_num_ref_vertices() {return GTI->num_ref_vertices();};
223/* < API function for GeometryTool::num_ref_vertices */
224
225int GeometryTool_num_ref_coordsys() {return GTI->num_ref_coordsys();};
226/* < API function for GeometryTool::num_ref_coordsys */
227
228
229/* RefEntity* */ void* GeometryTool_get_ref_entity_1 (const char *type, int id) 
230/* < API function for GeometryTool::*get_ref_entity  */
231{return GTI->get_ref_entity (type, id);}
232
233/* RefEntity* */ void* GeometryTool_get_ref_entity_2 (const EntityType type, int id) 
234/* < API function for GeometryTool::*get_ref_entity  */
235{return GTI->get_ref_entity (type, id);};
236
237
238/* Body* */ void* GeometryTool_get_body ( int id ) {return GTI->get_body(id);};
239/* < API function for GeometryTool::*get_body  */
240
241/* RefVolume* */ void* GeometryTool_get_ref_volume ( int id ) {return GTI->get_ref_volume(id);};
242/* < API function for GeometryTool::*get_ref_volume  */
243
244/* RefGroup* */ void* GeometryTool_get_ref_group ( int id ) {return GTI->get_ref_group(id);};
245/* < API function for GeometryTool::*get_ref_group  */
246
247/* RefPart* */ void* GeometryTool_get_ref_part ( int id ) {return GTI->get_ref_part(id);};
248/* < API function for GeometryTool::*get_ref_part  */
249
250/* RefAssembly* */ void* GeometryTool_get_ref_assembly ( int id ) {return GTI->get_ref_assembly(id);};
251/* < API function for GeometryTool::*get_ref_assembly  */
252
253/* RefFace* */ void* GeometryTool_get_ref_face ( int id ) {return GTI->get_ref_face(id);};
254/* < API function for GeometryTool::*get_ref_face  */
255
256/* RefEdge* */ void* GeometryTool_get_ref_edge ( int id ) {return GTI->get_ref_edge(id);};
257/* < API function for GeometryTool::*get_ref_edge  */
258
259/* RefVertex* */ void* GeometryTool_get_ref_vertex ( int id ) {return GTI->get_ref_vertex(id);};
260/* < API function for GeometryTool::*get_ref_vertex  */
261
262
263/* Body* */ void* GeometryTool_get_first_body () {return GTI->get_first_body();}
264/* < API function for GeometryTool::*get_first_body  */
265
266/* RefVolume* */ void* GeometryTool_get_first_ref_volume () {return GTI->get_first_ref_volume();}
267/* < API function for GeometryTool::*get_first_ref_volume  */
268
269/* RefGroup* */ void* GeometryTool_get_first_ref_group () {return GTI->get_first_ref_group();}
270/* < API function for GeometryTool::*get_first_ref_group  */
271
272/* RefPart* */ void* GeometryTool_get_first_ref_part () {return GTI->get_first_ref_part();}
273/* < API function for GeometryTool::*get_first_ref_part  */
274
275/* RefAssembly* */ void* GeometryTool_get_first_ref_assembly () {return GTI->get_first_ref_assembly();}
276/* < API function for GeometryTool::*get_first_ref_assembly  */
277
278/* RefFace* */ void* GeometryTool_get_first_ref_face () {return GTI->get_first_ref_face();}
279/* < API function for GeometryTool::*get_first_ref_face  */
280
281/* RefEdge* */ void* GeometryTool_get_first_ref_edge () {return GTI->get_first_ref_edge();}
282/* < API function for GeometryTool::*get_first_ref_edge  */
283
284/* RefVertex* */ void* GeometryTool_get_first_ref_vertex () {return GTI->get_first_ref_vertex();}
285/* < API function for GeometryTool::*get_first_ref_vertex  */
286 
287
288/* Body* */ void* GeometryTool_get_next_body () {return GTI->get_next_body();}
289/* < API function for GeometryTool::*get_next_body  */
290
291/* RefVolume* */ void* GeometryTool_get_next_ref_volume () {return GTI->get_next_ref_volume();}
292/* < API function for GeometryTool::*get_next_ref_volume  */
293
294/* RefGroup* */ void* GeometryTool_get_next_ref_group () {return GTI->get_next_ref_group();}
295/* < API function for GeometryTool::*get_next_ref_group  */
296
297/* RefPart* */ void* GeometryTool_get_next_ref_part () {return GTI->get_next_ref_part();}
298/* < API function for GeometryTool::*get_next_ref_part  */
299
300/* RefAssembly* */ void* GeometryTool_get_next_ref_assembly () {return GTI->get_next_ref_assembly();}
301/* < API function for GeometryTool::*get_next_ref_assembly  */
302
303/* RefFace* */ void* GeometryTool_get_next_ref_face () {return GTI->get_next_ref_face();}
304/* < API function for GeometryTool::*get_next_ref_face  */
305
306/* RefEdge* */ void* GeometryTool_get_next_ref_edge () {return GTI->get_next_ref_edge();}
307/* < API function for GeometryTool::*get_next_ref_edge  */
308
309/* RefVertex* */ void* GeometryTool_get_next_ref_vertex () {return GTI->get_next_ref_vertex();}
310/* < API function for GeometryTool::*get_next_ref_vertex */
311 
312
313/* Body* */ void* GeometryTool_get_last_body () {return GTI->get_last_body();}
314/* < API function for GeometryTool::*get_last_body  */
315
316/* RefVolume* */ void* GeometryTool_get_last_ref_volume () {return GTI->get_last_ref_volume();}
317/* < API function for GeometryTool::*get_last_ref_volume  */
318
319/* RefGroup* */ void* GeometryTool_get_last_ref_group () {return GTI->get_last_ref_group();}
320/* < API function for GeometryTool::*get_last_ref_group  */
321
322/* RefPart* */ void* GeometryTool_get_last_ref_part () {return GTI->get_last_ref_part();}
323/* < API function for GeometryTool::*get_last_ref_part  */
324
325/* RefAssembly* */ void* GeometryTool_get_last_ref_assembly () {return GTI->get_last_ref_assembly();}
326/* < API function for GeometryTool::*get_last_ref_assembly  */
327
328/* RefFace* */ void* GeometryTool_get_last_ref_face () {return GTI->get_last_ref_face();}
329/* < API function for GeometryTool::*get_last_ref_face  */
330
331/* RefEdge* */ void* GeometryTool_get_last_ref_edge () {return GTI->get_last_ref_edge();}
332/* < API function for GeometryTool::*get_last_ref_edge  */
333
334/* RefVertex* */ void* GeometryTool_get_last_ref_vertex () {return GTI->get_last_ref_vertex();}
335/* < API function for GeometryTool::*get_last_ref_vertex  */
336
337  /**<
338    <HR><H3>File operations (import, export)</H3>
339  */
340
341CubitStatus GeometryTool_export_solid_model( /* DLRefEntityList& */ void ***ref_entity_list,
342                                   int *ref_entity_list_size,
343                                   char const* file_name,
344                                   char const* file_type,
345                                   const /* CubitString & */ char *cubit_version,
346                                   char const* logfile_name) 
347{
348/* < API function for GeometryTool::export_solid_model */
349
350  DLRefEntityList temp_list;
351  COPY_ARRAY_TO_LIST(*ref_entity_list, *ref_entity_list_size, temp_list);
352
353  return GTI->export_solid_model(temp_list, file_name, file_type, 
354                                 CubitString(cubit_version), logfile_name);
355}
356
357CubitStatus GeometryTool_import_solid_model_1(FILE* file_ptr, 
358                                  const char* file_name,
359                                  const char* file_type,
360                                  const char* logfile_name,
361                                  CubitBoolean heal_step,
362                                  CubitBoolean import_bodies,
363                                  CubitBoolean import_surfaces,
364                                  CubitBoolean import_curves,
365                                  CubitBoolean import_vertices,
366                                  CubitBoolean free_surfaces)
367{
368/* < API function for GeometryTool::import_solid_model */
369  return GTI->import_solid_model(file_ptr, file_name, file_type,
370                                 logfile_name,
371                                 heal_step,
372                                 import_bodies, import_surfaces,
373                                 import_curves, import_vertices,
374                                 free_surfaces);
375}
376
377CubitStatus GeometryTool_import_solid_model_2(SolidModelerType model_type) 
378/* < API function for GeometryTool::import_solid_model */
379{
380  return GTI->import_solid_model(model_type);
381}
382     
383CubitStatus GeometryTool_import_datum_curves(FILE* inputFile, 
384                                   char const* filetype)
385/* < API function for GeometryTool::import_datum_curves */
386{
387  return GTI->import_datum_curves(inputFile, filetype);
388}
389   
390CubitStatus GeometryTool_read_geometry_file(char const* fileName, 
391                                  char const* includePath,
392                                  char const* type)
393/* < API function for GeometryTool::read_geometry_file */
394{
395  return GTI->read_geometry_file(fileName, includePath, type);
396}
397   
398int GeometryTool_fire_ray(/* Body* */ void *body, 
399                  /* const CubitVector */ CubitVectorStruct *ray_point,
400                  /* const CubitVector */ CubitVectorStruct *unit,
401                  /* int & */ int *num_hit, /* double *& */ double **ray_params,
402                  /* DLRefEntityList * */ void ***entity_list,
403                int *entity_list_size)
404/* < API function for GeometryTool::fire_ray */
405{
406  CubitVector temp_ray_point(*ray_point);
407  CubitVector temp_unit = *unit;
408  DLRefEntityList temp_entity_list;
409  Body *temp_body = (Body *) body;
410 
411  int result = GTI->fire_ray(temp_body, temp_ray_point, temp_unit, *num_hit,
412                             *ray_params, &temp_entity_list);
413 
414  COPY_LIST_TO_ARRAY(temp_entity_list, *entity_list, *entity_list_size);
415 
416  return result;
417}
418
419  /**
420   <HR><H3>Geometric primitive creation functions</H3>
421  */
422int GeometryTool_sphere(double radius) {return GTI->sphere(radius);}
423/* < API function for GeometryTool::sphere */
424   
425int GeometryTool_brick( double wid, double dep, double hi ) {return GTI->brick(wid, dep, hi);}
426/* < API function for GeometryTool::brick     */
427   
428int GeometryTool_prism( double height, int sides, double major, double minor) 
429/* < API function for GeometryTool::prism     */
430{
431  return GTI->prism(height, sides, major, minor);
432}
433   
434int GeometryTool_pyramid( double height, int sides, double major, double minor,
435                double top)
436/* < API function for GeometryTool::pyramid   */
437{
438  return GTI->pyramid(height, sides, major, minor, top);
439}
440   
441int GeometryTool_cylinder( double hi, double r1, double r2, double r3 ) 
442/* < API function for GeometryTool::cylinder  */
443{
444  return GTI->cylinder(hi, r1, r2, r3);
445}
446   
447int GeometryTool_torus( double r1, double r2 ) {return GTI->torus(r1, r2);}
448/* < API function for GeometryTool::torus     */
449
450int GeometryTool_planar_sheet ( CubitPlaneStruct plane, CubitBoxStruct bounding_box,
451                      int extension_type, double extension)
452/* < API function for GeometryTool::planar_sheet  */
453{
454  CubitPlane temp_plane = plane;
455  CubitBox temp_bounding_box = bounding_box;
456 
457  return GTI->planar_sheet(temp_plane, temp_bounding_box,
458                           extension_type, extension);
459}
460   
461  /* / <HR><H3>Geometry transformation (move, scale, etc.)</H3> */
462
463/* Body* */ void* GeometryTool_copy_body ( /* Body* */ void *body_ptr)
464/* < API function for GeometryTool::copy_body  */
465{
466  Body *temp_body_ptr = (Body *) body_ptr;
467  return GTI->copy_body(temp_body_ptr);
468}
469
470   
471/* RefEntity* */ void* GeometryTool_copy_refentity( /* RefEntity * */ void *old_entity )
472/* < API function for GeometryTool::copy_refentity */
473{
474  RefEntity *temp_old_entity = (RefEntity *) old_entity;
475  return GTI->copy_refentity(temp_old_entity);
476}
477   
478CubitStatus GeometryTool_reflect_body( /* Body * */ void *body_ptr,
479                               /* Body *& */ void **new_body,
480                             double x, double y,
481                             double z,
482                             CubitBoolean keep_old)
483/* < API function for GeometryTool::reflect_body */
484{
485  Body *temp_body_ptr = (Body *) body_ptr;
486  Body *temp_new_body;
487  CubitStatus result = GTI->reflect_body(temp_body_ptr, temp_new_body, x, y, z, keep_old);
488  *new_body = temp_new_body;
489  return result;
490}
491
492CubitStatus GeometryTool_align_body( /* Body * */ void *body_ptr, 
493                             /* RefFace * */ void *my_face,
494                             /* RefFace * */ void *target_face )
495/* < API function for GeometryTool::align_body */
496{
497  Body *temp_body_ptr = (Body *) body_ptr;
498  RefFace *temp_my_face = (RefFace *) my_face;
499  RefFace *temp_target_face = (RefFace *) target_face;
500  return GTI->align_body(temp_body_ptr, temp_my_face, temp_target_face);
501}
502
503   
504  /* /< <HR><H3>Geometry modification (booleans, decomposition, etc.)</H3> */
505
506CubitStatus GeometryTool_unite_1(/* DLBodyList & */ void ***bodies, int *bodies_size, 
507                       /* Body *& */ void **newBody,
508                     int keep_old)
509/* < API function for GeometryTool::unite */
510{
511  DLBodyList temp_bodies;
512  COPY_ARRAY_TO_LIST(*bodies, *bodies_size, temp_bodies);
513  Body *temp_newBody;
514 
515  CubitStatus result = GTI->unite(temp_bodies, temp_newBody, keep_old);
516
517  *newBody = temp_newBody;
518  return result;
519}
520
521CubitStatus GeometryTool_unite_2 ( /* Body * */ void *body1, /* Body * */ void *body2, 
522                         /* Body *& */ void **newBody,
523                       int keep_old)
524/* < API function for GeometryTool::unite  */
525{
526  Body *temp_body1 = (Body *) body1;
527  Body *temp_body2 = (Body *) body2;
528  Body *temp_newBody;
529 
530  CubitStatus result = GTI->unite(temp_body1, temp_body2, temp_newBody, keep_old);
531  *newBody = temp_newBody;
532 
533  return result;
534}
535
536CubitStatus GeometryTool_subtract ( /* Body * */ void *tool_body_ptr, 
537                            /* DLBodyList & */ void ***from_bodies,
538                          int *from_bodies_size,
539                            /* DLBodyList & */ void ***new_bodies, int *new_bodies_size,
540                          int keep_old)
541/* < API function for GeometryTool::subtract  */
542{
543  Body *temp_tool_body_ptr = (Body *) tool_body_ptr;
544  DLBodyList temp_from_bodies;
545  COPY_ARRAY_TO_LIST(*from_bodies, *from_bodies_size, temp_from_bodies);
546
547  DLBodyList temp_new_bodies;
548
549  CubitStatus result = GTI->subtract(temp_tool_body_ptr, temp_from_bodies, 
550                                     temp_new_bodies, keep_old);
551 
552  COPY_LIST_TO_ARRAY(temp_new_bodies, *new_bodies, *new_bodies_size);
553 
554  return result;
555}
556
557CubitStatus GeometryTool_intersect ( /* Body * */ void *tool_body_ptr, 
558                             /* DLBodyList & */ void ***from_bodies,
559                           int *from_bodies_size,
560                             /* DLBodyList & */ void ***new_bodies,
561                           int *new_bodies_size,
562                           int keep_old)
563/* < API function for GeometryTool::intersect  */
564{
565  Body *temp_tool_body_ptr = (Body *) tool_body_ptr;
566  DLBodyList temp_from_bodies;
567  COPY_ARRAY_TO_LIST(*from_bodies, *from_bodies_size, temp_from_bodies);
568
569  DLBodyList temp_new_bodies;
570 
571  CubitStatus result = GTI->intersect(temp_tool_body_ptr, temp_from_bodies, 
572                                      temp_new_bodies, keep_old);
573 
574  COPY_LIST_TO_ARRAY(temp_new_bodies, *new_bodies, *new_bodies_size);
575 
576  return result;
577}
578
579CubitStatus GeometryTool_section( /* DLBodyList & */ void ***section_body_list,
580                        int *section_body_list_size,
581                          /* CubitVector & */ CubitVectorStruct *point_1,
582                          /* CubitVector & */ CubitVectorStruct *point_2,
583                          /* CubitVector & */ CubitVectorStruct *point_3,
584                          /* DLBodyList & */ void ***new_body_list,
585                        int *new_body_list_size,
586                        CubitBoolean keep_normal_side,
587                        CubitBoolean keep_old)
588/* < API function for GeometryTool::section */
589{
590  DLBodyList temp_section_body_list;
591  COPY_ARRAY_TO_LIST(*section_body_list, *section_body_list_size, temp_section_body_list);
592
593  CubitVector temp_point_1 = *point_1;
594  CubitVector temp_point_2 = *point_2;
595  CubitVector temp_point_3 = *point_3;
596
597  DLBodyList temp_new_body_list;
598
599  CubitStatus result = GTI->section(temp_section_body_list, 
600                                    temp_point_1, temp_point_2, 
601                                    temp_point_3, temp_new_body_list, 
602                                    keep_normal_side, keep_old);
603 
604  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
605 
606  return result;
607}
608
609CubitStatus GeometryTool_split_periodic( /* Body * */ void *body_ptr,
610                                 /* Body *& */ void **new_body_ptr )
611/* < API function for GeometryTool::split_periodic */
612{
613  Body *temp_body_ptr = (Body *) body_ptr;
614  Body *temp_new_body_ptr;
615
616  CubitStatus result = GTI->split_periodic(temp_body_ptr, temp_new_body_ptr);
617 
618  *new_body_ptr = temp_new_body_ptr;
619 
620  return result;
621}
622   
623  int  GeometryTool_webcut_across_translate( /* DLBodyList& */ void ***body_list, int *body_list_size,
624                                               /* RefFace* */ void *plane_surf1, /* RefFace* */ void *plane_surf2,
625                                               /* DLBodyList& */ void ***results_list, int *results_list_size,
626                                             enum CubitBoolean imprint, enum CubitBoolean merge) 
627{
628
629  DLBodyList temp_body_list;
630  RefFace *temp_plane_surf1 = (RefFace *) plane_surf1;
631  RefFace *temp_plane_surf2 = (RefFace *) plane_surf2;
632  DLBodyList temp_results_list;
633
634  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
635 
636  int result = GTI->webcut_across_translate(temp_body_list, temp_plane_surf1,
637                                            temp_plane_surf2, temp_results_list,
638                                            imprint, merge);
639 
640  COPY_LIST_TO_ARRAY(temp_results_list, *results_list, *results_list_size);
641 
642  return result;
643}
644   
645int GeometryTool_webcut_with_cylinder( /* DLBodyList& */ void ***webcut_body_list,
646                             int *webcut_body_list_size,
647                             double radius, 
648                               /* CubitVector & */ CubitVectorStruct *axis,
649                               /* CubitVector& */ CubitVectorStruct* center, 
650                               /* DLBodyList & */ void ***results_list,
651                             int *results_list_size,
652                             CubitBoolean imprint,
653                             CubitBoolean merge)
654/* < API function for GeometryTool::webcut_with_cylinder */
655{
656  DLBodyList temp_webcut_body_list;
657  COPY_ARRAY_TO_LIST(*webcut_body_list, *webcut_body_list_size, temp_webcut_body_list);
658
659  CubitVector temp_axis = *axis;
660  CubitVector temp_center = *center;
661 
662  DLBodyList temp_results_list;
663  int result = GTI->webcut_with_cylinder(temp_webcut_body_list, radius, 
664                                         temp_axis, temp_center, 
665                                         temp_results_list, 
666                                         imprint, merge);
667
668  COPY_LIST_TO_ARRAY(temp_results_list, *results_list, *results_list_size);
669
670  return result;
671}
672
673int GeometryTool_webcut_with_plane(/* DLBodyList& */ void ***webcut_body_list,
674                         int *webcut_body_list_size,
675                           /* CubitVector & */ CubitVectorStruct *vector1,
676                           /* CubitVector & */ CubitVectorStruct *vector2,
677                           /* CubitVector & */ CubitVectorStruct *vector3, 
678                           /* DLBodyList & */ void ***results_list,
679                         int *results_list_size,
680                         CubitBoolean imprint,
681                         CubitBoolean merge) 
682/* < API function for GeometryTool::webcut_with_plane */
683{
684  CubitVector temp_vector1 = *vector1;
685  CubitVector temp_vector2 = *vector2;
686  CubitVector temp_vector3 = *vector3;
687 
688  DLBodyList temp_webcut_body_list;
689  COPY_ARRAY_TO_LIST(*webcut_body_list, *webcut_body_list_size, temp_webcut_body_list);
690 
691  DLBodyList temp_results_list;
692 
693  int result = GTI->webcut_with_plane(temp_webcut_body_list, 
694                                      temp_vector1, temp_vector2, temp_vector3, 
695                                      temp_results_list, imprint, merge);
696
697  COPY_LIST_TO_ARRAY(temp_results_list, *results_list, *results_list_size);
698 
699  return result;
700}
701   
702int GeometryTool_webcut_with_vertices( /* DLBodyList& */ void ***webcut_body_list,
703                             int *webcut_body_list_size,
704                               /* RefVertex* */ void *refVertex1,
705                               /* RefVertex* */ void *refVertex2,
706                               /* RefVertex* */ void *refVertex3, 
707                               /* DLBodyList & */ void ***results_list,
708                             int *results_list_size,
709                             CubitBoolean imprint,
710                             CubitBoolean merge)
711/* < API function for GeometryTool::webcut_with_vertices */
712{
713  DLBodyList temp_webcut_body_list;
714  COPY_ARRAY_TO_LIST(*webcut_body_list, *webcut_body_list_size, temp_webcut_body_list);
715
716  RefVertex *temp_refVertex1 = (RefVertex *) refVertex1;
717  RefVertex *temp_refVertex2 = (RefVertex *) refVertex2;
718  RefVertex *temp_refVertex3 = (RefVertex *) refVertex3;
719 
720  DLBodyList temp_results_list;
721 
722  int result = GTI->webcut_with_vertices(temp_webcut_body_list, 
723                                         temp_refVertex1, temp_refVertex2, temp_refVertex3, 
724                                         temp_results_list, imprint, merge);
725
726  COPY_LIST_TO_ARRAY(temp_results_list, *results_list, *results_list_size);
727 
728  return result;
729}
730   
731int GeometryTool_webcut_with_curve_loop(/* DLBodyList& */ void ***webcut_body_list, int *webcut_body_list_size,
732                                          /* DLRefEdgeList& */ void ***refedge_list, int *refedge_list_size,
733                                            /* DLBodyList& */ void ***results_list, int *results_list_size,
734                                          enum CubitBoolean imprint)
735{
736  DLBodyList temp_webcut_body_list, temp_results_list;
737  DLRefEdgeList temp_refedge_list;
738 
739  COPY_ARRAY_TO_LIST(*webcut_body_list, *webcut_body_list_size, temp_webcut_body_list);
740  COPY_ARRAY_TO_LIST(*refedge_list, *refedge_list_size, temp_refedge_list);
741
742  int result = GTI->webcut_with_curve_loop(temp_webcut_body_list, temp_refedge_list, 
743                                           temp_results_list, imprint);
744
745  COPY_LIST_TO_ARRAY(temp_results_list, *results_list, *results_list_size);
746
747  return result;
748}
749
750int GeometryTool_webcut_with_surface(/* DLBodyList& */ void ***webcut_body_list,
751                           int *webcut_body_list_size,
752                             /* RefFace* */ void *refFace,
753                             /* DLBodyList& */ void *** results_list,
754                           int * results_list_size,
755                           CubitBoolean imprint,
756                           CubitBoolean merge)
757/* < API function for GeometryTool::webcut_with_surface */
758{
759  DLBodyList temp_webcut_body_list;
760  COPY_ARRAY_TO_LIST(*webcut_body_list, *webcut_body_list_size, temp_webcut_body_list);
761 
762  RefFace *temp_refFace = (RefFace *) refFace;
763 
764  DLBodyList temp_results_list;
765 
766  int result = GTI->webcut_with_surface(temp_webcut_body_list, temp_refFace, 
767                                        temp_results_list, 
768                                        imprint, merge);
769
770  COPY_LIST_TO_ARRAY(temp_results_list, *results_list, *results_list_size);
771 
772  return result;
773}
774   
775CubitStatus GeometryTool_webcut_with_sheet(/* Body * */ void *webcut_body,
776                                   /* Body * */ void *sheet_body,
777                              /* DLBodyList & */ void ***new_bodies,
778                                 int *new_bodies_size,
779                                 CubitBoolean imprint )
780/* < API function for GeometryTool::webcut_with_sheet */
781{
782  DLBodyList temp_new_bodies;
783
784  Body *temp_webcut_body = (Body *) webcut_body;
785  Body *temp_sheet_body = (Body *) sheet_body;
786 
787  CubitStatus result = GTI->webcut_with_sheet(temp_webcut_body, temp_sheet_body, 
788                                              temp_new_bodies, imprint);
789
790  COPY_LIST_TO_ARRAY(temp_new_bodies, *new_bodies, *new_bodies_size);
791 
792  return result;
793}
794   
795int GeometryTool_webcut_with_body(/* DLBodyList& */ void ***webcut_body_list,
796                        int *webcut_body_list_size,
797                          /* Body* */ void *body,
798                          /* DLBodyList& */ void ***results_list,
799                        int * results_list_size,
800                        CubitBoolean imprint,
801                        CubitBoolean merge) 
802/* < API function for GeometryTool::webcut_with_body */
803{
804  DLBodyList temp_webcut_body_list;
805  COPY_ARRAY_TO_LIST(*webcut_body_list, *webcut_body_list_size, temp_webcut_body_list);
806
807  Body *temp_body = (Body *) body;
808 
809  DLBodyList temp_results_list;
810 
811  int result = GTI->webcut_with_body(temp_webcut_body_list, temp_body, 
812                                     temp_results_list, 
813                                     imprint, merge);
814
815  COPY_LIST_TO_ARRAY(temp_results_list, *results_list, *results_list_size);
816 
817  return result;
818}
819   
820CubitStatus GeometryTool_webcut_with_extended_surf( /* DLBodyList & */ void ***webcut_body_list,
821                                          int *webcut_body_list_size,
822                                            /* RefFace * */ void *face_to_extend,
823                                            /* DLBodyList & */ void ***new_bodies,
824                                          int *new_bodies_size,
825                                            /* int & */ int *num_cut,
826                                          CubitBoolean imprint )
827/* < API function for GeometryTool::webcut_with_extended_surf */
828{
829  DLBodyList temp_webcut_body_list;
830  COPY_ARRAY_TO_LIST(*webcut_body_list, *webcut_body_list_size, temp_webcut_body_list);
831
832  RefFace *temp_face_to_extend = (RefFace *) face_to_extend;
833 
834  DLBodyList temp_new_bodies;
835 
836  CubitStatus result = GTI->webcut_with_extended_surf(temp_webcut_body_list, 
837                                                      temp_face_to_extend, 
838                                                      temp_new_bodies, *num_cut, 
839                                                      imprint);
840
841  COPY_LIST_TO_ARRAY(temp_new_bodies, *new_bodies, *new_bodies_size);
842 
843  return result;
844}
845
846CubitStatus GeometryTool_remove_surfaces( /* DLRefFaceList & */ void ***ref_face_list,
847                                int *ref_face_list_size,
848                                  /* DLBodyList & */ void ***new_body_list,
849                                int *new_body_list_size,
850                                CubitBoolean extend_adjoining,
851                                CubitBoolean keep_surface,
852                                CubitBoolean keep_old_body )
853/* < API function for GeometryTool::remove_surfaces */
854{
855  DLRefFaceList temp_ref_face_list;
856  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
857 
858  DLBodyList temp_new_body_list;
859 
860  CubitStatus result = GTI->remove_surfaces(temp_ref_face_list, 
861                                            temp_new_body_list, 
862                                            extend_adjoining, keep_surface, keep_old_body);
863
864  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
865 
866  return result;
867}
868
869CubitStatus GeometryTool_offset_surfaces( /* DLRefFaceList& */ void ***ref_face_list,
870                                int * ref_face_list_size,
871                                  /* DLBodyList& */ void ***new_body_list,
872                                int * new_body_list_size, double offset_distance,
873                                CubitBoolean keep_old_body )
874/* < API function for GeometryTool::offset_surfaces */
875{
876  DLRefFaceList temp_ref_face_list;
877  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
878 
879  DLBodyList temp_new_body_list;
880 
881  CubitStatus result = GTI->offset_surfaces(temp_ref_face_list, 
882                                            temp_new_body_list, 
883                                            offset_distance, keep_old_body);
884
885  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
886 
887  return result;
888}
889
890CubitStatus GeometryTool_offset_curves( /* DLRefEdgeList& */ void ***ref_edge_list,
891                              int *ref_edge_list_size, double offset_distance, 
892                              /* CubitVector& */ CubitVectorStruct* offset_direction, 
893                              int gap_type)
894/* < API function for GeometryTool::offset_curves */
895{
896  DLRefEdgeList temp_ref_edge_list;
897  COPY_ARRAY_TO_LIST(*ref_edge_list, *ref_edge_list_size, temp_ref_edge_list);
898
899  CubitVector temp_offset_direction = *offset_direction;
900 
901  CubitStatus result = GTI->offset_curves(temp_ref_edge_list, 
902                                          offset_distance, temp_offset_direction, 
903                                          gap_type);
904  return result;
905}
906
907CubitStatus GeometryTool_translate_surfaces( /* DLRefFaceList& */ void ***ref_face_list,
908                                   int *ref_face_list_size,
909                                     /* DLBodyList& */ void ***new_body_list,
910                                   int *new_body_list_size,
911                                     /* CubitVector & */ CubitVectorStruct *delta,
912                                   CubitBoolean keep_old_body )
913/* < API function for GeometryTool::translate_surfaces */
914{
915  DLRefFaceList temp_ref_face_list;
916  COPY_ARRAY_TO_LIST(* ref_face_list, *ref_face_list_size, temp_ref_face_list);
917
918  CubitVector temp_delta = *delta;
919 
920  DLBodyList temp_new_body_list;
921 
922  CubitStatus result = GTI->translate_surfaces(temp_ref_face_list, 
923                                               temp_new_body_list, 
924                                               temp_delta, keep_old_body);
925
926  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
927 
928  return result;
929}
930 
931CubitStatus GeometryTool_replace_surfaces( /* DLRefFaceList & */ void ***ref_face_list,
932                                 int *ref_face_list_size,
933                                   /* RefFace* */ void *tool_face_ptr,
934                              /* DLBodyList & */ void ***new_body_list,
935                                 int *new_body_list_size,
936                                 CubitBoolean reverse_flg,
937                                 CubitBoolean keep_old_body )
938/* < API function for GeometryTool::replace_surfaces */
939{
940  DLRefFaceList temp_ref_face_list;
941  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
942 
943  RefFace *temp_tool_face_ptr = (RefFace *) tool_face_ptr;
944 
945  DLBodyList temp_new_body_list;
946 
947  CubitStatus result = GTI->replace_surfaces(temp_ref_face_list, 
948                                             temp_tool_face_ptr, 
949                                             temp_new_body_list, 
950                                             reverse_flg, keep_old_body);
951
952  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
953 
954  return result;
955}
956   
957CubitStatus GeometryTool_trim_curve( /* RefEdge* */ void *trim_curve, 
958                             /* CubitVector& */ CubitVectorStruct* trim_vector, 
959                             /* CubitVector& */ CubitVectorStruct* keep_vector )
960/* < API function for GeometryTool::trim_curve */
961{
962  RefEdge *temp_trim_curve = (RefEdge *) trim_curve;
963 
964  CubitVector temp_trim_vector = *trim_vector;
965  CubitVector temp_keep_vector = *keep_vector;
966 
967  CubitStatus result = GTI->trim_curve(temp_trim_curve, 
968                                       temp_trim_vector, temp_keep_vector);
969  return result;
970}
971   
972  /* /< <HR><H3>Topology modification (imprint, regularize, etc.)</H3> */
973
974CubitStatus GeometryTool_imprint_1 (/* DLBodyList & */ void ***from_body_list,
975                        int *from_body_list_size,
976                          /* DLBodyList & */ void ***new_body_list,
977                        int *new_body_list_size,
978                        int keep_old)
979/* < API function for GeometryTool::imprint  */
980{
981  DLBodyList temp_from_body_list;
982  COPY_ARRAY_TO_LIST(*from_body_list, *from_body_list_size, temp_from_body_list);
983 
984  DLBodyList temp_new_body_list;
985 
986  CubitStatus result = GTI->imprint (temp_from_body_list, 
987                                     temp_new_body_list, keep_old);
988
989  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
990 
991  return result;
992}
993
994CubitStatus GeometryTool_imprint_2( /* DLBodyList & */ void ***body_list,
995                        int *body_list_size,
996                          /* DLRefEdgeList & */ void ***ref_edge_list,
997                        int *ref_edge_list_size,
998                          /* DLBodyList& */ void ***new_body_list,
999                        int *new_body_list_size,
1000                        int keep_old_body )
1001/* < API function for GeometryTool::imprint */
1002{
1003  DLBodyList temp_body_list;
1004  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
1005 
1006  DLRefEdgeList temp_ref_edge_list;
1007  COPY_ARRAY_TO_LIST(*ref_edge_list, *ref_edge_list_size, temp_ref_edge_list);
1008 
1009  DLBodyList temp_new_body_list;
1010 
1011  CubitStatus result = GTI->imprint(temp_body_list, temp_ref_edge_list, 
1012                                    temp_new_body_list, keep_old_body);
1013
1014  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
1015 
1016  return result;
1017}
1018
1019CubitStatus GeometryTool_imprint_3( /* DLRefFaceList & */ void ***ref_face_list,
1020                        int *ref_face_list_size,
1021                          /* DLRefEdgeList & */ void ***ref_edge_list,
1022                        int *ref_edge_list_size,
1023                          /* DLBodyList& */ void ***new_body_list,
1024                        int *new_body_list_size,
1025                        int keep_old_body )
1026/* < API function for GeometryTool::imprint */
1027{
1028  DLRefFaceList temp_ref_face_list;
1029  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
1030 
1031  DLRefEdgeList temp_ref_edge_list;
1032  COPY_ARRAY_TO_LIST(*ref_edge_list, *ref_edge_list_size, temp_ref_edge_list);
1033 
1034  DLBodyList temp_new_body_list;
1035 
1036  CubitStatus result = GTI->imprint(temp_ref_face_list, temp_ref_edge_list, 
1037                                    temp_new_body_list, keep_old_body);
1038
1039  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
1040 
1041  return result;
1042}
1043
1044CubitStatus GeometryTool_imprint_4( /* DLBodyList & */ void ***body_list,
1045                        int *body_list_size,
1046                          /* DLRefVertexList & */ void ***ref_vertex_list,
1047                        int *ref_vertex_list_size,
1048                          /* DLBodyList& */ void ***new_body_list,
1049                        int *new_body_list_size,
1050                        int keep_old_body )
1051/* < API function for GeometryTool::imprint */
1052{
1053  DLBodyList temp_body_list;
1054  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
1055 
1056  DLRefVertexList temp_ref_vertex_list;
1057  COPY_ARRAY_TO_LIST(*ref_vertex_list, *ref_vertex_list_size, temp_ref_vertex_list);
1058 
1059  DLBodyList temp_new_body_list;
1060 
1061  CubitStatus result = GTI->imprint(temp_body_list, temp_ref_vertex_list, 
1062                                    temp_new_body_list, keep_old_body);
1063
1064  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
1065 
1066  return result;
1067}
1068
1069CubitStatus GeometryTool_regularize_body( /* Body * */ void *body_ptr, 
1070                                  /* Body *& */ void **new_body )
1071/* < API function for GeometryTool::regularize_body */
1072{
1073  Body *temp_body_ptr = (Body *) body_ptr;
1074 
1075  Body *temp_new_body;
1076 
1077  CubitStatus result = GTI->regularize_body( temp_body_ptr, temp_new_body);
1078
1079  *new_body = temp_new_body;
1080 
1081  return result;
1082}
1083   
1084CubitStatus GeometryTool_split_body( /* Body * */ void *body_ptr,
1085                             /* DLBodyList & */ void ***new_bodies,
1086                           int *new_bodies_size)
1087/* < API function for GeometryTool::split_body */
1088{
1089  Body *temp_body_ptr = (Body *) body_ptr;
1090 
1091  DLBodyList temp_new_bodies;
1092 
1093  CubitStatus result = GTI->split_body(temp_body_ptr,
1094                                       temp_new_bodies);
1095
1096  COPY_LIST_TO_ARRAY(temp_new_bodies, *new_bodies, *new_bodies_size);
1097 
1098  return result;
1099}
1100   
1101  /* /< <HR><H3>GeometryTool options and settings</H3> */
1102
1103void GeometryTool_group_imprint_1(CubitBoolean flag) {GTI->group_imprint(flag);}
1104/* < API function for GeometryTool::group_imprint */
1105
1106CubitBoolean GeometryTool_group_imprint_2() {return GTI->group_imprint();}
1107/* < API function for GeometryTool::group_imprint */
1108   
1109void GeometryTool_set_all_edges_imprint( CubitBoolean flag) {GTI->set_all_edges_imprint(flag);}
1110/* < API function for GeometryTool::void set_all_edges_imprint */
1111
1112CubitBoolean GeometryTool_get_all_edges_imprint() {return GTI->get_all_edges_imprint();}
1113/* < API function for GeometryTool::CubitBoolean get_all_edges_imprint */
1114   
1115    /* static */ void GeometryTool_booleans_after_merge( enum CubitBoolean flag ) {GTI->booleans_after_merge(flag);}
1116    /* static */ enum CubitBoolean GeometryTool_booleans_after_merge() {return GTI->booleans_after_merge();}
1117
1118void GeometryTool_new_ids_1(CubitBoolean flag) {GTI->new_ids(flag);}
1119
1120/* < API function for GeometryTool::new_ids */
1121
1122CubitBoolean GeometryTool_new_ids_2() {return GTI->new_ids();}
1123/* < API function for GeometryTool::new_ids */
1124   
1125void GeometryTool_geom_debug( /* DLTopologyEntityList */ void ***arg, int *arg_size) 
1126{
1127  DLTopologyEntityList temp_arg;
1128  COPY_ARRAY_TO_LIST(*arg, *arg_size, temp_arg);
1129 
1130  GTI->geom_debug(temp_arg);
1131
1132}
1133
1134void GeometryTool_use_facet_bbox_1( enum CubitBoolean pass_flag ) {GTI->use_facet_bbox(pass_flag);}
1135enum CubitBoolean GeometryTool_use_facet_bbox_2() {return GTI->use_facet_bbox();}
1136/* < API function for GeometryTool::void geom_debug */
1137   
1138#ifdef CUBIT_GUI
1139void GeometryTool_set_validate_file_ptr( FILE* file_ptr) {GTI->set_validate_file_ptr(file_ptr);}
1140/* < API function for GeometryTool::set_validate_file_ptr */
1141
1142void GeometryTool_reset_validate_file_ptr() {GTI->reset_validate_file_ptr()}
1143/* < API function for GeometryTool::reset_validate_file_ptr */
1144
1145FILE* GeometryTool_get_validate_file_ptr() {GTI->get_validate_file_ptr()}
1146/* < API function for GeometryTool::get_validate_file_ptr */
1147#endif
1148   
1149  /* /< <HR><H3>SolidModelingEngine information</H3> */
1150
1151char *GeometryTool_identify_modeling_engine()
1152/* < API function for GeometryTool::identify_modeling_engine */
1153{
1154  CubitString temp_string = GTI->identify_modeling_engine();
1155  return (char *) temp_string.c_str();
1156}
1157   
1158void GeometryTool_register_solid_modeling_engine(/* SolidModelingEngine* */ void *SMEPtr) 
1159/* < API function for GeometryTool::register_solid_modeling_engine */
1160{
1161  SolidModelingEngine *temp_SMEPtr = (SolidModelingEngine *) SMEPtr;
1162  GTI->register_solid_modeling_engine(temp_SMEPtr);
1163}
1164     
1165void GeometryTool_register_datum_curve_sm_engine(/* SolidModelingEngine* */ void *SMEPtr) 
1166/* < API function for GeometryTool::register_datum_curve_sm_engine */
1167{
1168  SolidModelingEngine *temp_SMEPtr = (SolidModelingEngine *) SMEPtr;
1169  GTI->register_datum_curve_sm_engine(temp_SMEPtr);
1170}
1171
1172CubitStatus GeometryTool_set_engine_version(int version) {return GTI->set_engine_version(version);}
1173/* < API function for GeometryTool::set_engine_version */
1174   
1175CubitStatus GeometryTool_get_engine_version(int *version) {return GTI->get_engine_version(*version);}
1176/* < API function for GeometryTool::get_engine_version */
1177   
1178CubitStatus GeometryTool_list_engine_versions(char **versions) 
1179/* < API function for GeometryTool::list_engine_versions */
1180{
1181  CubitString temp_versions;
1182 
1183  CubitStatus result = GTI->list_engine_versions(temp_versions);
1184
1185  *versions = (char *) temp_versions.c_str();
1186
1187  return result;
1188}
1189
1190double GeometryTool_get_sme_resabs_tolerance() {return GTI->get_sme_resabs_tolerance();}
1191/* < API function for GeometryTool::get_sme_resabs_tolerance */
1192
1193double GeometryTool_set_sme_resabs_tolerance( double new_resabs) {return GTI->set_sme_resabs_tolerance( new_resabs);}
1194/* < API function for GeometryTool::set_sme_resabs_tolerance */
1195
1196CubitStatus GeometryTool_set_steptools_path( const char* path) {return GTI->set_steptools_path(path);}
1197/* < API function for GeometryTool::set_steptools_path */
1198
1199CubitStatus GeometryTool_set_igestools_path( const char* path) {return GTI->set_igestools_path(path);}
1200/* < API function for GeometryTool::set_igestools_path */
1201
1202CubitStatus GeometryTool_set_sme_int_option( const char* opt_name, int val) {return GTI->set_sme_int_option(opt_name, val);}
1203/* < API function for GeometryTool::set_sme_int_option */
1204
1205CubitStatus GeometryTool_set_sme_dbl_option( const char* opt_name, double val) {return GTI->set_sme_dbl_option(opt_name, val);}
1206/* < API function for GeometryTool::set_sme_dbl_option */
1207
1208CubitStatus GeometryTool_set_sme_str_option( const char* opt_name, const char* val) {return GTI->set_sme_str_option(opt_name, val);}
1209/* < API function for GeometryTool::set_sme_str_option */
1210
1211  /* /< <HR><H3>Topology/geometry creation functions</H3> */
1212
1213/* RefVertex* */ void* GeometryTool_make_RefVertex(GeometryType ref_vertex_type,
1214                                         const CubitVectorStruct *point, int color)
1215/* < API function for GeometryTool::make_RefVertex */
1216{
1217  CubitVector temp_point = *point;
1218 
1219  return GTI->make_RefVertex(ref_vertex_type, temp_point, color);
1220}
1221   
1222/* Body* */ void* GeometryTool_make_Body_1(/* Surface * */ void *surface)
1223/* < API function for GeometryTool::*make_Body */
1224{
1225  Surface *temp_surface = (Surface *) surface;
1226 
1227  return GTI->make_Body(temp_surface);
1228}
1229/* Body* */ void* GeometryTool_make_Body_2(/* BodySM * */ void *bodysm_ptr)
1230/* < API function for GeometryTool::make_Body */
1231{
1232  BodySM *temp_bodysm_ptr = (BodySM *) bodysm_ptr;
1233 
1234  return GTI->make_Body(temp_bodysm_ptr);
1235}
1236
1237/* Shell* */ void* GeometryTool_make_Shell(/* ShellSM * */ void *shellsm_ptr )
1238/* < API function for GeometryTool::make_Shell */
1239{
1240  ShellSM *temp_shellsm_ptr = (ShellSM *) shellsm_ptr;
1241 
1242  return GTI->make_Shell(temp_shellsm_ptr);
1243}
1244
1245/* Loop* */ void* GeometryTool_make_Loop(/* LoopSM* */ void *loopsm_ptr )
1246/* < API function for GeometryTool::make_Loop */
1247{
1248  LoopSM *temp_loopsm_ptr = (LoopSM *) loopsm_ptr ;
1249 
1250  return GTI->make_Loop(temp_loopsm_ptr);
1251}
1252
1253  /* RefEntity * */ void *GeometryTool_check_mergeable_refentity(/* TopologyBridge * */ void *bridge) 
1254{
1255  TopologyBridge *temp_bridge = (TopologyBridge *) bridge;
1256  return GTI->check_mergeable_refentity(temp_bridge);
1257}
1258
1259/* Chain* */ void* GeometryTool_make_Chain_1(/* DLPointList& */ void ***points, 
1260                                 int *points_size)
1261/* < API function for GeometryTool::make_Chain */
1262{
1263  DLPointList temp_points;
1264  COPY_ARRAY_TO_LIST(*points, *points_size, temp_points);
1265 
1266  return GTI->make_Chain(temp_points);
1267}
1268
1269/* Chain* */ void* GeometryTool_make_Chain_2(/* Curve * */ void *curve)
1270/* < API function for GeometryTool::make_Chain */
1271{
1272  Curve *temp_curve = (Curve *) curve;
1273 
1274  return GTI->make_Chain(temp_curve);
1275}
1276
1277/* RefEdge* */ void* GeometryTool_make_RefEdge_1( GeometryType ref_edge_type,
1278                                        /* RefVertex const* */ void *ref_vertex_1,
1279                                        /* RefVertex const* */ void *ref_vertex_2,
1280                                        /* DLCubitVectorList& */ CubitVectorStruct *vector_list,
1281                                      int vector_list_size,
1282                                        /* RefFace* */ void *refface_ptr ) 
1283/* < API function for GeometryTool::make_RefEdge */
1284{
1285  RefVertex *temp_ref_vertex_1 = (RefVertex *) ref_vertex_1;
1286  RefVertex *temp_ref_vertex_2 = (RefVertex *) ref_vertex_2;
1287
1288  DLCubitVectorList temp_vector_list;
1289  COPY_STRUCTARRAY_TO_LIST(vector_list, vector_list_size, 
1290                           temp_vector_list, CubitVector);
1291 
1292  RefFace *temp_refface_ptr = (RefFace *) refface_ptr;
1293 
1294  void *result =  GTI->make_RefEdge(ref_edge_type, temp_ref_vertex_1, temp_ref_vertex_2, 
1295                                    temp_vector_list, temp_refface_ptr);
1296
1297  DELETE_STRUCTLIST(temp_vector_list);
1298 
1299  return result;
1300}
1301
1302/* RefEdge* */ void* GeometryTool_make_RefEdge_2(  /* RefVertex const* */ void *ref_vertex_1,
1303                                         /* RefVertex const* */ void *ref_vertex_2,
1304                                         /* RefFace* */ void *ref_face_ptr,
1305                                         /* RefVertex const* */ void *ref_vertex_3 ) 
1306/* < API function for GeometryTool::make_RefEdge */
1307{
1308  RefVertex *temp_ref_vertex_1 = (RefVertex *) ref_vertex_1;
1309  RefVertex *temp_ref_vertex_2 = (RefVertex *) ref_vertex_2;
1310
1311  RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr;
1312 
1313  RefVertex *temp_ref_vertex_3 = (RefVertex *) ref_vertex_3;
1314 
1315  return GTI->make_RefEdge(temp_ref_vertex_1, temp_ref_vertex_2, temp_ref_face_ptr, 
1316                           temp_ref_vertex_3);
1317}
1318
1319/* RefEdge* */ void *GeometryTool_make_RefEdge_3( /* RefEdge * */ void *ref_edge) 
1320{
1321  RefEdge *temp_ref_edge = (RefEdge *) ref_edge;
1322  return GTI->make_RefEdge(temp_ref_edge);
1323}
1324
1325/* RefEdge* */ void* GeometryTool_make_RefEdge_4(GeometryType ref_edge_type,
1326                                       /* RefVertex const* */ void *ref_vertex_1,
1327                                       /* RefVertex const* */ void *ref_vertex_2,
1328                                       /* CubitVector * */ CubitVectorStruct const* intermediate_point,
1329                                     CubitSense sense) 
1330/* < API function for GeometryTool::make_RefEdge */
1331{
1332  RefVertex *temp_ref_vertex_1 = (RefVertex *) ref_vertex_1;
1333  RefVertex *temp_ref_vertex_2 = (RefVertex *) ref_vertex_2;
1334
1335  CubitVector temp_intermediate_point = *intermediate_point;
1336
1337  return GTI->make_RefEdge(ref_edge_type, temp_ref_vertex_1, temp_ref_vertex_2, 
1338                           &temp_intermediate_point, sense);
1339}
1340
1341/* RefFace* */ void* GeometryTool_make_RefFace_1(/* RefFace * */ void *from_ref_face,
1342                                     CubitBoolean extended_from)
1343/* < API function for GeometryTool::make_RefFace */
1344{
1345  RefFace *temp_from_ref_face = (RefFace *) from_ref_face;
1346 
1347  return GTI->make_RefFace(temp_from_ref_face, extended_from);
1348}
1349
1350/* RefFace* */ void* GeometryTool_make_RefFace_2(GeometryType ref_face_type,
1351                                       /* DLRefEdgeList& */ void ***ref_edge_list,
1352                                     int *ref_edge_list_size,
1353                                       /* RefFace * */ void *ref_face_ptr) 
1354/* < API function for GeometryTool::make_RefFace */
1355{
1356  DLRefEdgeList temp_ref_edge_list;
1357  COPY_ARRAY_TO_LIST(*ref_edge_list, *ref_edge_list_size, temp_ref_edge_list);
1358 
1359  RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr;
1360 
1361  return GTI->make_RefFace(ref_face_type, temp_ref_edge_list, temp_ref_face_ptr);
1362}
1363/* RefVolume* */ void* GeometryTool_make_RefVolume(GeometryType ref_volume_type,
1364                                           /* DLRefFaceList& */ void ***ref_face_list,
1365                                         int *ref_face_list_size) 
1366/* < API function for GeometryTool::make_RefVolume */
1367{
1368  DLRefFaceList temp_ref_face_list;
1369  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
1370 
1371  return GTI->make_RefVolume(ref_volume_type, temp_ref_face_list);
1372}
1373
1374/* Body* */ void* GeometryTool_make_Body_3(/* DLRefVolumeList& */ void ***ref_volume_list, 
1375                               int *ref_volume_list_size) 
1376/* < API function for GeometryTool::make_Body */
1377{
1378  DLRefVolumeList temp_ref_volume_list;
1379  COPY_ARRAY_TO_LIST(*ref_volume_list, *ref_volume_list_size, temp_ref_volume_list);
1380 
1381  return GTI->make_Body(temp_ref_volume_list);
1382}
1383
1384/* Body* */ void* GeometryTool_make_Body_4(/* RefFace * */ void *from_ref_face,
1385                               CubitBoolean extended_from)
1386/* < API function for GeometryTool::make_Body */
1387{
1388  RefFace *temp_from_ref_face = (RefFace *) from_ref_face;
1389   
1390  return GTI->make_Body(temp_from_ref_face, extended_from);
1391}
1392
1393/* Body* */ void* GeometryTool_make_Body_5(GeometryType ref_face_type,
1394                                 /* DLRefEdgeList& */ void ***ref_edge_list,
1395                               int *ref_edge_list_size,
1396                                 /* RefFace * */ void *ref_face_ptr) 
1397/* < API function for GeometryTool::make_Body */
1398{
1399  DLRefEdgeList temp_ref_edge_list;
1400  COPY_ARRAY_TO_LIST(*ref_edge_list, *ref_edge_list_size, temp_ref_edge_list);
1401 
1402  RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr;
1403 
1404  return GTI->make_Body(ref_face_type, temp_ref_edge_list, temp_ref_face_ptr);
1405}
1406
1407/* RefFace* */ void *GeometryTool_make_free_RefFace(/* SurfaceSM * */ void *surfacesm_ptr)
1408{
1409  SurfaceSM *temp_surfacesm_ptr = (SurfaceSM *) surfacesm_ptr;
1410   
1411  return GTI->make_free_RefFace(temp_surfacesm_ptr );
1412 
1413}
1414
1415/* RefEdge* */ void *GeometryTool_make_free_RefEdge(/* CurveSM * */ void *curvesm_ptr)
1416{
1417  CurveSM *temp_curvesm_ptr = (CurveSM *) curvesm_ptr;
1418   
1419  return GTI->make_free_RefEdge(temp_curvesm_ptr );
1420 
1421}
1422
1423/* RefVertex* */ void *GeometryTool_make_free_RefVertex(/* PointSM * */ void *pointsm_ptr)
1424{
1425  PointSM *temp_pointsm_ptr = (PointSM *) pointsm_ptr;
1426   
1427  return GTI->make_free_RefVertex(temp_pointsm_ptr);
1428 
1429}
1430
1431CubitStatus GeometryTool_sweep_translational(/* DLRefFaceList& */ void ***faces_to_be_swept_list,
1432                                   int *faces_to_be_swept_list_size,
1433                                   CubitVectorStruct sweep_vector,
1434                                   double draft_angle,
1435                                   int draft_type,
1436                                   int switchside )
1437/* < API function for GeometryTool::sweep_translational */
1438{
1439  DLRefFaceList temp_faces_to_be_swept_list;
1440  COPY_ARRAY_TO_LIST(*faces_to_be_swept_list, *faces_to_be_swept_list_size, temp_faces_to_be_swept_list);
1441 
1442  CubitVector temp_sweep_vector = sweep_vector;
1443 
1444  return GTI->sweep_translational(temp_faces_to_be_swept_list, 
1445                                  &temp_sweep_vector, 
1446                                  draft_angle, draft_type, switchside);
1447}
1448
1449CubitStatus GeometryTool_sweep_rotational(/* DLRefFaceList& */ void ***faces_to_be_swept_list,
1450                                int *faces_to_be_swept_list_size,
1451                                  /* CubitVector * */ CubitVectorStruct *point,
1452                                  /* CubitVector * */ CubitVectorStruct *direction,
1453                                double angle,
1454                                int steps,
1455                                double draft_angle,
1456                                int draft_type,
1457                                int switchside ) 
1458/* < API function for GeometryTool::sweep_rotational */
1459{
1460  DLRefFaceList temp_faces_to_be_swept_list;
1461  COPY_ARRAY_TO_LIST(*faces_to_be_swept_list, *faces_to_be_swept_list_size, temp_faces_to_be_swept_list);
1462
1463  CubitVector *temp_point = NULL;
1464  if (point) temp_point = new CubitVector(*point);
1465 
1466  CubitVector *temp_direction = NULL;
1467  if (direction) temp_direction = new CubitVector(*direction);
1468 
1469  CubitStatus result =  GTI->sweep_rotational(temp_faces_to_be_swept_list, 
1470                                              temp_point, temp_direction, 
1471                                              angle, steps, draft_angle, draft_type, switchside);
1472  if (temp_point) delete temp_point;
1473  if (temp_direction) delete temp_direction;
1474
1475  return result;
1476}
1477
1478CubitStatus GeometryTool_sweep_along_curve(/* DLRefFaceList& */ void ***reffaces_to_be_swept_list,
1479                                 int *reffaces_to_be_swept_list_size,
1480                              /* DLRefEdgeList& */ void ***ref_edge_list,
1481                                 int *ref_edge_list_size,
1482                                 double draft_angle,
1483                                 int draft_type) 
1484/* < API function for GeometryTool::sweep_along_curve */
1485{
1486  DLRefFaceList temp_reffaces_to_be_swept_list;
1487  COPY_ARRAY_TO_LIST(*reffaces_to_be_swept_list, *reffaces_to_be_swept_list_size, temp_reffaces_to_be_swept_list);
1488 
1489  DLRefEdgeList temp_ref_edge_list;
1490  COPY_ARRAY_TO_LIST(*ref_edge_list, *ref_edge_list_size, temp_ref_edge_list);
1491 
1492  return GTI->sweep_along_curve(temp_reffaces_to_be_swept_list, 
1493                                temp_ref_edge_list, draft_angle, draft_type);
1494}
1495
1496   
1497CubitStatus GeometryTool_create_body_from_surfs( /* DLRefFaceList & */ void ***ref_face_list,
1498                                       int *ref_face_list_size,
1499                                         /* Body *& */ void **new_body,
1500                                       int keep_old,
1501                                       int heal)
1502/* < API function for GeometryTool::create_body_from_surfs */
1503{
1504  DLRefFaceList temp_ref_face_list;
1505  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
1506 
1507  Body *temp_new_body;
1508 
1509  CubitStatus result = GTI->create_body_from_surfs(temp_ref_face_list, 
1510                                                   temp_new_body, keep_old, heal);
1511
1512  *new_body = temp_new_body;
1513
1514  return result;
1515}
1516
1517CubitStatus GeometryTool_create_net_surface_1( /* DLRefFaceList& */ void ***ref_face_list,
1518                                   int *ref_face_list_size,
1519                                     /* Body *& */ void **new_body, 
1520                                     /* DLIList<DLCubitVectorList*> */ CubitVectorStruct **vec_lists_u, 
1521                                   int *vec_lists_u_sizes, int num_vec_lists_u,
1522                                     /* DLIList<DLCubitVectorList*> */ CubitVectorStruct **vec_lists_v, 
1523                                   int *vec_lists_v_sizes, int num_vec_lists_v,
1524                                   double net_tol,
1525                                   CubitBoolean heal )
1526/* < API function for GeometryTool::create_net_surface */
1527{
1528  DLRefFaceList temp_ref_face_list;
1529  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
1530
1531  DLIList<DLCubitVectorList *> temp_vec_lists_u;
1532  int i;
1533  for (i = 0; i < num_vec_lists_u; i++) {
1534    DLCubitVectorList *temp_list = new DLCubitVectorList(vec_lists_u_sizes[i]);
1535    temp_vec_lists_u.append(temp_list);
1536    COPY_STRUCTARRAY_TO_LIST(vec_lists_u[i], vec_lists_u_sizes[i], 
1537                             *temp_list, CubitVector);
1538  }
1539 
1540  DLIList<DLCubitVectorList *> temp_vec_lists_v;
1541  for (i = 0; i < num_vec_lists_v; i++) {
1542    DLCubitVectorList *temp_list = new DLCubitVectorList(vec_lists_v_sizes[i]);
1543    temp_vec_lists_v.append(temp_list);
1544    COPY_STRUCTARRAY_TO_LIST(vec_lists_v[i], vec_lists_v_sizes[i], 
1545                             *temp_list, CubitVector);
1546  }
1547 
1548  Body *temp_new_body;
1549 
1550  CubitStatus result = GTI->create_net_surface(temp_ref_face_list, temp_new_body, 
1551                                               temp_vec_lists_u, temp_vec_lists_v, 
1552                                               net_tol, heal);
1553
1554  *new_body = temp_new_body;
1555
1556  for (i = 0; i < num_vec_lists_u; i++) {
1557    DLCubitVectorList *temp_list = temp_vec_lists_u.get_and_step();
1558    DELETE_STRUCTLIST(*temp_list);
1559  }
1560 
1561  for (i = 0; i < num_vec_lists_v; i++) {
1562    DLCubitVectorList *temp_list = temp_vec_lists_v.get_and_step();
1563    DELETE_STRUCTLIST(*temp_list);
1564  }
1565 
1566  return result;
1567}
1568
1569CubitStatus GeometryTool_create_net_surface_2( /* DLRefEdgeList& */ void ***u_curves,
1570                                   int *u_curves_size,
1571                                     /* DLRefEdgeList& */ void ***v_curves,
1572                                   int *v_curves_size,
1573                                     /* Body *& */ void ** new_body,
1574                                   double net_tol, 
1575                                   CubitBoolean heal )
1576/* < API function for GeometryTool::create_net_surface */
1577{
1578  DLRefEdgeList temp_u_curves;
1579  COPY_ARRAY_TO_LIST(*u_curves, *u_curves_size, temp_u_curves);
1580 
1581  DLRefEdgeList temp_v_curves;
1582  COPY_ARRAY_TO_LIST(*v_curves, *v_curves_size, temp_v_curves);
1583 
1584  Body *temp_new_body;
1585 
1586  CubitStatus result = GTI->create_net_surface(temp_u_curves, temp_v_curves, 
1587                                               temp_new_body, net_tol, heal);
1588
1589  *new_body = temp_new_body;
1590
1591  return result;
1592}
1593
1594CubitStatus GeometryTool_create_offset_surface( /* RefFace* */ void *ref_face_ptr, 
1595                                        /* Body*& */ void ** new_body, 
1596                                      double offset_distance )
1597/* < API function for GeometryTool::create_offset_surface */
1598{
1599  Body *temp_new_body;
1600 
1601  RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr;
1602 
1603  CubitStatus result = GTI->create_offset_surface(temp_ref_face_ptr, temp_new_body, 
1604                                                  offset_distance);
1605
1606  *new_body = temp_new_body;
1607
1608  return result;
1609}
1610
1611CubitStatus GeometryTool_create_offset_body( /* Body * */ void *body_ptr, 
1612                                     /* Body*& */ void ** new_body, 
1613                                   double offset_distance )
1614/* < API function for GeometryTool::create_offset_body */
1615{
1616  Body *temp_new_body;
1617 
1618  Body *temp_body_ptr = (Body *) body_ptr;
1619 
1620  CubitStatus result = GTI->create_offset_body(temp_body_ptr, 
1621                                               temp_new_body, offset_distance);
1622
1623  *new_body = temp_new_body;
1624
1625  return result;
1626}
1627
1628CubitStatus GeometryTool_create_skin_surface( /* DLRefEdgeList& */ void ***curves,
1629                                    int *curves_size,
1630                                      /* Body*& */ void ** new_body )
1631/* < API function for GeometryTool::create_skin_surface */
1632{
1633  DLRefEdgeList temp_curves;
1634  COPY_ARRAY_TO_LIST(*curves, *curves_size, temp_curves);
1635 
1636  Body *temp_new_body;
1637 
1638  CubitStatus result = GTI->create_skin_surface( temp_curves, temp_new_body);
1639
1640  *new_body = temp_new_body;
1641
1642  return result;
1643}
1644
1645enum CubitStatus GeometryTool_loft_surfaces( /* RefFace * */ void *face1, /* const double & */ double *takeoff1,
1646                                               /* RefFace * */ void *face2, /* const double & */ double *takeoff2,
1647                                               /* Body*& */ void **new_body,
1648                                             enum CubitBoolean arc_length_option,
1649                                             enum CubitBoolean twist_option,
1650                                             enum CubitBoolean align_direction,
1651                                             enum CubitBoolean perpendicular,
1652                                             enum CubitBoolean simplify_option) 
1653{
1654  RefFace *temp_face1 = (RefFace *) face1;
1655  RefFace *temp_face2 = (RefFace *) face2;
1656
1657  Body *temp_new_body = NULL;
1658 
1659  CubitStatus result = GTI->loft_surfaces(temp_face1, *takeoff1, temp_face2, *takeoff2,
1660                                          temp_new_body,
1661                                          arc_length_option, twist_option, align_direction, 
1662                                          perpendicular, simplify_option);
1663 
1664  *new_body = temp_new_body;
1665 
1666  return result;
1667}
1668
1669CubitStatus GeometryTool_create_arc_three_1( /* RefVertex * */ void *ref_vertex1, 
1670                                   /* RefVertex * */ void *ref_vertex2,
1671                                   /* RefVertex * */ void *ref_vertex3, 
1672                                 CubitBoolean full )
1673/* < API function for GeometryTool::create_arc_three */
1674{
1675  RefVertex *temp_ref_vertex1 = (RefVertex *) ref_vertex1;
1676  RefVertex *temp_ref_vertex2 = (RefVertex *) ref_vertex2;
1677  RefVertex *temp_ref_vertex3 = (RefVertex *) ref_vertex3;
1678   
1679  return GTI->create_arc_three(temp_ref_vertex1, temp_ref_vertex2, 
1680                               temp_ref_vertex3, full);
1681}
1682
1683CubitStatus GeometryTool_create_arc_three_2( /* RefEdge * */ void *ref_edge1, 
1684                                   /* RefEdge * */ void *ref_edge2,
1685                              /* RefEdge * */ void *ref_edge3, 
1686                                 CubitBoolean full )
1687/* < API function for GeometryTool::create_arc_three */
1688{
1689  RefEdge *temp_ref_edge1 = (RefEdge *) ref_edge1;
1690  RefEdge *temp_ref_edge2 = (RefEdge *) ref_edge2;
1691  RefEdge *temp_ref_edge3 = (RefEdge *) ref_edge3;
1692   
1693  return GTI->create_arc_three(temp_ref_edge1, temp_ref_edge2, 
1694                               temp_ref_edge3, full);
1695}
1696
1697CubitStatus GeometryTool_create_arc_center_edge( /* RefVertex* */ void *ref_vertex1, 
1698                                         /* RefVertex* */ void *ref_vertex2,
1699                                         /* RefVertex* */ void *ref_vertex3, 
1700                                       double radius,
1701                                       CubitBoolean full )
1702/* < API function for GeometryTool::create_arc_center_edge */
1703{
1704  RefVertex *temp_ref_vertex1 = (RefVertex *) ref_vertex1;
1705  RefVertex *temp_ref_vertex2 = (RefVertex *) ref_vertex2;
1706  RefVertex *temp_ref_vertex3 = (RefVertex *) ref_vertex3;
1707   
1708  return GTI->create_arc_center_edge(temp_ref_vertex1, temp_ref_vertex2, 
1709                                     temp_ref_vertex3, radius, full);
1710}
1711
1712
1713  /* /<HR><H3>Topology and geometry deletion</H3> */
1714void GeometryTool_delete_Body_1(/* DLBodyList& */ void ***body_list,
1715                    int *body_list_size,
1716                    CubitBoolean remove_solid_model_entities)
1717/* < API function for GeometryTool::delete_Body */
1718{
1719  DLBodyList temp_body_list;
1720  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
1721 
1722  GTI->delete_Body(temp_body_list,
1723                   remove_solid_model_entities);
1724}
1725
1726CubitStatus GeometryTool_delete_Body_2(
1727    /* Body * */ void *body_ptr,
1728    CubitBoolean remove_solid_model_entities)
1729/* < API function for GeometryTool::delete_Body */
1730{
1731  Body *temp_body_ptr = (Body *) body_ptr;
1732   
1733  return GTI->delete_Body(temp_body_ptr, remove_solid_model_entities);
1734}
1735
1736CubitStatus GeometryTool_delete_RefAssembly(
1737    /* RefAssembly *& */ void *ref_assembly_ptr,
1738    CubitBoolean remove_solid_model_entities)
1739/* < API function for GeometryTool::delete_RefAssembly */
1740{
1741  RefAssembly *temp_ref_assembly_ptr = (RefAssembly *) ref_assembly_ptr;
1742   
1743  return GTI->delete_RefAssembly(temp_ref_assembly_ptr, remove_solid_model_entities);
1744}
1745
1746CubitStatus GeometryTool_delete_RefPart(
1747    /* RefPart *& */ void *ref_part_ptr,
1748    CubitBoolean remove_solid_model_entities)
1749/* < API function for GeometryTool::delete_RefPart */
1750{
1751  RefPart *temp_ref_part_ptr = (RefPart *) ref_part_ptr;
1752   
1753  return GTI->delete_RefPart(temp_ref_part_ptr, remove_solid_model_entities);
1754}
1755
1756CubitStatus GeometryTool_delete_RefEntity(
1757    /* RefEntity *& */ void *ref_entity_ptr,
1758    CubitBoolean remove_solid_model_entities,
1759    CubitBoolean remove_lower_entities )
1760/* < API function for GeometryTool::delete_RefEntity */
1761{
1762  RefEntity *temp_ref_entity_ptr = (RefEntity *) ref_entity_ptr;
1763   
1764  return GTI->delete_RefEntity(temp_ref_entity_ptr, 
1765                               remove_solid_model_entities, remove_lower_entities);
1766}
1767
1768void GeometryTool_cleanout_deactivated_geometry()
1769/* < API function for GeometryTool::cleanout_deactivated_geometry */
1770{
1771  GTI->cleanout_deactivated_geometry();
1772}
1773
1774void GeometryTool_cleanout_temporary_geometry ()
1775/* < API function for GeometryTool::cleanout_temporary_geometry  */
1776{
1777  GTI->cleanout_temporary_geometry();
1778}
1779
1780void GeometryTool_delete_geometry()
1781/* < API function for GeometryTool::delete_geometry */
1782{
1783  GTI->delete_geometry();
1784}
1785
1786  /* /< <HR><H3>Miscellaneous geometry evaluation functions</H3> */
1787CubitStatus GeometryTool_interpolate_along_surface( CubitVectorStruct *vector_1,
1788                                          CubitVectorStruct *vector_2,
1789                                            /* DLCubitVectorList & */ CubitVectorStruct *vector_list,
1790                                          int vector_list_size,
1791                                            /* RefFace * */ void *ref_face_ptr,
1792                                          int number_points )
1793/* < API function for GeometryTool::interpolate_along_surface */
1794{
1795  CubitVector temp_vector_1 = *vector_1;
1796  CubitVector temp_vector_2 = *vector_2;
1797 
1798  DLCubitVectorList temp_vector_list;
1799  COPY_STRUCTARRAY_TO_LIST(vector_list, vector_list_size, 
1800                           temp_vector_list, CubitVector);
1801 
1802  RefFace *temp_ref_face_ptr = (RefFace *) ref_face_ptr;
1803 
1804  CubitStatus result = GTI->interpolate_along_surface(&temp_vector_1, &temp_vector_2, 
1805                                                      temp_vector_list, temp_ref_face_ptr, 
1806                                                      number_points);
1807
1808  DELETE_STRUCTLIST(temp_vector_list);
1809 
1810  return result;
1811}
1812
1813CubitBoolean GeometryTool_about_spatially_equal_1 (const /* CubitVector& */ CubitVectorStruct* Vec1, 
1814                                       const /* CubitVector& */ CubitVectorStruct* Vec2,
1815                                       double tolerance_factor)
1816/* < API function for GeometryTool::about_spatially_equal  */
1817{
1818  CubitVector temp_Vec1 = *Vec1;
1819  CubitVector temp_Vec2 = *Vec2;
1820
1821  return GTI->about_spatially_equal (temp_Vec1, temp_Vec2, tolerance_factor);
1822}
1823
1824CubitBoolean GeometryTool_about_spatially_equal_2 (/* RefVertex * */ void *refVertex1, 
1825                                         /* RefVertex * */ void *refVertex2, 
1826                                       double tolerance_factor)
1827/* < API function for GeometryTool::about_spatially_equal  */
1828{
1829  RefVertex *temp_refVertex1 = (RefVertex *) refVertex1;
1830  RefVertex *temp_refVertex2 = (RefVertex *) refVertex2;
1831 
1832  return GTI->about_spatially_equal (temp_refVertex1, temp_refVertex2, 
1833                                     tolerance_factor);
1834}
1835
1836double GeometryTool_geometric_angle(/* RefEdge * */ void *ref_edge_1, 
1837                            /* RefEdge * */ void *ref_edge_2,
1838                            /* RefFace * */ void *ref_face)
1839/* < API function for GeometryTool::geometric_angle */
1840{
1841  RefEdge *temp_ref_edge_1 = (RefEdge *) ref_edge_1;
1842  RefEdge *temp_ref_edge_2 = (RefEdge *) ref_edge_2;
1843   
1844  RefFace *temp_ref_face = (RefFace *) ref_face;
1845 
1846  return GTI->geometric_angle(temp_ref_edge_1, temp_ref_edge_2, temp_ref_face);
1847}
1848
1849  double GeometryTool_geometric_angle(/* CoEdge* */ void *co_edge_1, 
1850                                        /* CoEdge* */ void *co_edge_2 ) 
1851{
1852
1853  CoEdge *temp_co_edge_1 = (CoEdge *) co_edge_1;
1854  CoEdge *temp_co_edge_2 = (CoEdge *) co_edge_2;
1855
1856  return GTI->geometric_angle(temp_co_edge_1, temp_co_edge_2);
1857}
1858
1859double GeometryTool_surface_angle( /* RefEdge * */ void *ref_edge,
1860                                     /* RefFace * */ void *ref_face_1, 
1861                                     /* RefFace * */ void *ref_face_2,
1862                                     /* RefVolume * */ void *ref_volume )
1863{
1864  RefEdge *temp_ref_edge = (RefEdge *) ref_edge;
1865  RefFace *temp_ref_face_1 = (RefFace *) ref_face_1;
1866  RefFace *temp_ref_face_2 = (RefFace *) ref_face_2;
1867  RefVolume *temp_ref_volume = (RefVolume *) ref_volume;
1868
1869  return GTI->surface_angle(temp_ref_edge, temp_ref_face_1, temp_ref_face_2, 
1870                            temp_ref_volume);
1871}
1872
1873CubitStatus GeometryTool_get_intersections( /* RefEdge * */ void *ref_edge1, 
1874                                    /* RefEdge * */ void *ref_edge2,
1875                                    /* DLCubitVectorList& */ CubitVectorStruct **intersection_list,
1876                                  int *intersection_list_size,
1877                                  CubitBoolean bounded,
1878                                  CubitBoolean closest )
1879/* < API function for GeometryTool::get_intersections */
1880{
1881  RefEdge *temp_ref_edge1 = (RefEdge *) ref_edge1;
1882  RefEdge *temp_ref_edge2 = (RefEdge *) ref_edge2;
1883
1884  DLCubitVectorList temp_intersection_list;
1885  CubitStatus result = GTI->get_intersections(temp_ref_edge1, temp_ref_edge2, 
1886                                              temp_intersection_list, 
1887                                              bounded, closest);
1888
1889  COPY_LIST_TO_STRUCTARRAY(temp_intersection_list, *intersection_list, 
1890                           *intersection_list_size, CubitVectorStruct);
1891 
1892  DELETE_STRUCTLIST(temp_intersection_list);
1893 
1894  return result;
1895}
1896
1897CubitBoxStruct GeometryTool_bounding_box_of_bodies()
1898/* < API function for GeometryTool::bounding_box_of_bodies */
1899{
1900  return GTI->bounding_box_of_bodies();
1901}
1902
1903
1904  /* /< <HR><H3>Healing functions</H3> */
1905CubitStatus GeometryTool_autoheal_bodies(/* DLBodyList & */ void ***body_list,
1906                               int *body_list_size,
1907                                 /* DLBodyList & */ void ***new_body_list,
1908                               int *new_body_list_size,
1909                               CubitBoolean rebuild, 
1910                               CubitBoolean keep_old, CubitBoolean make_tolerant,
1911                               FILE* logfile_ptr )
1912/* < API function for GeometryTool::autoheal_bodies */
1913{
1914  DLBodyList temp_body_list;
1915  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
1916 
1917  DLBodyList temp_new_body_list;
1918 
1919  CubitStatus result = GTI->autoheal_bodies(temp_body_list, temp_new_body_list, 
1920                                            rebuild, keep_old, make_tolerant, 
1921                                            logfile_ptr);
1922
1923  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
1924
1925  return result;
1926}
1927
1928CubitStatus GeometryTool_healer_analyze_badgeom( /* DLBodyList & */ void ***body_list,
1929                                       int *body_list_size,
1930                                       FILE* logfile )
1931/* < API function for GeometryTool::healer_analyze_badgeom */
1932{
1933  DLBodyList temp_body_list;
1934  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
1935 
1936  return GTI->healer_analyze_badgeom(temp_body_list, logfile);
1937}
1938
1939CubitStatus GeometryTool_healer_show_badgeom( /* DLBodyList & */ void ***body_list,
1940                                    int *body_list_size)
1941/* < API function for GeometryTool::healer_show_badgeom */
1942{
1943  DLBodyList temp_body_list;
1944  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
1945 
1946  return GTI->healer_show_badgeom(temp_body_list);
1947}
1948
1949CubitStatus GeometryTool_healer_show_tcurves( /* DLBodyList & */ void ***body_list, int *body_list_size)
1950/* < API function for GeometryTool::healer_show_tcurves */
1951{
1952  DLBodyList temp_body_list;
1953  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
1954 
1955  return GTI->healer_show_tcurves(temp_body_list);
1956}
1957
1958CubitStatus GeometryTool_heal_incremental( /* DLBodyList & */ void ***body_list,
1959                                 int *body_list_size,
1960                              /* DLBodyList & */ void ***new_bodies,
1961                                 int *new_bodies_size,
1962                                 double simplify_tol,
1963                                 double stitch_min_tol,
1964                                 double stitch_max_tol,
1965                                 double geombuild_tol,
1966                                 double analytic_tol,
1967                                 double isospline_tol,
1968                                 double reblend_classify_tol,
1969                                 double reblend_tol,
1970                                 CubitBoolean keep_old,
1971                                 CubitBoolean make_tolerant,
1972                                 FILE* logfile_ptr)
1973/* < API function for GeometryTool::heal_incremental */
1974{
1975  DLBodyList temp_body_list;
1976  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
1977 
1978  DLBodyList temp_new_bodies;
1979 
1980  CubitStatus result = GTI->heal_incremental(temp_body_list, temp_new_bodies, simplify_tol, 
1981                                             stitch_min_tol, stitch_max_tol, geombuild_tol, 
1982                                             analytic_tol, isospline_tol, reblend_classify_tol, 
1983                                             reblend_tol, keep_old, make_tolerant, logfile_ptr);
1984
1985  COPY_LIST_TO_ARRAY(temp_new_bodies, *new_bodies, *new_bodies_size);
1986 
1987
1988  return result;
1989}
1990
1991void GeometryTool_healer_list_incremental()
1992/* < API function for GeometryTool::healer_list_incremental */
1993{
1994  GTI->healer_list_incremental();
1995}
1996
1997void GeometryTool_healer_list_tolerances( /* DLBodyList & */ void ***body_list,
1998                                                   int *body_list_size)
1999/* < API function for GeometryTool::healer_list_tolerances */
2000{
2001  DLBodyList temp_body_list;
2002  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
2003 
2004  GTI->healer_list_tolerances(temp_body_list);
2005}
2006
2007double GeometryTool_healer_get_default_simplify_tol()
2008/* < API function for GeometryTool::healer_get_default_simplify_tol */
2009{
2010  return GTI->healer_get_default_simplify_tol();
2011}
2012
2013void GeometryTool_healer_set_default_simplify_tol( double tol)
2014/* < API function for GeometryTool::healer_set_default_simplify_tol */
2015{
2016  GTI->healer_set_default_simplify_tol(tol);
2017}
2018
2019double GeometryTool_healer_get_default_stitch_min_tol()
2020/* < API function for GeometryTool::healer_get_default_stitch_min_tol */
2021{
2022  return GTI->healer_get_default_stitch_min_tol();
2023}
2024
2025void GeometryTool_healer_set_default_stitch_min_tol( double tol)
2026/* < API function for GeometryTool::healer_set_default_stitch_min_tol */
2027{
2028  GTI->healer_set_default_stitch_min_tol(tol);
2029}
2030
2031double GeometryTool_healer_get_default_stitch_max_tol()
2032/* < API function for GeometryTool::healer_get_default_stitch_max_tol */
2033{
2034  return GTI->healer_get_default_stitch_max_tol();
2035}
2036
2037void GeometryTool_healer_set_default_stitch_max_tol( double tol)
2038/* < API function for GeometryTool::healer_set_default_stitch_max_tol */
2039{
2040  GTI->healer_set_default_stitch_max_tol(tol);
2041}
2042
2043double GeometryTool_healer_get_default_geombuild_tol()
2044/* < API function for GeometryTool::healer_get_default_geombuild_tol */
2045{
2046  return GTI->healer_get_default_geombuild_tol();
2047}
2048
2049void GeometryTool_healer_set_default_geombuild_tol( double tol)
2050/* < API function for GeometryTool::healer_set_default_geombuild_tol */
2051{
2052  GTI->healer_set_default_geombuild_tol(tol);
2053}
2054
2055double GeometryTool_healer_get_default_analytic_tol()
2056/* < API function for GeometryTool::healer_get_default_analytic_tol */
2057{
2058  return GTI->healer_get_default_analytic_tol();
2059}
2060
2061void GeometryTool_healer_set_default_analytic_tol( double tol)
2062/* < API function for GeometryTool::healer_set_default_analytic_tol */
2063{
2064  GTI->healer_set_default_analytic_tol(tol);
2065}
2066
2067double GeometryTool_healer_get_default_isospline_tol()
2068/* < API function for GeometryTool::healer_get_default_isospline_tol */
2069{
2070  return GTI->healer_get_default_isospline_tol();
2071}
2072
2073void GeometryTool_healer_set_default_isospline_tol( double tol)
2074/* < API function for GeometryTool::healer_set_default_isospline_tol */
2075{
2076  GTI->healer_set_default_isospline_tol(tol);
2077}
2078
2079double GeometryTool_healer_get_default_reblend_classify_tol()
2080/* < API function for GeometryTool::healer_get_default_reblend_classify_tol */
2081{
2082  return GTI->healer_get_default_reblend_classify_tol();
2083}
2084
2085void GeometryTool_healer_set_default_reblend_classify_tol( double tol)
2086/* < API function for GeometryTool::healer_set_default_reblend_classify_tol */
2087{
2088  GTI->healer_set_default_reblend_classify_tol(tol);
2089}
2090
2091double GeometryTool_healer_get_default_reblend_tol()
2092/* < API function for GeometryTool::healer_get_default_reblend_tol */
2093{
2094  return GTI->healer_get_default_reblend_tol();
2095}
2096
2097void GeometryTool_healer_set_default_reblend_tol( double tol)
2098/* < API function for GeometryTool::healer_set_default_reblend_tol */
2099{
2100  GTI->healer_set_default_reblend_tol(tol);
2101}
2102
2103void GeometryTool_healer_reset_default_tolerances()
2104/* < API function for GeometryTool::healer_reset_default_tolerances */
2105{
2106  GTI->healer_reset_default_tolerances();
2107}
2108
2109void GeometryTool_healer_list_default_tolerances()
2110/* < API function for GeometryTool::healer_list_default_tolerances */
2111{
2112  GTI->healer_list_default_tolerances();
2113}
2114
2115void GeometryTool_healer_clean_attributes( /* DLBodyList& */ void ***body_list,
2116                                                   int *body_list_size)
2117/* < API function for GeometryTool::healer_clean_attributes */
2118{
2119  DLBodyList temp_body_list;
2120  COPY_ARRAY_TO_LIST(*body_list, *body_list_size, temp_body_list);
2121
2122  GTI->healer_clean_attributes(temp_body_list);
2123}
2124
2125CubitBoolean GeometryTool_healer_get_cleanatt_flg()
2126/* < API function for GeometryTool::healer_get_cleanatt_flg */
2127{
2128  return GTI->healer_get_cleanatt_flg();
2129}
2130
2131void GeometryTool_healer_set_cleanatt_flg( CubitBoolean flg)
2132/* < API function for GeometryTool::healer_set_cleanatt_flg */
2133{
2134  GTI->healer_set_cleanatt_flg(flg);
2135}
2136
2137int GeometryTool_healer_get_show_method() 
2138/* < API function for GeometryTool::healer_get_show_method */
2139{
2140  return GTI->healer_get_show_method();
2141}
2142
2143void GeometryTool_healer_set_show_method( int method)
2144/* < API function for GeometryTool::healer_set_show_method */
2145{
2146  GTI->healer_set_show_method(method);
2147}
2148   
2149CubitBoolean GeometryTool_healer_get_show_summary_flg()
2150/* < API function for GeometryTool::healer_get_show_summary_flg */
2151{
2152  return GTI->healer_get_show_summary_flg();
2153}
2154
2155void GeometryTool_healer_set_show_summary_flg( CubitBoolean flg)
2156/* < API function for GeometryTool::healer_set_show_summary_flg */
2157{
2158  GTI->healer_set_show_summary_flg(flg);
2159}
2160   
2161CubitBoolean GeometryTool_healer_get_show_details_flg()
2162/* < API function for GeometryTool::healer_get_show_details_flg */
2163{
2164  return GTI->healer_get_show_details_flg();
2165}
2166
2167void GeometryTool_healer_set_show_details_flg( CubitBoolean flg)
2168/* < API function for GeometryTool::healer_set_show_details_flg */
2169{
2170  GTI->healer_set_show_details_flg(flg);
2171}
2172   
2173CubitBoolean GeometryTool_healer_get_show_on_heal_flg()
2174/* < API function for GeometryTool::healer_get_show_on_heal_flg */
2175{
2176  return GTI->healer_get_show_on_heal_flg();
2177}
2178
2179void GeometryTool_healer_set_show_on_heal_flg( CubitBoolean flg)
2180/* < API function for GeometryTool::healer_set_show_on_heal_flg */
2181{
2182  GTI->healer_set_show_on_heal_flg(flg);
2183}
2184
2185CubitBoolean GeometryTool_healer_get_check_vol_on_heal_flg()
2186/* < API function for GeometryTool::healer_get_check_vol_on_heal_flg */
2187{
2188  return GTI->healer_get_check_vol_on_heal_flg();
2189}
2190
2191void GeometryTool_healer_set_check_vol_on_heal_flg( CubitBoolean flg)
2192/* < API function for GeometryTool::healer_set_check_vol_on_heal_flg */
2193{
2194  GTI->healer_set_check_vol_on_heal_flg(flg);
2195}
2196
2197double GeometryTool_healer_get_vol_on_heal_limit()
2198/* < API function for GeometryTool::healer_get_vol_on_heal_limit */
2199{
2200  return GTI->healer_get_vol_on_heal_limit();
2201}
2202
2203void GeometryTool_healer_set_vol_on_heal_limit( double limit)
2204/* < API function for GeometryTool::healer_set_vol_on_heal_limit */
2205{
2206  GTI->healer_set_vol_on_heal_limit(limit);
2207}
2208   
2209CubitBoolean GeometryTool_healer_get_check_surf_on_heal_flg()
2210/* < API function for GeometryTool::healer_get_check_surf_on_heal_flg */
2211{
2212  return GTI->healer_get_check_surf_on_heal_flg();
2213}
2214
2215void GeometryTool_healer_set_check_surf_on_heal_flg( CubitBoolean flg)
2216/* < API function for GeometryTool::healer_set_check_surf_on_heal_flg */
2217{
2218  GTI->healer_set_check_surf_on_heal_flg(flg);
2219}
2220
2221double GeometryTool_healer_get_surf_on_heal_limit()
2222/* < API function for GeometryTool::healer_get_surf_on_heal_limit */
2223{
2224  return GTI->healer_get_surf_on_heal_limit();
2225}
2226
2227void GeometryTool_healer_set_surf_on_heal_limit( double limit)
2228/* < API function for GeometryTool::healer_set_surf_on_heal_limit */
2229{
2230  GTI->healer_set_surf_on_heal_limit(limit);
2231}
2232   
2233CubitBoolean GeometryTool_healer_get_check_curve_on_heal_flg()
2234/* < API function for GeometryTool::healer_get_check_curve_on_heal_flg */
2235{
2236  return GTI->healer_get_check_curve_on_heal_flg();
2237}
2238
2239void GeometryTool_healer_set_check_curve_on_heal_flg( CubitBoolean flg)
2240/* < API function for GeometryTool::healer_set_check_curve_on_heal_flg */
2241{
2242  GTI->healer_set_check_curve_on_heal_flg(flg);
2243}
2244
2245double GeometryTool_healer_get_curve_on_heal_limit()
2246/* < API function for GeometryTool::healer_get_curve_on_heal_limit */
2247{
2248  return GTI->healer_get_curve_on_heal_limit();
2249}
2250
2251void GeometryTool_healer_set_curve_on_heal_limit( double limit)
2252/* < API function for GeometryTool::healer_set_curve_on_heal_limit */
2253{
2254  GTI->healer_set_curve_on_heal_limit(limit);
2255}
2256   
2257CubitBoolean GeometryTool_healer_get_show_bad_vertices_flg()
2258/* < API function for GeometryTool::healer_get_show_bad_vertices_flg */
2259{
2260  return GTI->healer_get_show_bad_vertices_flg();
2261}
2262
2263void GeometryTool_healer_set_show_bad_vertices_flg( CubitBoolean flg)
2264/* < API function for GeometryTool::healer_set_show_bad_vertices_flg */
2265{
2266  GTI->healer_set_show_bad_vertices_flg(flg);
2267}
2268
2269CubitBoolean GeometryTool_healer_get_show_bad_curves_flg()
2270/* < API function for GeometryTool::healer_get_show_bad_curves_flg */
2271{
2272  return GTI->healer_get_show_bad_curves_flg();
2273}
2274
2275void GeometryTool_healer_set_show_bad_curves_flg( CubitBoolean flg)
2276/* < API function for GeometryTool::healer_set_show_bad_curves_flg */
2277{
2278  GTI->healer_set_show_bad_curves_flg(flg);
2279}
2280
2281CubitBoolean GeometryTool_healer_get_show_bad_coedges_flg()
2282/* < API function for GeometryTool::healer_get_show_bad_coedges_flg */
2283{
2284  return GTI->healer_get_show_bad_coedges_flg();
2285}
2286
2287void GeometryTool_healer_set_show_bad_coedges_flg( CubitBoolean flg)
2288/* < API function for GeometryTool::healer_set_show_bad_coedges_flg */
2289{
2290  GTI->healer_set_show_bad_coedges_flg(flg);
2291}
2292
2293CubitBoolean GeometryTool_healer_get_show_bad_loops_flg()
2294/* < API function for GeometryTool::healer_get_show_bad_loops_flg */
2295{
2296  return GTI->healer_get_show_bad_loops_flg();
2297}
2298
2299void GeometryTool_healer_set_show_bad_loops_flg( CubitBoolean flg)
2300/* < API function for GeometryTool::healer_set_show_bad_loops_flg */
2301{
2302  GTI->healer_set_show_bad_loops_flg(flg);
2303}
2304
2305CubitBoolean GeometryTool_healer_get_show_bad_surfaces_flg()
2306/* < API function for GeometryTool::healer_get_show_bad_surfaces_flg */
2307{
2308  return GTI->healer_get_show_bad_surfaces_flg();
2309}
2310
2311void GeometryTool_healer_set_show_bad_surfaces_flg( CubitBoolean flg)
2312/* < API function for GeometryTool::healer_set_show_bad_surfaces_flg */
2313{
2314  GTI->healer_set_show_bad_surfaces_flg(flg);
2315}
2316
2317CubitBoolean GeometryTool_healer_get_show_bad_shells_flg()
2318/* < API function for GeometryTool::healer_get_show_bad_shells_flg */
2319{
2320  return GTI->healer_get_show_bad_shells_flg();
2321}
2322
2323void GeometryTool_healer_set_show_bad_shells_flg( CubitBoolean flg)
2324/* < API function for GeometryTool::healer_set_show_bad_shells_flg */
2325{
2326  GTI->healer_set_show_bad_shells_flg(flg);
2327}
2328
2329CubitBoolean GeometryTool_healer_get_show_bad_volumes_flg()
2330/* < API function for GeometryTool::healer_get_show_bad_volumes_flg */
2331{
2332  return GTI->healer_get_show_bad_volumes_flg();
2333}
2334
2335void GeometryTool_healer_set_show_bad_volumes_flg( CubitBoolean flg)
2336/* < API function for GeometryTool::healer_set_show_bad_volumes_flg */
2337{
2338  GTI->healer_set_show_bad_volumes_flg(flg);
2339}
2340
2341CubitBoolean GeometryTool_healer_get_show_bad_bodies_flg()
2342/* < API function for GeometryTool::healer_get_show_bad_bodies_flg */
2343{
2344  return GTI->healer_get_show_bad_bodies_flg();
2345}
2346
2347void GeometryTool_healer_set_show_bad_bodies_flg( CubitBoolean flg)
2348/* < API function for GeometryTool::healer_set_show_bad_bodies_flg */
2349{
2350  GTI->healer_set_show_bad_bodies_flg(flg);
2351}
2352
2353void GeometryTool_healer_list_onshow_flgs()
2354/* < API function for GeometryTool::healer_list_onshow_flgs */
2355{
2356  GTI->healer_list_onshow_flgs();
2357}
2358
2359CubitBoolean GeometryTool_healer_get_inc_preprocess_flg()
2360/* < API function for GeometryTool::healer_get_inc_preprocess_flg */
2361{
2362  return GTI->healer_get_inc_preprocess_flg();
2363}
2364
2365void GeometryTool_healer_set_inc_preprocess_flg( CubitBoolean flg)
2366/* < API function for GeometryTool::healer_set_inc_preprocess_flg */
2367{
2368  GTI->healer_set_inc_preprocess_flg(flg);
2369}
2370
2371CubitBoolean GeometryTool_healer_get_inc_simplify_flg()
2372/* < API function for GeometryTool::healer_get_inc_simplify_flg */
2373{
2374  return GTI->healer_get_inc_simplify_flg();
2375}
2376
2377void GeometryTool_healer_set_inc_simplify_flg( CubitBoolean flg)
2378/* < API function for GeometryTool::healer_set_inc_simplify_flg */
2379{
2380  GTI->healer_set_inc_simplify_flg(flg);
2381}
2382
2383CubitBoolean GeometryTool_healer_get_inc_stitch_flg()
2384/* < API function for GeometryTool::healer_get_inc_stitch_flg */
2385{
2386  return GTI->healer_get_inc_stitch_flg();
2387}
2388
2389void GeometryTool_healer_set_inc_stitch_flg( CubitBoolean flg)
2390/* < API function for GeometryTool::healer_set_inc_stitch_flg */
2391{
2392  GTI->healer_set_inc_stitch_flg(flg);
2393}
2394
2395CubitBoolean GeometryTool_healer_get_inc_geombuild_flg()
2396/* < API function for GeometryTool::healer_get_inc_geombuild_flg */
2397{
2398  return GTI->healer_get_inc_geombuild_flg();
2399}
2400
2401void GeometryTool_healer_set_inc_geombuild_flg( CubitBoolean flg)
2402/* < API function for GeometryTool::healer_set_inc_geombuild_flg */
2403{
2404  GTI->healer_set_inc_geombuild_flg(flg);
2405}
2406
2407CubitBoolean GeometryTool_healer_get_inc_analytic_flg()
2408/* < API function for GeometryTool::healer_get_inc_analytic_flg */
2409{
2410  return GTI->healer_get_inc_analytic_flg();
2411}
2412
2413void GeometryTool_healer_set_inc_analytic_flg( CubitBoolean flg)
2414/* < API function for GeometryTool::healer_set_inc_analytic_flg */
2415{
2416  GTI->healer_set_inc_analytic_flg(flg);
2417}
2418
2419CubitBoolean GeometryTool_healer_get_inc_isospline_flg()
2420/* < API function for GeometryTool::healer_get_inc_isospline_flg */
2421{
2422  return GTI->healer_get_inc_isospline_flg();
2423}
2424
2425void GeometryTool_healer_set_inc_isospline_flg( CubitBoolean flg)
2426/* < API function for GeometryTool::healer_set_inc_isospline_flg */
2427{
2428  GTI->healer_set_inc_isospline_flg(flg);
2429}
2430
2431CubitBoolean GeometryTool_healer_get_inc_reblend_flg()
2432/* < API function for GeometryTool::healer_get_inc_reblend_flg */
2433{
2434  return GTI->healer_get_inc_reblend_flg();
2435}
2436
2437void GeometryTool_healer_set_inc_reblend_flg( CubitBoolean flg)
2438/* < API function for GeometryTool::healer_set_inc_reblend_flg */
2439{
2440  GTI->healer_set_inc_reblend_flg(flg);
2441}
2442
2443CubitBoolean GeometryTool_healer_get_inc_sharpedge_flg()
2444/* < API function for GeometryTool::healer_get_inc_sharpedge_flg */
2445{
2446  return GTI->healer_get_inc_sharpedge_flg();
2447}
2448
2449void GeometryTool_healer_set_inc_sharpedge_flg( CubitBoolean flg)
2450/* < API function for GeometryTool::healer_set_inc_sharpedge_flg */
2451{
2452  GTI->healer_set_inc_sharpedge_flg(flg);
2453}
2454
2455CubitBoolean GeometryTool_healer_get_inc_genericspline_flg()
2456/* < API function for GeometryTool::healer_get_inc_genericspline_flg */
2457{
2458  return GTI->healer_get_inc_genericspline_flg();
2459}
2460
2461void GeometryTool_healer_set_inc_genericspline_flg( CubitBoolean flg)
2462/* < API function for GeometryTool::healer_set_inc_genericspline_flg */
2463{
2464  GTI->healer_set_inc_genericspline_flg(flg);
2465}
2466
2467CubitBoolean GeometryTool_healer_get_inc_wrapup_flg()
2468/* < API function for GeometryTool::healer_get_inc_wrapup_flg */
2469{
2470  return GTI->healer_get_inc_wrapup_flg();
2471}
2472
2473void GeometryTool_healer_set_inc_wrapup_flg( CubitBoolean flg)
2474/* < API function for GeometryTool::healer_set_inc_wrapup_flg */
2475{
2476  GTI->healer_set_inc_wrapup_flg(flg);
2477}
2478
2479CubitBoolean GeometryTool_healer_get_inc_postprocess_flg()
2480/* < API function for GeometryTool::healer_get_inc_postprocess_flg */
2481{
2482  return GTI->healer_get_inc_postprocess_flg();
2483}
2484
2485void GeometryTool_healer_set_inc_postprocess_flg( CubitBoolean flg)
2486/* < API function for GeometryTool::healer_set_inc_postprocess_flg */
2487{
2488  GTI->healer_set_inc_postprocess_flg(flg);
2489}
2490
2491CubitStatus GeometryTool_force_simplify_to_plane( /* DLRefFaceList & */ void ***ref_face_list,
2492                                        int *ref_face_list_size,
2493                                          /* DLBodyList & */ void ***new_body_list,
2494                                        int *new_body_list_size, 
2495                                        CubitBoolean keep_old_body)
2496/* < API function for GeometryTool::force_simplify_to_plane */
2497{
2498  DLRefFaceList temp_ref_face_list;
2499  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
2500 
2501  DLBodyList temp_new_body_list;
2502 
2503  CubitStatus result = GTI->force_simplify_to_plane(temp_ref_face_list, temp_new_body_list, keep_old_body);
2504
2505  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
2506 
2507  return result;
2508}
2509
2510CubitStatus GeometryTool_force_simplify_to_cylinder( /* DLRefFaceList & */ void ***ref_face_list,
2511                                           int *ref_face_list_size,
2512                                             /* DLBodyList & */ void ***new_body_list,
2513                                           int *new_body_list_size, 
2514                                           CubitBoolean keep_old_body)
2515/* < API function for GeometryTool::force_simplify_to_cylinder */
2516{
2517  DLRefFaceList temp_ref_face_list;
2518  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
2519 
2520  DLBodyList temp_new_body_list;
2521 
2522  CubitStatus result = GTI->force_simplify_to_cylinder(temp_ref_face_list, temp_new_body_list, keep_old_body);
2523
2524  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
2525
2526  return result;
2527}
2528
2529CubitStatus GeometryTool_force_simplify_to_cone( /* DLRefFaceList & */ void ***ref_face_list,
2530                                       int *ref_face_list_size,
2531                                         /* DLBodyList & */ void ***new_body_list,
2532                                       int *new_body_list_size, 
2533                                       CubitBoolean keep_old_body)
2534/* < API function for GeometryTool::force_simplify_to_cone */
2535{
2536  DLRefFaceList temp_ref_face_list;
2537  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
2538 
2539  DLBodyList temp_new_body_list;
2540 
2541  CubitStatus result = GTI->force_simplify_to_cone(temp_ref_face_list, temp_new_body_list, keep_old_body);
2542
2543  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
2544 
2545  return result;
2546}
2547
2548CubitStatus GeometryTool_force_simplify_to_sphere( /* DLRefFaceList & */ void ***ref_face_list,
2549                                         int *ref_face_list_size,
2550                                           /* DLBodyList & */ void ***new_body_list,
2551                                         int *new_body_list_size, 
2552                                         CubitBoolean keep_old_body)
2553/* < API function for GeometryTool::force_simplify_to_sphere */
2554{
2555  DLRefFaceList temp_ref_face_list;
2556  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
2557 
2558  DLBodyList temp_new_body_list;
2559 
2560  CubitStatus result = GTI->force_simplify_to_sphere(temp_ref_face_list, temp_new_body_list, keep_old_body);
2561
2562  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
2563 
2564  return result;
2565}
2566
2567CubitStatus GeometryTool_force_simplify_to_torus( /* DLRefFaceList & */ void ***ref_face_list,
2568                                        int *ref_face_list_size,
2569                                          /* DLBodyList & */ void ***new_body_list,
2570                                        int *new_body_list_size, 
2571                                        CubitBoolean keep_old_body)
2572/* < API function for GeometryTool::force_simplify_to_torus */
2573{
2574  DLRefFaceList temp_ref_face_list;
2575  COPY_ARRAY_TO_LIST(*ref_face_list, *ref_face_list_size, temp_ref_face_list);
2576 
2577  DLBodyList temp_new_body_list;
2578 
2579  CubitStatus result = GTI->force_simplify_to_torus(temp_ref_face_list, temp_new_body_list, 
2580                                                    keep_old_body);
2581
2582  COPY_LIST_TO_ARRAY(temp_new_body_list, *new_body_list, *new_body_list_size);
2583 
2584  return result;
2585}
2586
2587  /* /< <HR><H3>Merging functions.</H3> */
2588   
2589void GeometryTool_set_geometry_factor( double fac)
2590/* < API function for GeometryTool::set_geometry_factor */
2591{
2592  GTI->set_geometry_factor(fac);
2593}
2594
2595double GeometryTool_get_geometry_factor()
2596/* < API function for GeometryTool::get_geometry_factor */
2597{
2598  return GTI->get_geometry_factor();
2599}
2600
2601void GeometryTool_set_merge_test_bbox(CubitBoolean tof)
2602/* < API function for GeometryTool::set_merge_test_bbox */
2603{
2604  GTI->set_merge_test_bbox(tof);
2605}
2606
2607CubitBoolean GeometryTool_get_merge_test_bbox()
2608/* < API function for GeometryTool::get_merge_test_bbox */
2609{
2610  return GTI->get_merge_test_bbox();
2611}
2612
2613void GeometryTool_set_merge_test_internal(int tof)
2614/* < API function for GeometryTool::set_merge_test_internal */
2615{
2616  GTI->set_merge_test_internal(tof);
2617}
2618
2619int GeometryTool_get_merge_test_internal()
2620/* < API function for GeometryTool::get_merge_test_internal */
2621{
2622  return GTI->get_merge_test_internal();
2623}
2624
2625enum CubitBoolean GeometryTool_same_engine(/* DLTopologyEntityList & */ void ***topo_list, int *topo_list_size) 
2626{
2627  DLTopologyEntityList temp_topo_list;
2628  COPY_ARRAY_TO_LIST(*topo_list, *topo_list_size, temp_topo_list);
2629 
2630  return GTI->same_engine(temp_topo_list);
2631}
2632   
2633  /* GeometricModelingEngine* */ void *GeometryTool_common_engine( 
2634        /* DLTopologyEntityList& */ void ***topology_list, int *topology_list_size,
2635          /* DLTopologyBridgeList& */ void ***engine_bridges, int *engine_bridges_size,
2636        enum CubitBoolean allow_virtual_engine) 
2637{
2638  DLTopologyEntityList temp_topology_list;
2639  COPY_ARRAY_TO_LIST(*topology_list, *topology_list_size, temp_topology_list);
2640 
2641  DLTopologyBridgeList temp_engine_bridges;
2642  void *dummy = GTI->common_engine(temp_topology_list, temp_engine_bridges, allow_virtual_engine);
2643 
2644  COPY_LIST_TO_ARRAY(temp_engine_bridges, *engine_bridges, *engine_bridges_size);
2645 
2646  return dummy;
2647}
2648
2649  void GeometryTool_set_sep_after_webcut(enum CubitBoolean val) {GTI->set_sep_after_webcut(val);}
2650  enum CubitBoolean GeometryTool_get_sep_after_webcut() {return GTI->get_sep_after_webcut();}
Note: See TracBrowser for help on using the browser.