1 /* --------------------------------------------------------------------  */
2 /*                          CALCULIX                                     */
3 /*                   - GRAPHICAL INTERFACE -                             */
4 /*                                                                       */
5 /*     A 3-dimensional pre- and post-processor for finite elements       */
6 /*              Copyright (C) 1996 Klaus Wittig                          */
7 /*                                                                       */
8 /*     This program is free software; you can redistribute it and/or     */
9 /*     modify it under the terms of the GNU General Public License as    */
10 /*     published by the Free Software Foundation; either version 2 of    */
11 /*     the License, or (at your option) any later version.               */
12 /*                                                                       */
13 /*     This program is distributed in the hope that it will be useful,   */
14 /*     but WITHOUT ANY WARRANTY; without even the implied warranty of    */
15 /*     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the      */
16 /*     GNU General Public License for more details.                      */
17 /*                                                                       */
18 /*     You should have received a copy of the GNU General Public License */
19 /*     along with this program; if not, write to the Free Software       */
20 /*     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         */
21 /* --------------------------------------------------------------------  */
22 
23 /* ALL function prototypes for the program "CalculiX GraphiX (cgx)" */
24 
25 #include "extUtil.h"
26 #include "trackball.h"
27 
28 
29 /* factors for the geometric tolerance for merging */
30 /* the space used by all lines will be multiplied with this value to calculate the default */
31 /* geometric tolerance (dx,dy or dz whichever is greatest. ie: gtol=GTOL*dx) */
32 #define     GTOL        1.e-5
33 /* amplification factor for the automatic merging of edge-points if a cad-file is read (tol=gtol*GTOL_EDGES) */
34 #define     GTOL_EDGES  2.e1
35 
36 /* default values for calcLineDiv(). Can be overwritten with the "div" command */
37 /* defines the minimum angle between sectors of a line during automatic line division calculation */
38 //  7.5 deg
39 #define     GTOL_COS_A 0.9914448
40 /* defines the minimum angle difference before the line bias is increased */
41 #define     MIN_DCOS_A 0.004
42 /* defines the default minimum-element-length/maximum-element-length, used at curves */
43 #define     ELEM_LENGTH_RATIO 0.3
44 /* normal vector angle difference used to collect a target surface made of faces for 'qdis' qaddTol=QADDTOL */
45 #define     QADDTOL   10.
46 /* Defines the default maximum distance between nodes during automatic line division calculation */
47 /* GTOL_NODE_DIST * gtol = maximum distance between nodes */
48 #define     GTOL_NODE_DIST 5.e2
49 /* amplification factor for the automatic mapping in the graph() function */
50 #define     GTOL_FACTOR_GRAPH 1e-4
51 /* amplification factor for general mapping */
52 #define     GTOL_FACTOR_MAP 1e-2
53 
54 /* meshing parameters for the unstructured tr3 mesher (mesh2d) */
55 #define     NADAPT   8                 // for mesh2d()
56 #define     ALPHA    0.8               // alfa, beta both 0.8 results in an unchanged average mesh density
57 #define     BETA     0.8
58 #define     MESH2D_CURVATURE_FACTOR 10. // modifies mesh density requirement (afpha) if qfactor failes:
59         //  alpha=alpha-(qfactor*MESH2D_CURVATURE_FACTOR), a higher value forces a stronger mesh change.
60 #define     MESH2D_MAX_APLHABETA    20.      // max-value for alpha and beta in auto-refine
61 #define     MESH2D_MIN_APLHABETA    0.38      // min-value for alpha and beta in auto-refine
62 #define     ALPHAFACTOR 0.7            // modifies alpha in case of bad elems (in both directions)
63 #define     MAX_MESH2D_LOOPS 3              // max refinement loops of mesh2d()
64 #define     MESH2D_QUALITY_THRESHOLD 0.01     // qfactor=dist_cg_nurbs/circumlength_of_tri (curvature, 1st parameter)
65 #define     MAX_REFINEMENT_LOOPS     1     // nr of loops to adjust line divisions on element edges
66 /* element splitter parameter to force a certain maximum distance of the element cg to the nurbs */
67 #define     TRISPLITTER_QUALITY_THRESHOLD_FACTOR 0.3 // dist_nurbs/v_n1n2 *TRISPLITTER_QUALITY_THRESHOLD_FACTOR, to modify the req. curv in triSplitter()
68 
69 /* default nr of cpu's to be used */
70 #define     NTHREADS_MIN       1
71 #define     NTHREADS_MAX       4
72 
73 /* default location of the help files, please insert the actual one */
74 #ifdef MTU
75   #ifdef DEVEL
76     #define     HELPFILE        {"/yaprod/struct/app/cgx/prod/doc/cgx.html",\
77                              "/yaprod/struct/app/ccx/prod/doc/ccx.html"}
78   #else
79     #define     HELPFILE        {"/yaprod/cae/application/CalculiX/doc/cgx_2.17/cgx.html",\
80                              "/yaprod/cae/application/CalculiX/doc/ccx_2.17/ccx.html"}
81   #endif
82   /* default tet mesher, 0:Netgen ng_vol, 1:tetgen */
83   #define     TETMESHER  0
84 #elif defined AFLIB
85   #define     HELPFILE        {"/usr/local/CalculiX/cgx_2.18/doc/cgx/cgx.html",\
86     "/usr/local/CalculiX/ccx_2.18/doc/ccx/ccx.html",\
87     "/usr/local/CalculiX/cgx_2.16/doc/aflib/aflib.pdf"}
88   /* default tet mesher, 0:Netgen ng_vol, 1:tetgen */
89   #define     TETMESHER  1
90 #else
91   #define     HELPFILE        {"/usr/local/CalculiX/cgx_2.18/doc/cgx/cgx.html",\
92     "/usr/local/CalculiX/ccx_2.18/doc/ccx/ccx.html"}
93   /* default tet mesher, 0:Netgen ng_vol, 1:tetgen */
94   #define     TETMESHER  1
95 #endif
96 
97 #define     INITFILE        {".cgx"}
98 
99 /* html browser, change if necessary */
100 /* postscript viewer, change if necessary */
101 #ifdef MTU
102   #define     BROWSER         {"firefox"}
103   #define     PSVIEWER         {"gv"}
104   #define     ALLOW_SYS_FLAG   1
105 #else
106 /* #define     BROWSER         {"netscape"} */
107 /*   #define     BROWSER         {"mozilla"} */
108   #define     BROWSER         {"firefox"}
109 /* #define     PSVIEWER         {"ghostview"} */
110   #define     PSVIEWER         {"gv"}
111   #define     ALLOW_SYS_FLAG   0
112 #endif
113 
114 /* more parameters, better do not change them! */
115 #define     MIN_ELEM_EDGE_DISTANCE 6e-5  /* elem edges vanish during zooming if smaller */
116 #define     TEX_PIXELS  512          /* number of possible colors in texture mode */
117 #define     GAMMA       1.9          /* gamma lightens or darkens an image (Hcpy) */
118 #define     BLEND_ALPHA 0.33         /* default alpha used for blending */
119 #define     INI_SCREEN      600
120 #define     INI_MENU_WIDTH  184
121 #define     INI_MENU_HEIGHT  72
122 #define     PS_DENSITY       107     /* basic-density to convert xwd to ps */
123 #define     Z_DEPTH          2.      /* edge length of the drawing cube */
124 #define     SET_COLS    11           /* no. of predefined colors */
125 #define     BAS_COLS    3            /* basic colours: black, white, neutral */
126 #define     DEF_COL     2            /* default colour */
127 #define     PICK        1            /* lower nurbs-density during picking */
128 #define     PICK_LENGTH 5            /* default cursor-length during picking */
129 #define     DEF_LINE_DIV 4           /* default line division for new lines */
130 #define     MAX_LINE_DIV 99          /* maximum line division (cadfix restriction) */
131 #define     MIN_LINE_DIV 2           /* minimum line division used for the automatic division calculation */
132 #define     NURS_TOLERANCE 30
133 #define     NURS_TOLERANCE_PICK 80
134 #define     NURS_ADD_AMBIG_PNTS 20   /* maximum expected points at ambiguous edge */
135 #define     TOL_AMBIG  1.e-2        /* so close must a point be to an ambiguous edge to be considered as ambiguous (trimming of nurbs) */
136 #define     MAX_PARAM_PER_RECORD 20 /* parameter per record in command files */
137 #define     MAX_STACK_PARAMS 30     /* parameter to be written to the stack */
138 #define     GL_FEEDBACK_BUFF_SIZE 3000000  /* size of the feedback buffer for nurbs-rendering */
139 #define     UV_STEPS        101           /* resolution of the uv-space of nurbs (triangulation ) */
140 #define     MIN_ANGLE_TRI3  0.99          /* badelems.c: S*S, alfa=acos(sqrt(MIN_ANGLE_TRI3)) */
141 #define     MAX_MATERIALS     99999       /* maximum material number (limited by frd-format to 99999) */
142 #define     MILLISECONDS_PER_PERIOD 1200  /* default length of one period of animation */
143 #define     GLUT_MENU_POINT_HEIGHT  18    /* seems to be always that value anyway(?) */
144 #define     GLUT_FONT      {  GLUT_BITMAP_TIMES_ROMAN_10,\
145                               GLUT_BITMAP_HELVETICA_12,\
146                               GLUT_BITMAP_8_BY_13,\
147                               GLUT_BITMAP_9_BY_15,\
148                               GLUT_BITMAP_HELVETICA_18,\
149                               GLUT_BITMAP_TIMES_ROMAN_24}
150 #define     GLUT_FONT_WIDTH  { 5,6,8,9,10,11 }
151 #define     GLUT_FONT_HEIGHT  { 16,18,18,18,20,24 }
152 #define     DEF_GLUT_FONT      3          /* indx starts with 0 */
153 #define     SUM_GLUT_FONTS     6
154 
155 /* glu steps seem to be restricted */
156 #define     CGX_GLU_MAX_STEPS 200
157 
158 
159 /*
160 used fom material illumination
161 */
162 #define ILLUMINATE_RESULTS 1           /* 1: illumination of displayed results */
163 
164 #define GAMB     0.5
165 #define AMB      1.0
166 #define DIFF     0.5
167 #define MAT_DIFF 0.6
168 #define MAT_SPEC 0.0
169 
170 #define  CMAP_CELLS_LIGHT  34             /* number of grey-values in the colormap */
171 #define  CMAP_DARKSHIFT     5             /* black-shift of the most bright color-cell */
172 
173 /* fixed values necessary for the mesher, must not be changed */
174 #define  MAX_SURFS_PER_BODY   6
175 #define  MAX_EDGES_PER_SURF 4
176 #define  MAX_CORNERS_PER_BODY 8
177 
178 /* for convenience fixed arrays are used in interactive functions, values can be changed */
179 #define  EDGES_PER_SURF 1000
180 #define  CORNERS_PER_BODY 100
181 #define  SURFS_PER_BODY   1000
182 #define  LINES_PER_EDGE  100
183 
184 /* for programmer convenience a max-value of faces per element is given (sufficient for all types) */
185 #define  MAX_FACES_PER_ELEM 6
186 
187 
188 /* suppress the creation of nurbsobjects, only splines are made from nurb-lines */
189 #define NO_NURL 0
190 #define NO_NURS 0
191 
192 
193 /* special sets, generated by cgx  */
194 /* internal sets should have a leading "+" or "-" */
195 /* Setnames with leading "-" are not shown with qenq */
196 #define     NSAVE         ":NOSAVE" /* entities not saved when set all is saved */
197 #define     NJBY          "-NJBY"   /*  */
198 #define     COPY          "-COPY"   /*  */
199 #define     MESH          "-MESH"   /*  */
200 #define     NOMESH        "-NOMESH" /*  */
201 #define     ZAP           "-ZAP"    /*  */
202 #define     IMPC          "-IMPC"   /* independent nodes of equations  */
203 #define     DMPC          "-DMPC"   /* dependent nodes of equations    */
204 #define     NOMPC         "-NOMPC"  /* not used dependent nodes */
205 #define     NOEL          "-NOEL"   /* dependent nodes for which no matching indep-elem was found but it was conn to a close one */
206 #define     GLUR          "-GLUR"    /* unmeshable surfaces to be rendered by the glu routine */
207 #define     BLR           "-BLR"    /*  surfaces to be rendered by the structured mesher */
208 #define     ORI           "-ORI"    /*  */
209 #define     DEP           "-DEP"    /* used for proj */
210 #define     IND           "-IND"    /* used for proj  */
211 #define     TMP           "-TMP"    /* temporary buffer for several purposes */
212 #define     HIGHLIGHT     "-HIGHL"  /* highlights identified entities */
213 #define     UORI          "-UORI"   /* save all unoriented items */
214 #define     BNUR          "-BNUR"   /* save all bad nurbs */
215 #define     BSUR          "-BSUR"   /* save all bad surfs */
216 #define     ETMP          ":ETMP"   /* save all temporary elements, deleted by next call to adjustDrawNodes(1) */
217 #define     NOPRJ         "-NOPRJ"  /* failed projection */
218 #define     CF            "+CF"     /* contact faces */
219 #define     PLOT2D        "+PLT2D"  /* selected nodes for the menu-graph (2d-plot) */
220 #define     THRESHOLD     "+THRS"   /* nodes with a value above or below the threshold */
221 
222 typedef struct {
223   char nsave[MAX_LINE_LENGTH];
224   char njby[MAX_LINE_LENGTH];
225   char copy[MAX_LINE_LENGTH];
226   char mesh[MAX_LINE_LENGTH];
227   char nomesh[MAX_LINE_LENGTH];
228   char zap[MAX_LINE_LENGTH];
229   char impc[MAX_LINE_LENGTH];
230   char mpc[MAX_LINE_LENGTH];
231   char nompc[MAX_LINE_LENGTH];
232   char noel[MAX_LINE_LENGTH];
233   char glur[MAX_LINE_LENGTH];
234   char blr[MAX_LINE_LENGTH];
235   char ori[MAX_LINE_LENGTH];
236   char dep[MAX_LINE_LENGTH];
237   char ind[MAX_LINE_LENGTH];
238   char tmp[MAX_LINE_LENGTH];
239   char etmp[MAX_LINE_LENGTH];
240   char highl[MAX_LINE_LENGTH];
241   char uori[MAX_LINE_LENGTH];
242   char bnur[MAX_LINE_LENGTH];
243   char bsur[MAX_LINE_LENGTH];
244   char noprj[MAX_LINE_LENGTH];
245   char cf[MAX_LINE_LENGTH];
246   char plot2d[MAX_LINE_LENGTH];
247   char thrs[MAX_LINE_LENGTH];
248 } SpecialSet;
249 
250 typedef struct {
251   char name[MAX_LINE_LENGTH];
252   GLfloat r;
253   GLfloat g;
254   GLfloat b;
255 }Entitycol;
256 
257 typedef struct {
258   double r, g, b;
259 } Colours;
260 
261 typedef struct {
262   double w;                     /* scalierung in den Einheitswuerfel==max(xyzmax) */
263   double x,y,z;                 /* Mittelpunktsversatz der unscalierten Vektoren */
264   double smin, smax;            /* max,min Werte der Scala  */
265   int sminr, smaxr;             /* 1: max,min Werte der Scala liegen im Abstand eines Farbkaestchens  */
266   double xmax, xmin, ymax, ymin, zmax, zmin;    /* max==|max|Abstand eines Punktes vom Zentrum */
267   char format;                  /* representation, either f float, i int, e exp */
268   char lock;                    /* !=0: locks the scale, no recalc of scale->smin, >smax */
269 } Scale;
270 
271 typedef struct {
272     char n, e, p, l, c, s, b, L, S, se, sh;
273 } Lchar;
274 
275 typedef struct {
276   double r;
277   int i;
278 }Rsort;
279 
280 typedef struct {
281   char typ;
282   int indx;
283   int nr;
284 }CfdSurf;
285 
286 typedef struct {
287   char *name;
288   GLsizei width;
289   GLsizei height;
290   GLenum format;
291   GLenum type;
292   GLvoid *pixels;
293   GLfloat zoom[2];
294 }BGpicture;
295 
296 typedef struct {
297   int nr;
298   int n1, n2;
299   double val;
300 } Qcut_nodes;
301 
302 typedef struct {
303   double jbir, aspr, mca;
304 }Eqal;
305 
306 typedef struct {
307   int sets;          /* nr of sets */
308   int *type;         /* from "int transform()":   fehler: -1   tra: 1   rad: 2   rot: 3   sca: 4 */
309   int *anz_n;
310   double **axis;
311   int **mnod, **snod ;
312   double *fi;
313 }CopiedNodeSets;
314 
315 typedef struct {
316   int nds;
317   int *ds;
318 } DsSequence;
319 
320 typedef struct {
321   double p1[3];
322   double p2[3];
323   double p3[3];
324   double cg[3];
325   int fnr;
326 } Tri;
327 
328 //****************  NURBS Utilities   ****************//
329 typedef struct
330 {
331   double * cX;
332   double * cY;
333   double * cZ;
334   double * weights;
335   double * uKnt;
336   double * vKnt;
337   int nUPol, nVPol, nUKnt,nVKnt;
338   int uDeg,vDeg;
339 }BSplineSurface;
340 
341 typedef struct
342 {
343   double * cX;
344   double * cY;
345   double * cZ;
346   double * w;
347   double * k;
348   int nPol, nKnt;
349   int deg;
350 }BSplineCurve;
351 
352 void makeTorus(double *p1, double *p2, double r1, double r2, BSplineSurface * mySurf);
353 
354 void translateBSpline(double *p1, double *p2, BSplineCurve * myCurve ,BSplineSurface * mySurf);
355 
356 void rotateBSpline(double *p1, double *p2, BSplineCurve * myCurve ,BSplineSurface * mySurf);
357 
358 double wik(int k,int i,double *u,double x);
359 
360 double deBoor(int k, int i, double * u ,double x);
361 
362 void calculateBSpline(double * pnt, BSplineCurve * myCurve,double u);
363 
364 void piaFitting(double pCloud [][3],int nPnt,BSplineCurve * fitCurve, int deg, double tolerance);
365 
366 //**************  NURBS Utilities END  ***************//
367 
368 
369 int getElemFaceNodes(Elements *e_enqire, int el, int face, int *nface);
370 int getFaceNr(Elements *e_enqire, int elem_nr, int *nod);
371 int nurbl2seq(int nurlNr, const Nurbl *nurbl);
372 int getBias_fbd(int l, Lines *line);
373 double calcLineLength(int l);
374 double pre_length(char *setname);
375 double pre_area(char *setname);
376 double pre_volu(char *setname);
377 void pre_bia( char *record);
378 void pre_animate(char *string);
379 void pre_view(char *string);
380 void completeFacesByTolerance(int set, int setNrbuf, double qaddTol);
381 void splitBiasDiv(int *ptrdiv, double *ptrbias);
382 int improveBadTr3(char *setname);
383 void printHash();
384 int write2foam(char *setname, int strings, char **string, Summen *anz, Nodes *node, Faces *face, Elements *e_enqire, Sets *set, Datasets *lcase );
385 int write2dolfyn(char *setname, int strings, char **string, Summen *anz, Nodes *node, Faces *face, Elements *e_enqire, Sets *set);
386 int readFoam(char *datin, Summen *anz, Sets **sptr, Nodes **nptr, Elements **eptr, Datasets **lptr );
387 int readAnsysList(char *datin, Summen *anz, Sets **sptr, Nodes **nptr, Elements **eptr, Datasets **lptr );
388 
389 /* writebp.c */
390 int writebp(char *setname, Summen *anz, SumGeo *anzGeo, Points *pnt, Sets *set );
391 
392 /* writefbd.c */
393 int writefbd(char *setname, Summen *anz, SumGeo *anzGeo, Points *pnt, Lines *line, Lcmb *lcmb, Gsur *surf, Gbod *body, Nurbs *nurs, Sets *set, Shapes *shape, Values *value, char *format );
394 void writeInit(FILE *handle);
395 
396 /* XFunktions_mesa.h */
397 void calcOffset(void);
398 void getColormap(void);
399 void storeColors(int anz_col, int pix );
400 
401 /* copyEntity.h */
402 int createCenterpnt( char *pkt1, char *pkt2, char *buf, char *pkt3, char r );
403 int copy_set( int settrgt, char *trans, int setNr, int *dep_n, int *dep_e, int *dep_p, int *dep_l, int *dep_c, int *dep_s, int *dep_se, int *dep_sh, int *dep_S, int mastersetNr, int appendSetFlag  );
404 void pre_swep( char *record );
405 void pre_copy( char *record );
406 int  body_( char *name, char *corner );
407 
408 /* dataGeo.h */
409 void descalPoints ( int anz_p, Points *point, Scale *scale );
410 void scalPoints ( int anz_p,  Points *point, Scale *scale );
411 void descalSurfs ( int anz_s,  Gsur *surf, Scale *scale );
412 void scalSurfs ( int anz_s,  Gsur *surf, Scale *scale );
413 void scalNurbs ( Nurbs *nurbs,  int nr, int patch,  Scale *scale);
414 void descalNurbs ( Nurbs *nurbs,  int nr, int patch,  Scale *scale);
415 
416 /* dataMesh */
417 void descalNodes ( int anz_n, Nodes *node, Scale *scale );
418 void scalNodes ( int anz_n, Nodes *node, Scale *scale );
419 void calcDatasets( int num_olc, Summen *anz, Nodes *node, Datasets *lcase );
420 void transformDatasets( int lc, Summen *anz, Nodes *node, Datasets *lcase, char *method, char *axis  );
421 void calcAnimation( int anim_steps, double anim_faktor, int *anim_alfa, int halfperiode, int centerNode, Summen *anz, Nodes *node, Elements *e_enqire, Datasets *lcase, int lc, Scale *scale, char surfFlag, double *colNr, int steps );
422 void calcSequence( DsSequence dsSequence, double anim_faktor, int halfperiode, int centerNode, Summen *anz, Nodes *node, Elements *e_enqire, Datasets *lcase, Scale *scale, char surfFlag, double *colNr, int steps, int lcase_animList, int dispFlag );
423 void generateDataset( Summen *anz, Datasets **ptr_lcase, char *name, int ncomps, double value, char *dataset_text, int analysis_type, int step_number, char *analysis_name);
424 int defineEntity( Summen *anz, Datasets *lcase, Nodes *node, char *name, int ncomp, int ictype, int row, int column);
425 
426 /* defineEntity.h */
427 int hashAlias( SumAsci *sumAsci, char *name, int nr);
428 void operateAlias( char *name, char *type );
429 void delNod( int anzn, int *number );
430 int  nod( Summen *anz, Nodes **nptr, int flag, int nodnr, double x, double y, double z, int scalFlag );
431 int pre_nod( char *record);
432 void delElem( int anze, int *index );
433 int elem_define( Summen *anz, Elements **eptr, int elnr, int type, int *node, int setFlag, int eattr );
434 int hashPoint( SumAsci *sumAsci, char *name, int nr);
435 int hashLine( SumAsci *sumAsci, char *name, int nr);
436 int hashLcmb( SumAsci *sumAsci, char *name, int nr);
437 int hashSurf( SumAsci *sumAsci, char *name, int nr);
438 int hashBody( SumAsci *sumAsci, char *name, int nr);
439 int hashSet( SumAsci *sumAsci, char *name, int nr);
440 void pre_elem( char *record);
441 void delVal( int anzv, int *number );
442 int value_i( char *name, char *string );
443 int hashValue( SumAsci *sumAsci, char *name, int nr);
444 int pre_value( char *record);
445 void delPnt( int anz, int *number );
446 int  pnt( char *name, double x, double y, double z, int scalFlag );
447 int pre_pnt( char *record, int flag);
448 void delShape( int anz, int *number );
449 int  shape_refSurf( int nr, int surfNr);
450 int  shape_i( char *name, int type, int ip1, int ip2, int ip3, int ip4, int ip5, int ip6, int ip7 );
451 void pre_shape( char *record, int addFlag);
452 void delLine( int anz, int *number );
453 int line_i( char *name, int ip1, int ip2, int trk, int div, double bias, char type );
454 int  line_( char *name, char *p1, char *p2, char *trk, int div, double bias );
455 int pre_line( char *record, int addFlag);
456 void delLcmb( int anz, int *number );
457 int lcmb_i( char *name, int add, int anz_l, char  *ori, int *lin );
458 int  lcmb_( char *name, int add, int anz_l, char *ori, char *lin );
459 void pre_lcmb( char *record, int addFlag);
460 void bak_delSurf( int anz, int *number );
461 void delSurf( int anz, int *number );
462 int  surface_i( char *name, char ori, int blend, int anz_c, char *cori, int *edge, char *typ );
463 int  surface( char *name, char ori, char *blend, int anz_c, char *cori, char *corner );
464 void pre_gsur( char *record, int addFlag);
465 void pre_surf( char *record);
466 void bak_delBody( int anz, int *number );
467 void delBody( int anz, int *number );
468 int  gbod_i( char *name, int blend, int anz_c, char *cori, int *corner );
469 int  gbod( char *name, char *blend, int anz_c, char *cori, char *corner );
470 int  pre_gbod( char *record, int addFlag);
471 int  pre_body( char *record);
472 int  nurl( char *string, int addFlag );
473 void delNurs( int anz, int *number );
474 int hashNurs( SumAsci *sumAsci, char *name, int nr);
475 int  nurs( char *string, int addFlag );
476 
477 
478 /* dispLists.h */
479 void drawNodes_vector(  int lc, int ne, int *e, double v_factor, int num, int *name, Nodes *node );
480 void drawFaces_vector(  int lc, int ne, int *e, double v_factor, int num, int *name, Nodes *node, Faces *face );
481 void drawElements_vector( int lc, int ne, int *e, double v_factor, int num, int *name, Nodes *node, Elements *e_enqire );
482 void drawModelEdges( GLuint list_model_edges, int color, double width,
483                      int numEdges, Nodes *node );
484 void drawDispListEdges( GLuint list, int color, double width, char key, Nodes *node );
485 void drawFaces_edge( int num, int *name, Nodes *node, Faces *face, int col, char type );
486 void drawElem_edge( int num, int *name, Nodes *node, Elements *e_enqire, int col, char type );
487 void drawDispList( GLuint list, char key, Nodes *node, double *colNr );
488 
489 
490 
491 
492 
493 /*  extFunktions.h */
494 void help( void );
495 void resetScaleValues( Scale *scale);
496 void getScaleValues( int setNr, Sets *set, Points *point, Nodes *node, Scale *scale);
497 int compareInt(int *a, int *b);
498 int compareFloat(double *a, double *b);
499 int askGLError(char buffer[134]);
500 void defineColIndexes_light(void);
501 void defineColIndexes_load(void);
502 void defineColIndexes_set(void);
503 void defineColTextur_load(float alpha);
504 void zoom(double xcur0, double ycur0, double xcur1, double ycur1);
505 void qzoom(void);
506 void initModel(char *string);
507 void center(double x, double y, double z);
508 void qcenter(int x, int y);
509 void qsequence(int x, int y);
510 void qgraph(int x, int y);
511 void rot_u(double a);
512 void rot_r(double a);
513 void rot_c(double a);
514 void rot_x(double a);
515 void rot_y(double a);
516 void rot_z(double a);
517 int rot_norm(int nr);
518 void pre_menu( char *record);
519 void pre_rot( char *record);
520 int plotNode(int nr);
521 void transformResults( char *record);
522 int transform( char *record, int anz_n, Nodes *node );
523 int calcLineDiv(Lines *line, int nr, double gtol_cos_a, double lmax, double lmin);
524 int fillBlendedSurf(int nr);
525 void repNurl(int nr );
526 void repNurs(int nr );
527 void untrimNurs(int nr );
528 int repSurf(int nr, int renderFlag);
529 int repShape(int nr );
530 int repLine( int j );
531 void fixMidsideNodes( char *setname, char *parameter);
532 void posMidsideNodes(Nodes *node);
533 void adjustDrawNodes(int flag);
534 int write2stack(int n, char **parameter);
535 int enquireEntities(char *string);
536 
537 
538 /* cgx.h */
539 void nodalDataset( int cur_entity, int lc, Summen *anz, Scale *scale, Nodes *node
540 		   , Datasets *lcase, double *colNr, int scalaFlag );
541 void elementDataset( int auswahl, int lc, Summen *anz, Scale *scale, Datasets *lcase, int offset, int maxIndex, int steps );
542 void realloc_colNr(void);
543 void entryfunktion( int state );
544 void WindowState( int state );
545 void Mouse( int x, int y );
546 void MouseState( int button, int state, int x, int y );
547 void frame(void);
548 void frameSet(int setNrbuf);
549 void menu( int selection );
550 void createHardcopy( int selection, char *fileName );
551 void updateDispLists(void);
552 void set_cur_lc(int lc);
553 void ConfigureAndShowWindow_Light(void);
554 void ConfigureAndShowWindow_Load( void );
555 void ConfigureAndShowWindow_Sequence(int dispFlag );
556 void ConfigureAndShowWindow_Vector( void );
557 int minus( char *record );
558 int  plot( char *record );
559 int  plus( char *record );
560 void changeAnimation( int selection );
561 void newTimePerPeriode( int selection );
562 void tuneAnimation( int selection );
563 void stepsAnimation( int selection );
564 void idleFunction(void);
565 void redraw(void);
566 void selectEntity( int selection );
567 void createDatasetEntries(void);
568 void selectDataset( int selection );
569 void createNewMainMenu(void);
570 void recompileEntitiesInMenu(int pre_lc);
571 void addDispToCoordinates( Nodes *nodes);
572 void selectView( int selection );
573 int createUSERparam(char *key, char *text);
574 int createDSparam(int lc, char *key, char *text);
575 void selectData( char *record);
576 void specialKeyboard( int gkey, int x, int y );
577 void Keyboard( unsigned char gkey, int x, int y );
578 void moveModel(void);
579 void DrawGraficLoad( void );
580 void DrawGraficLight( void );
581 void DrawGraficAnimate( void );
582 void DrawGraficSequence( void );
583 void DrawGraficVector( void );
584 void DrawPickedItems(void);
585 void drawSets(int mode);
586 void DrawAxes();
587 void updCommandLine(void);
588 void DrawCommandLine(char *string, int curpos);
589 void iniDrawMenu(void);
590 void DrawMenuLoad( void );
591 void DrawMenuSequence( void );
592 void DrawMenuLight( void );
593 void DrawMenuAnimate( void );
594 void DrawMenuSet( void );
595 void setWindowSize(char *string);
596 void setWindowPos(char *string);
597 void reshape( int width, int height );
598 void initLight_rgb( void );
599 
600 /* iniMeshData.h     */
601 void vdsort ( int *a );
602 void vdsort2 ( int *a );
603 int compareElnum1 (int *a, int *b);
604 int selectDisplayFaces (Summen *anz, Elements *e_enqire, Faces **facePtr, Edges **edgePtr) ;
605 void makeSurfaces(void);
606 void iniMeshData( char *datin, char *format );
607 void iniElements(Summen *anz, Elements *elem, int ini_e_enqire);
608 
609 /* mergEntity.h */
610 int *findCloseEntity( char type, Nodes *node, Points *point, Rsort *rsort, int indx, int anz_n, double local_gtol);
611 int mergeNode( int *arrayIndx, int anz_n, int indx, int lock, int *nodes, int **nod2elem );
612 int mergePnt( Rsort *rsort, int anz_p, int indx, double local_gtol, int lock );
613 int mergeLine( int indx, int lock );
614 int mergeLcmb( int indx );
615 int mergeSurf( int indx, double local_gtol );
616 int compareRsort(Rsort *a, Rsort *b);
617 void pre_merge( char *record );
618 
619 /* orient.h */
620 int orientLcmb( int nr );
621 int orientSurf( int nr );
622 int ori7SidedBody( int nr, int **cp );
623 int ori6SidedBody( int nr, int **cp );
624 int ori5SidedBody( int nr, int **cp );
625 int orientBody( int nr );
626 void orientSet( char *record);
627 
628 /* pickFunktions.h    */
629 int hitAction( GLuint *name, char *type, int x, int y );
630 int hitUndo( GLuint *name, char *type, int x, int y );
631 int pickstack( GLuint name );
632 int processHits( GLint hits, GLuint *buffer, char *type, char *mode, int x, int y );
633 void defineDiv( unsigned char gkey, int x, int y );
634 void defineValue( unsigned char gkey, int x, int y );
635 void pick( unsigned char gkey, int x, int y );
636 void goPicking( int x, int y, char *type );
637 void drawListsPick(void);
638 void qali(void);
639 void qbia(void);
640 void qnod(void);
641 void qcnt(void);
642 void qcut(void);
643 void qnor(void);
644 void qdis(void);
645 void qmsh(void);
646 void qenq(void);
647 void qflp(void);
648 void qfil( char *record);
649 void qint(void);
650 void qdiv(void);
651 void qadd( char *record);
652 void qcyc( char *record);
653 void qdel( void );
654 void qrem( char *record);
655 void qpnt( char *record);
656 void qlin( char *record);
657 void qmov( char *record);
658 void qsur( char *record);
659 void qbod( char *record);
660 void qseq( char *record);
661 void qshp( char *record);
662 void qspl(void);
663 void qtxt(void);
664 void moveText(int n, int x, int y);
665 void moveNode(int n, int x, int y);
666 void movePoint(GLuint *p, int x, int y);
667 void moveSet(GLuint *p, int x, int y);
668 int createFillet(int lin, double filletRadius);
669 int createElem(int n);
670 int createText( int nodenr, int x, int y );
671 int createPoint( int x, int y );
672 int normalLine(char *name, int *pnts, double l);
673 int createLine( char *pnt, int flag );
674 int splitSurf( int lmaster, int smaster );
675 int combineSurfs( int setNr );
676 void convertLCMB( int lcmb );
677 void convertLine( int line, int pickbuf );
678 int intersect(int lin);
679 int qsplitLine( int lin, int x, int y  );
680 void pre_align( int nr, int flag );
681 void updLcase(int l, int setNr);
682 void pre_cut( int nr, int flag );
683 void moveModel(void);
684 void updateDispLists(void);
685 void flip( char *type, int indx);
686 
687 /* sendSet.h  */
688 void sendSurfNormalen( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, Datasets *lcase , Scale *scale );
689 void sendQuadLin( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire );
690 void sendPressure( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, char *val1, char *val2, char *val3, char *val4 );
691 void sendFilm( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, char *val1, char *val2, char *val3, char *val4, char *val5 );
692 void sendRadiate( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, char *val1, char *val2, char *val3, char *val4, char *val5 );
693 void sendCflux( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, char *value, char *val2 );
694 void sendDflux( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, char *val1, char *val2, char *val3, char type );
695 void sendSPC( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, char *value, char *val1, char *val2, char *val3 );
696 void sendSPCF( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, char *value, char *val1, char *val2, char *val3 );
697 void getNodeNormalen(int **sum_n, Nodes **norm, int setNr, Summen *anz, Faces *face);
698 void sendSliders( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, char *spcType );
699 void sendSlidersf( char *setname, char *format, char *spcType );
700 void sendNames( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire );
701 void sendSurfaces( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, char *val );
702 void sendForce( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, double *f );
703 
704 /* setFunktions.h  */
705 void iniSetFunktions(void);
706 void drawNodes_plot( int num, int *name, Nodes *node, int col, char type, int width);
707 void drawElements_plot( int num, int *name, Nodes *node, double *colNr, Elements *e_enqire, int col, char type, int width, int pickflag );
708 void drawElemNodes_plot( int num, int *name, Nodes *node, Elements *e_enqire, int col, char type );
709 void drawFaces_plot( int num, int *name, Nodes *node, double *colNr, Faces *face, int col, char type, int width, int pickflag );
710 void drawFaceNodes_plot( int num, int *name, Nodes *node, Faces *face, int col, char type );
711 void drawPoints_plot( int num, int *name, Points *point , int col, char type, int width);
712 void drawLines_plot( int num, int *name, Lines *line , Points *point, int col, char type, int width);
713 void drawSurfs_plot( int num, int *name, Gsur *surf, Lcmb *lcmb, Lines *line , Points *point, int col, char type);
714 void drawBodys_plot( int num, int *name, Gbod *body, Gsur *surf, Lcmb *lcmb, Lines *line , Points *point, int col, char type);
715 void drawNurl_plot( int num, int *name, int col, char type, int width, int pickflag);
716 void drawNurs_plot( int num, int *name, int col, char type, int pickflag);
717 void drawShapes_plot( int num, int *name, Shapes *shape, Points *point, int col, char type);
718 void setMaterial_rgb(int col, float alpha);
719 int generateTetFromBody(int nr, double teth, int eattr, int mesherFlag);
720 int generateTetFromSet(int setNr, double teth, int eattr, int mesherFlag);
721 int getSetNr(char *setname);
722 int getAliasNr(char *name);
723 int getNodNr(Summen *anz,Nodes *node,int nodnr );
724 int getElemNr (int elnr );
725 int getE_enqNr (int elnr );
726 int getValuNr(char *name);
727 int getPntNr(char *name);
728 int getShapeNr(char *name);
729 int getLineNr(char *name);
730 int getLcmbNr(char *name);
731 int getSurfNr(char *name);
732 int getBodyNr(char *name);
733 int getNurlNr(char *name);
734 int getNursNr(char *name);
735 int getMatNr(char *matname, int checkFlag);
736 int getAmplitudeNr(char *ampname, int checkFlag);
737 int getIndex(int **ipnt, int n, int x0 );
738 void delSet( char *setname);
739 int seto( char *setname );
740 void setc( char *setname );
741 int rnam( int setNr, char *new_name);
742 int pre_seta( char *setname, char *type, char *name);
743 int seta( int setNr, char *type, int number);
744 int setr( int setNr, char *type, int number);
745 int seqr( int setNr, char *type, int number);
746 int seti( int setNr, char *type, int sets, char dat[MAX_PARAM_PER_RECORD][MAX_LINE_LENGTH]);
747 int sete( int setNr, char *type, char *mode);
748 void pre_del( char *record);
749 void pre_move( char *record);
750 void pre_move_pfast( char *record);
751 void free_proj(double *nx, double *nrad, int *nmissed  );
752 int genSplitTrias(int trgtNr, Tri **ptr_tri, int flag );
753 void pre_split( char *record);
754 void pre_proj( char *record);
755 void pre_proc( char *record);
756 int splitLine(int l, int *l_nr, int ps_nr);
757 void  generateSetIndexes();
758 int prnt(char *record);
759 int  zap(char *record);
760 void grpa( int *elemGroup, int nr, int setNr );
761 void mata( int *elemMat, int nr, int setNr );
762 char getLetter(int i);
763 int getFamName( int n, char *c );
764 int getNewName( char *name, char *type );
765 void pre_movie(char *string);
766 int commandoInterpreter( char *type, char *string, int na, int nb, FILE *handle1, int addFlag, int *flag );
767 int getCommandLine(FILE *handle1, char **string1);
768 int readfbd( char *datin, int addFlag );
769 void readfrdfile( char *datin, char *setname );
770 int pre_read( char *record );
771 void createSuperSets(void);
772 void pre_elty( char *record );
773 void pre_eqal( char *record );
774 int pre_mesh( char *record );
775 int completeSet_Faces( int setNr, int setNrbuf, int *fUsed, int flag);
776 int completeSet_Mesh( int setNr, int setNrbuf, int *elUsed, int flag);
777 int completeSet_Lines( int setNr, int setNrbuf, int *elUsed, int flag);
778 int completeSet_frame( int setNr, char type);
779 int completeSet( char *setname, char *type );
780 int separateMeshes( char *setName, char *grpName);
781 int sendTriangles(  char *setname );
782 int write2netgenEdges(char *datout, Summen *anz, Nodes *node, Elements *elem, Datasets *lcase );
783 void pre_write( char *record );
784 void senddata( char *setname, char *format, Summen *anz, Nodes *node, Elements *e_enqire, Datasets *lcase , Scale *scale, int complete, char **val );
785 int calcCoefficientsTet(int nslav, int *emas, int n_closest_tets, Nodes *node, Tetraeder *tet, double cof[4], int extrapolflag);
786 int interpol3d(int set1, int set2, char *format, char *dataset, int extrapolflag);
787 void addCommandToInitFile(char *string);
788 
789 /* sendMpc.c */
790 void sendMpc( char *setname, char *format, char *rotation, double *vector  );
791 void cycmpc(int set1, int set2, char *format, char *value, char *corr);
792 void areampc(int set1, int set2, char *format, char *type, char *value, char *corr, int offset, Nodes *nptr, int extrapolflag, int scalFlag);
793 void gap(char *record);
794 int calcCoefficientsTri(  Nodes *node, int n0, CTri3 *ctri3, int  e, double *dist, double *c, double *n);
795 double check_tri3( double *pp, double *pt1, double *pt2, double *pt3, int tolflag );
796 void corrNode(  Nodes *node, CTri3 *ctri3, int  e, double g, int n, double *vNneu );
797 void createMPCs();
798 
799 /* contact.c */
800 typedef struct {
801   int nn, nf;
802   int *node;
803   int *face;
804 } Cluster;
805 
806 
807 
808 /* graph.c */
809 void param2D(char *par1, int *dsNr, char *par2 );
810 void plot2D(char *type, int setNr, int *dsNr, int entity );
811 int  graph( char *record);
812 
813 /* corrad.c */
814 void corrad( int setNr, double minradius);
815 
816 /* badelems.c */
817 int calcBadElements(char *record);
818 
819 /* write2tochnog.c */
820 int write2tochnog(char *datout, Summen *anz, Nodes *node, Elements *elem, Datasets *lcase );
821 
822 /* readccx.c */
823 void delSetx( char *setname);
824 int pre_setax( char *setname, char *type, char *name);
825 int readccx(char *datin, Summen *anz, Sets **sptr, Nodes **nptr, Elements **eptr, Datasets **lptr);
826 int getFilePointer( int filesopen, FILE **openfile, char *rec_str);
827 
828 
829 double repairNurbs( int nr, int deg, int dir);
830 int evalNurbsWithNormalVector( int nr, int sum_p, double *pnt_u, double *pnt_v, Points *pnt, Points *nv);
831 int evalNurbs( int nr, int sum_p, double *pnt_u, double *pnt_v, Points *pnt);
832 void cppfreearray(double *array);
833 int createBlendedNurbs(int nr);
834 void projSurfToNurbs( int nr, Gsur *surf, int snr, Nodes **node );
835 void projSetToNurbs( int nr, Sets *set, int setNr, Points *pnt);
836 double *projPntsToNurbs( int nr, int anz_p, Points *pnt);
837 double proj1PntToNurbs( int nr, double *pnt);
838 int trimNurbs( int nr, int patch, double);
839 
840 
841 /* fillBody2.c */
842 int evalBody2( int b_indx );
843 int fillBody2( int b_indx, int **pn_abc );
844 
845 
846 /* meshSet.c */
847 void copyThreadMesh(int nthreads);
848 void cornerNodes( int vmax, int umax, int j, int *n_uv );
849 int  newCornerPositions( int n, int u,int v,int umax, int vmax, double *lx,double *ly,double *lz,
850  double *x,double *y,double *z, int flag );
851 int  fillSurf(int j, int *n_uv, int umax, int vmax, double *x, double *y, double *z );
852 int  fillSurf2(int sur, int *div_l, int div_a, int div_b, int sa1, int sa2, int sb1, int sb2,
853  int *n_uv, int *umax, int *vmax, int *n_ba, int *amax, int *bmax, int *offs_sa1, int *offs_sa2,
854  double *x, double *y, double *z );
855 void edgeNodes( int vmax, int umax, int j, int *n_uv );
856 int  newEdgePositions( int n, int u,int v,int umax, int vmax, double *lx,double *ly,double *lz, double *x,double *y,double *z, int flag );
857 
858 double calcMeshDistance( int nr, int np, Points *ppre, int e, Points *pcg, int *tri);
859 int triSplitter( int nr, int *ptr_np,  Points **ptr_ppre, int *ptr_ne, int **ptr_tri, int **ptr_pntflag, int **edge_n2, int *pnt_indx, double **ptr_pntu, double **ptr_pntv, double max_ratio, double *tab_u, double *tab_lu, double *tab_bu, double *tab_v, double *tab_lv, double *tab_bv);
860 int checkMesh(int np, Points *ppre, int e, int *tri);
861 int meshPoints( int setNr, int renderFlag );
862 int straightNodes( int j, int k, int d, double *pn );
863 int arcNodes( int j, int k, int d, double *pn );
864 int splineNodes( int j, int k, int d, double *pn );
865 int nurlNodes( int j, int k, int d, double *pn );
866 int meshLines( int setNr, int renderFlag );
867 int newDivisions( int *div_l, int *div_a,int *div_b, int *sa1,int *sa2,int *sb1,int *sb2 );
868 int addTwoLines( int l1, char o1, char typ1, int l2, char o2, char typ2 );
869 int splitLineAtDivratio(int edge, int typ, double splitdiv, int *lnew, char  *typnew);
870 int mesh_tr3u(int nr, int renderFlag);
871 int merge_nlocal( Rsort *rsort, Nodes *nlocal, Elements *ctri3, int anz_e, int anz_n, int indx, int lock, double tol );
872 int deleteFreeEdges(Nodes *node, int *snods, int anz_n, Elements *elems, int anz_e );
873 int mesh_tr3g( int s );
874 int determineBestCorners( int s, int *cl);
875 int substituteSurf(int j);
876 int meshSurf( int anz_s, int sindx, int snr, int *mapsurf, int meshflag, int renderFlag);
877 int meshSurfs( int setNr, int renderFlag );
878 int evalBody( int b_indx, int *srefp );
879 int fillBody( int b_indx, int **pn_uvw);
880 int getSurfDivs( int b, int s, int *div_l );
881 int meshImprover( int *etyp, int *nodes, int *elements, int *n_indx, int *n_ori, double **n_coord, int **e_nod, int *n_type, int **n_corner, int **s_div );
882 int bodyFrom5Surfs( int *b);
883 int bodyFrom7Surfs( int *b);
884 int meshBodys( int setNr );
885 int meshSet(char *setname, int blockFlag, int lonly, int projFlag, int meshoptFlag_length, int meshoptFlag_angle );
886 
887 
888 /* surfMesh.h */
889 int surfMesh(int *imax, int *jmax, double *x, double *y, double *z);
890 
891 /*  bodyMesh2.h */
892 int bodyMesh2(int *wmax, int *vmax, int *umax, double *x, double *y, double * z);
893 
894 /*  improveMesh.o */
895 int smooth_length( double *co, int *nk, int *kon, int *ne, int *iptr1, int *iptr2, int *nside, int *ineino, int *nkind, int *neigh, int *ndiv, double *pneigh, int *maxsumdiv, int *etyp, int *nori);
896 int smooth_angle( double *co, int *nk, int *kon, int *ne, int *iptr1, int *iptr2, int *nside, int *ineino, int *nkind, int *neigh, int *ndiv, double *pneigh, int *maxsumdiv, int *etyp, int *nori);
897 int smooth_midnodes( double *co, int *nk, int *kon, int *ne, int *iptr1, int *iptr2, int *nside, int *ineino, int *nkind, int *neigh, int *ndiv, double *pneigh, int *maxsumdiv, int *etyp, int *nori);
898 
899 /* userFunction.c */
900 void userFunction(char *string, Summen   *sum, SumGeo   *sumGeo );
901 
902 /* calcWeight.c */
903 #define real double
904 #define integer int
905 
906 /* Subroutine */ int hexaeder_(integer *iel, integer *istat, real *x, real *y,
907 			       real *z__, real *v, real *xcg, real *ycg, real *zcg);
908 /* Subroutine */ int tetraeder_(integer *iel, integer *istat, real *x, real *y,
909 				real *z__, real *v, real *xcg, real *ycg, real *zcg);
910 
911 int calcBadElements(char *setname);
912 
913 /* contact.c */
914 int mergeCluster(Cluster *cluster, int c1, int c2);
915 int getMeshSections(int setNr, Summen *anz, Faces *face, Nodes *node);
916 int getDepNodes( Summen *anz, int set1, int set2, Elements *e_enqire, Faces *face, Nodes *node, double tol, int *sum_n, int **nodesets);
917 int getFacePair( Summen *anz, int set1, int set2, Elements *e_enqire, Faces *face, Nodes *node, double tol, int *mpcset, char *action);
918 
919 /* makeTriFromElems.c */
920 int makeTriFromElems(int setNr, int eset, int nmax, Sets *set, Elements *elem,  CTri3 **pctri3, int ***ptri3_index, int **pntri_nodes);
921 
922 /* others */
923 int readstep( char *datin, int addFlag );
924 void copyDatasetToNodes(Summen *anz, Nodes *node, Datasets *lcase, int lc, CopiedNodeSets copiedNodeSets);
925 int pre_readfrdblock( CopiedNodeSets *copiedNodeSets, int lc, Summen *anz, Nodes *node, Datasets *lcase );
926 int surfToNurs(int s);
927 int torusToNurs(int s, int flag);
928 int coneToNurs(int s, int flag);
929 int sphToNurs(int s, int flag);
930 int surfToShape(int s);
931 void uncut(int surfFlagBuffer);
932 int crecord( char *rec_str, char **dat);
933 void descalAll(void);
934 int getSetNrx(char *name);
935 int setax( int setNr, char *type, int number);
936 int pre_setax( char *string, char *type, char *name);
937 void pre_repSurf( int setNr);
938 void *thread_repSurf( void *vargp);
939 double calcGTOL(int setNr);
940 int fillNurbsSurf(int nurbsnr, int nr);
941 void moveLineEndPoint(int lineNr, int pntNr, double llength);
942