gCAD3D 2.40
ut_DB.h
Go to the documentation of this file.
1 /*
2 
3 2001-05-04 Interf DB_Get_GR_Obj geandert !
4 
5 BRAUCHT vorher include ut_geo.h !!!
6 
7 */
13 // #define DB_dump_dbo UT3D_dump_dbo
14 //
15 
16 // DB_isFree_<obj> test if obj is free
17 // if(DB_isFree_ModRef (&mdr_tab[i1])) printf("yes-its free \n");
18 // if(!(DB_isFree_ModRef (&mdr_tab[i1]))) printf("no, is in use\n");
19 #define DB_isFree_Var(obj) *(obj) == UT_VAL_MAX
20 #define DB_isFree_PT(obj) (obj)->x == UT_VAL_MAX
21 #define DB_isFree_LN(obj) (obj)->p1.x == UT_VAL_MAX
22 #define DB_isFree_VC(obj) (obj)->dx == UT_VAL_MAX
23 #define DB_isFree_CI(obj) (obj)->p1.x == UT_VAL_MAX
24 #define DB_isFree_PLN(obj) (obj)->p == UT_VAL_MAX
25 #define DB_isFree_CV(obj) (obj)->typ == Typ_Error
26 #define DB_isFree_GTxt(obj) (obj)->typ == Typ_Error
27 #define DB_isFree_Sur(obj) (obj)->typ == Typ_Error
28 #define DB_isFree_Sol(obj) (obj)->typ == Typ_Error
29 #define DB_isFree_Tra(obj) (obj)->typ == Typ_Error
30 #define DB_isFree_Act(obj) (obj)->typ == Typ_Error
31 #define DB_isFree_ModRef(obj) (obj)->po.x == UT_VAL_MAX
32 
33 #define DB_setFree_Var(dbi) vr_tab[dbi] = UT_VAL_MAX
34 #define DB_setFree_VC(dbi) vc_tab[dbi].dx = UT_VAL_MAX
35 #define DB_setFree_PT(dbi) pt_tab[dbi].x = UT_VAL_MAX
36 #define DB_setFree_LN(dbi) ln_tab[dbi].p1.x = UT_VAL_MAX
37 #define DB_setFree_CI(dbi) ci_tab[dbi].p1.x = UT_VAL_MAX
38 #define DB_setFree_PLN(dbi) pln_tab[dbi].p = UT_VAL_MAX
39 #define DB_setFree_CV(dbi) cv_tab[dbi].typ = Typ_Error
40 #define DB_setFree_SU(dbi) su_tab[dbi].typ = Typ_Error
41 #define DB_setFree_SO(dbi) so_tab[dbi].typ = Typ_Error
42 #define DB_setFree_TR(dbi) tra_tab[dbi].typ = Typ_Error
43 #define DB_setFree_TX(dbi) tx_tab[dbi].typ = Typ_Error
44 #define DB_setFree_MR(dbi) mdr_tab[dbi].po.x = UT_VAL_MAX
45 #define DB_setFree_Act(dbi) ac_tab[dbi].typ = Typ_Error
46 
47 #define DB_VCX_IND -1
48 #define DB_VCY_IND -2
49 #define DB_VCZ_IND -3
50 #define DB_VCIX_IND -4
51 #define DB_VCIY_IND -5
52 #define DB_VCIZ_IND -6
53 
54 #define DB_PLX_IND -1
55 #define DB_PLY_IND -2
56 #define DB_PLZ_IND -3
57 #define DB_PLIX_IND -4
58 #define DB_PLIY_IND -5
59 #define DB_PLIZ_IND -6
60 
61 
62 extern long APT_VR_SIZ;
63 extern long APT_PT_SIZ;
64 extern long APT_VC_SIZ;
65 extern long APT_LN_SIZ;
66 extern long APT_CI_SIZ;
67 extern long APT_PL_SIZ;
68 extern long APT_MR_SIZ;
69 // extern long APT_TL_SIZ;
70 extern long APT_CV_SIZ;
71 extern long APT_TX_SIZ;
72 extern long APT_SU_SIZ;
73 extern long APT_SO_SIZ;
74 extern long DB_CSIZ;
75 extern long DB_MNM_SIZ;
76 
77 
78 
79 
80 void DB_Init (int mode);
81 
82 // int DB_StoreAtt (long, GR_Att*);
83 int DB_Store_obj (long *dbi, int typ, void *data);
84 int DB_StoreTxt (char **pos, char *text);
85 long DB_StoreDim_ (long Ind, Dimen *dim1);
86 long DB_StoreDim3 (long Ind, Dim3 *dim3);
87 long DB_StoreGTxt (long Ind, GText *gtx1);
88 int DB_StoreSur (long *Ind, ObjGX *ox1);
89 int DB_StoreTra (long Ind, ObjGX *ox1);
90 long DB_StoreVar (long, double);
91 long DB_StoreVector (long, Vector*);
92 long DB_StorePoint (long, Point*);
93 long DB_StoreLine (long, Line*);
94 long DB_StoreCirc (long, Circ*);
95 long DB_StoreCvEll (long Ind, CurvPoly *cvell);
96 long DB_StoreCvPlg (long Ind, CurvPoly *cvplg, int iNew);
97 long DB_StoreCvBsp (long Ind, CurvBSpl *cvbsp);
98 long DB_StoreCurv (long, ObjGX*, int);
99 long DB_StoreRef (long, Plane*);
100 // void DB_StoreTool (long, BTool*);
101 int DB_StoreDummy (int typ, long Ind);
102 
103 long DB_Store_hdr_cv (ObjGX **cvo, long Ind);
104 long DB_Store_hdr_su (ObjGX **oxo, long Ind);
105 long DB_Store_hdr_nt (ObjGX **oxo, long Ind);
106 
107 void DB_Delete (int, long);
108 
109 long DB_FindVector (Vector* vc1);
110 
111 long DB_GetDynInd (int);
112 char** DB_GetTxt (long);
113 double DB_GetVar (long);
114 double* DB_get_Var (long Ind);
115 Vector DB_GetVector (long);
116 Point DB_GetPoint (long);
117 Line DB_GetLine (long);
118 Circ DB_GetCirc (long);
119 ObjGX* DB_GetCurv (long);
120 ObjGX* DB_GetSol (long);
121 ObjGX* DB_GetGTxt (long Ind);
122 // int DB_GetTool (BTool* tl1, long Ind);
123 ObjGX* DB_GetSur (long Ind, int mode);
124 ObjGX* DB_GetTra (long Ind);
125 
126 Point* DB_get_PT (long Ind);
127 Line* DB_get_LN (long Ind);
128 Vector* DB_get_VC (long Ind);
129 Circ* DB_get_CI (long Ind);
130 void* DB_get_CV (int *ityp, long Ind);
131 Plane* DB_get_PLN (long Ind);
132 ModelRef* DB_get_ModRef (long Ind);
133 ModelBas* DB_get_ModBas (int Ind);
135 
136 int DB_GetObjDat (void **pDat, int *oNr, int dbTyp, long dbInd);
137 int DB_GetObj (long, long*, int*);
138 ObjGX DB_GetObjGX (int typ, long apt_ind);
139 // int DB_GetObjUX (ObjUX *ox, int typ, long apt_ind);
140 int DB_GetConnObj (int*, long*, int*, long*, Point2 *);
141 long DB_GetObjTyp2Pt (int*, Point2 *, Point2 *);
142 void DB_GetRef (Plane*, long);
143 Activity* DB_get_Activ (long Ind);
144 
145 Plane* DB_DefRef (long Ind);
146 
147 void* DB_cPos ();
148 void* DB_cSav (long size, void *data);
149 void* DB_cGet (void *data, void *pos, long size);
150 
151 int DB_Lay (int, int, int);
152 int DB_Lay_add (int, int, char*, int*, double*);
153 
154 long DB_QueryPoint (Point*);
155 long DB_QueryLine (Point*);
156 long DB_QueryCirc (Point*);
157 long DB_QueryCurv (Point*);
158 int DB_QueryDynPoint (Point *, Point *);
159 
160 long DB_QueryPrvUsed (int typ, long istart);
161 long DB_QueryNxtUsed (int typ, long istart);
162 long DB_QueryNxtFree (int typ, int istart);
163 long DB_dbo_get_free (int typ);
164 
165 void DB_fix_tol (double);
166 int DB_2DTyp_3DTyp (int);
167 int DB_Typ_Char (char*);
168 // char* DB_Char_Typ (int typ);
169 
170 char* DB_mdlNam_iBas (int bmNr);
171 
172 void DB_Stat ();
173 int DB_save__ (char *mNam);
174 int DB_load__ (char *mNam);
175 long DB_dyn__ (int mode, int typ, long ind);
176 
177 
178 // EOF
int typ
Definition: xa_tra.c:151
ModelNode * DB_get_ModNod(int ind)
Definition: ut_DB.c:4058
int DB_Typ_Char(char *auxBuf)
Definition: ut_gtypes.c:1026
ObjGX * DB_GetSol(long Ind)
Definition: ut_DB.c:2821
long DB_StoreCurv(long Ind, ObjGX *cv1, int iNew)
Definition: ut_DB.c:6684
long DB_MNM_SIZ
Definition: ut_DB.c:419
Vector DB_GetVector(long Ind)
Definition: ut_DB.c:5813
Activity * DB_get_Activ(long Ind)
Definition: ut_DB.c:7124
3D-plane, Typ_PLN
Definition: ut_geo.h:637
ModelRef * DB_get_ModRef(long Ind)
Definition: ut_DB.c:3408
long DB_QueryPrvUsed(int typ, long istart)
Definition: ut_DB.c:7649
long DB_GetObjTyp2Pt(int *typ, Point2 *pt1, Point2 *pt2)
Definition: ut_DB.c:7334
3D-dimension; Typ_Dim3
Definition: ut_geo.h:903
3D-line, Typ_LN
Definition: ut_geo.h:367
char mode
Definition: xa_tra.c:152
int DB_Lay_add(int, int, char *, int *, double *)
ObjGX DB_GetObjGX(int typ, long apt_ind)
Definition: ut_DB.c:1446
3D-circle, Typ_CI
Definition: ut_geo.h:410
long DB_QueryCurv(Point *pt1)
Definition: ut_DB.c:8151
long DB_GetDynInd(int typ)
Definition: ut_DB.c:1922
long APT_PL_SIZ
Definition: ut_DB.c:410
Circ DB_GetCirc(long Ind)
Definition: ut_DB.c:6037
long DB_QueryNxtFree(int typ, int istart)
Definition: ut_DB.c:7833
Typ_ObjGX.
Definition: ut_geo.h:242
long DB_StoreCvEll(long Ind, CurvPoly *cvell)
Definition: ut_DB.c:6658
ObjGX * DB_GetSur(long Ind, int mode)
Definition: ut_DB.c:3298
Typ_Activ (&quot;I&quot;)
Definition: ut_geo.h:1013
dimension; Typ_Dimen
Definition: ut_geo.h:894
long DB_CSIZ
Definition: ut_DB.c:420
double DB_GetVar(long Ind)
Definition: ut_DB.c:2586
void DB_Init(int mode)
Definition: ut_DB.c:687
model reference; Typ_Model
Definition: ut_geo.h:835
long DB_StoreCirc(long Ind, Circ *ci1)
Definition: ut_DB.c:5984
Curve: polygon, Typ_CVPOL.
Definition: ut_geo.h:478
long APT_CV_SIZ
Definition: ut_DB.c:414
ObjGX * DB_GetCurv(long Ind)
Definition: ut_DB.c:6866
long DB_dbo_get_free(int typ)
Definition: ut_DB.c:7571
Point DB_GetPoint(long Ind)
Definition: ut_DB.c:5853
int DB_Store_obj(long *dbi, int typ, void *data)
int DB_Lay(int, int, int)
long DB_Store_hdr_cv(ObjGX **cvo, long Ind)
Definition: ut_DB.c:6326
grafic text; Typ_GTXT
Definition: ut_geo.h:748
long DB_QueryLine(Point *pt1)
Definition: ut_DB.c:8001
ObjGX * DB_GetTra(long Ind)
Definition: ut_DB.c:7076
long DB_StoreCvPlg(long Ind, CurvPoly *cvplg, int iNew)
Definition: ut_DB.c:6526
long DB_QueryNxtUsed(int typ, long istart)
Definition: ut_DB.c:7700
Plane * DB_DefRef(long Ind)
Definition: ut_DB.c:2692
void * DB_cPos()
Definition: ut_DB.c:6114
Curve: B-spline Typ_CVBSP.
Definition: ut_geo.h:513
void DB_Stat()
Definition: ut_DB.c:563
int DB_save__(char *mNam)
Definition: ut_DB.c:808
long DB_dyn__(int mode, int typ, long ind)
Definition: ut_DB.c:3546
double * DB_get_Var(long Ind)
Definition: ut_DB.c:2570
long APT_SU_SIZ
Definition: ut_DB.c:416
void DB_fix_tol(double scale)
Definition: ut_DB.c:520
long APT_VR_SIZ
Definition: ut_DB.c:405
long DB_QueryPoint(Point *pt1)
Definition: ut_DB.c:7968
int DB_GetObjDat(void **pDat, int *oNr, int dbTyp, long dbInd)
Definition: ut_DB.c:1644
int DB_StoreSur(long *IndIn, ObjGX *ox1)
Definition: ut_DB.c:3109
long APT_SO_SIZ
Definition: ut_DB.c:417
3D-point, Typ_PT
Definition: tessbug1.c:66
long APT_PT_SIZ
Definition: ut_DB.c:406
Typ_ModelNode.
Definition: ut_geo.h:845
void * DB_cGet(void *data, void *pos, long size)
Definition: ut_DB.c:6168
int DB_QueryDynPoint(Point *, Point *)
basic model description; Typ_SubModel
Definition: ut_geo.h:826
long DB_StoreLine(long Ind, Line *ln1)
Definition: ut_DB.c:5893
long APT_MR_SIZ
Definition: ut_DB.c:411
long DB_StoreVar(long Ind, double d1)
Definition: ut_DB.c:2526
3D-vector, Typ_VC
Definition: tst_glDrawElements1.c:58
Line * DB_get_LN(long Ind)
Definition: ut_DB.c:1266
long DB_StoreGTxt(long Ind, GText *gtx1)
Definition: ut_DB.c:2441
Point * DB_get_PT(long Ind)
Definition: ut_DB.c:1234
2D-point, Typ_PT2
Definition: ut_geo.h:190
char ** DB_GetTxt(long)
long DB_FindVector(Vector *vc1)
Definition: ut_DB.c:4402
ObjGX * DB_GetGTxt(long Ind)
Definition: ut_DB.c:2157
void * DB_cSav(long size, void *data)
Definition: ut_DB.c:6125
Line DB_GetLine(long Ind)
Definition: ut_DB.c:5948
int DB_StoreTxt(char **pos, char *text)
long APT_TX_SIZ
Definition: ut_DB.c:415
int DB_GetConnObj(int *typ1, long *ind1, int *typ2, long *ind2, Point2 *pt1)
Definition: ut_DB.c:7244
Circ * DB_get_CI(long Ind)
Definition: ut_DB.c:1319
int DB_GetObj(long, long *, int *)
void DB_GetRef(Plane *pl1, long Ind)
Definition: ut_DB.c:2757
long APT_VC_SIZ
Definition: ut_DB.c:407
int DB_StoreTra(long Ind, ObjGX *ox1)
Definition: ut_DB.c:7017
long DB_StoreRef(long Ind, Plane *pl1)
Definition: ut_DB.c:2655
ModelBas * DB_get_ModBas(int Ind)
Definition: ut_DB.c:4298
Plane * DB_get_PLN(long Ind)
Definition: ut_DB.c:1350
void DB_Delete(int typ, long ind)
Definition: ut_DB.c:8411
long DB_StorePoint(long Ind, Point *pt1)
Definition: ut_DB.c:5769
long APT_LN_SIZ
Definition: ut_DB.c:408
long APT_CI_SIZ
Definition: ut_DB.c:409
int DB_StoreDummy(int typ, long Ind)
Definition: ut_DB.c:2915
long DB_Store_hdr_su(ObjGX **oxo, long Ind)
Definition: ut_DB.c:6285
void * DB_get_CV(int *ityp, long Ind)
Definition: ut_DB.c:1406
Vector * DB_get_VC(long Ind)
Definition: ut_DB.c:1293
long DB_QueryCirc(Point *pt1)
Definition: ut_DB.c:8080
int ind
Definition: xa_tra.c:151
long DB_Store_hdr_nt(ObjGX **txo, long Ind)
Definition: ut_DB.c:6368
long DB_StoreDim3(long Ind, Dim3 *dim3)
Definition: ut_DB.c:2353
long DB_StoreCvBsp(long Ind, CurvBSpl *cvbsp)
Definition: ut_DB.c:6425
char * DB_mdlNam_iBas(int bmNr)
Definition: ut_DB.c:3805
long DB_StoreVector(long Ind, Vector *vc1)
Definition: ut_DB.c:4427
int DB_load__(char *mNam)
Definition: ut_DB.c:989
int DB_2DTyp_3DTyp(int typIn)
Definition: ut_gtypes.c:1061
long DB_StoreDim_(long Ind, Dimen *dim1)
Definition: ut_DB.c:2304