gCAD3D 2.35
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 // DB_isFree_<obj> test if obj is free
14 // if(DB_isFree_ModRef (&mdr_tab[i1])) printf("yes-its free \n");
15 // if(!(DB_isFree_ModRef (&mdr_tab[i1]))) printf("no, is in use\n");
16 #define DB_isFree_Var(obj) *(obj) == UT_VAL_MAX
17 #define DB_isFree_PT(obj) (obj)->x == UT_VAL_MAX
18 #define DB_isFree_LN(obj) (obj)->p1.x == UT_VAL_MAX
19 #define DB_isFree_VC(obj) (obj)->dx == UT_VAL_MAX
20 #define DB_isFree_CI(obj) (obj)->p1.x == UT_VAL_MAX
21 #define DB_isFree_PLN(obj) (obj)->p == UT_VAL_MAX
22 #define DB_isFree_CV(obj) (obj)->typ == Typ_Error
23 #define DB_isFree_GTxt(obj) (obj)->typ == Typ_Error
24 #define DB_isFree_Sur(obj) (obj)->typ == Typ_Error
25 #define DB_isFree_Sol(obj) (obj)->typ == Typ_Error
26 #define DB_isFree_Tra(obj) (obj)->typ == Typ_Error
27 #define DB_isFree_Act(obj) (obj)->typ == Typ_Error
28 #define DB_isFree_ModRef(obj) (obj)->po.x == UT_VAL_MAX
29 
30 #define DB_setFree_Var(dbi) vr_tab[dbi] = UT_VAL_MAX
31 #define DB_setFree_VC(dbi) vc_tab[dbi].dx = UT_VAL_MAX
32 #define DB_setFree_PT(dbi) pt_tab[dbi].x = UT_VAL_MAX
33 #define DB_setFree_LN(dbi) ln_tab[dbi].p1.x = UT_VAL_MAX
34 #define DB_setFree_CI(dbi) ci_tab[dbi].p1.x = UT_VAL_MAX
35 #define DB_setFree_PLN(dbi) pln_tab[dbi].p = UT_VAL_MAX
36 #define DB_setFree_CV(dbi) cv_tab[dbi].typ = Typ_Error
37 #define DB_setFree_SU(dbi) su_tab[dbi].typ = Typ_Error
38 #define DB_setFree_SO(dbi) so_tab[dbi].typ = Typ_Error
39 #define DB_setFree_TR(dbi) tra_tab[dbi].typ = Typ_Error
40 #define DB_setFree_TX(dbi) tx_tab[dbi].typ = Typ_Error
41 #define DB_setFree_MR(dbi) mdr_tab[dbi].po.x = UT_VAL_MAX
42 #define DB_setFree_Act(dbi) ac_tab[dbi].typ = Typ_Error
43 
44 #define DB_VCX_IND -1
45 #define DB_VCY_IND -2
46 #define DB_VCZ_IND -3
47 #define DB_VCIX_IND -4
48 #define DB_VCIY_IND -5
49 #define DB_VCIZ_IND -6
50 
51 #define DB_PLX_IND -1
52 #define DB_PLY_IND -2
53 #define DB_PLZ_IND -3
54 
55 
56 extern long APT_VR_SIZ;
57 extern long APT_PT_SIZ;
58 extern long APT_VC_SIZ;
59 extern long APT_LN_SIZ;
60 extern long APT_CI_SIZ;
61 extern long APT_PL_SIZ;
62 extern long APT_MR_SIZ;
63 // extern long APT_TL_SIZ;
64 extern long APT_CV_SIZ;
65 extern long APT_TX_SIZ;
66 extern long APT_SU_SIZ;
67 extern long APT_SO_SIZ;
68 extern long DB_CSIZ;
69 extern long DB_MNM_SIZ;
70 
71 
72 
73 
74 void DB_Init (int mode);
75 
76 // int DB_StoreAtt (long, GR_Att*);
77 int DB_Store_obj (long *dbi, int typ, void *data);
78 int DB_StoreTxt (char **pos, char *text);
79 long DB_StoreDim_ (long Ind, Dimen *dim1);
80 long DB_StoreDim3 (long Ind, Dim3 *dim3);
81 long DB_StoreGTxt (long Ind, GText *gtx1);
82 int DB_StoreSur (long *Ind, ObjGX *ox1);
83 int DB_StoreTra (long Ind, ObjGX *ox1);
84 long DB_StoreVar (long, double);
85 long DB_StoreVector (long, Vector*);
86 long DB_StorePoint (long, Point*);
87 long DB_StoreLine (long, Line*);
88 long DB_StoreCirc (long, Circ*);
89 long DB_StoreCvEll (long Ind, CurvPoly *cvell);
90 long DB_StoreCvPlg (long Ind, CurvPoly *cvplg, int iNew);
91 long DB_StoreCvBsp (long Ind, CurvBSpl *cvbsp);
92 long DB_StoreCurv (long, ObjGX*, int);
93 long DB_StoreRef (long, Plane*);
94 // void DB_StoreTool (long, BTool*);
95 int DB_StoreDummy (int typ, long Ind);
96 
97 long DB_Store_hdr_cv (ObjGX **cvo, long Ind);
98 long DB_Store_hdr_su (ObjGX **oxo, long Ind);
99 long DB_Store_hdr_nt (ObjGX **oxo, long Ind);
100 
101 void DB_Delete (int, long);
102 
103 long DB_FindVector (Vector* vc1);
104 
105 long DB_GetDynInd (int);
106 char** DB_GetTxt (long);
107 double DB_GetVar (long);
108 double* DB_get_Var (long Ind);
109 Vector DB_GetVector (long);
110 Point DB_GetPoint (long);
111 Line DB_GetLine (long);
112 Circ DB_GetCirc (long);
113 ObjGX* DB_GetCurv (long);
114 ObjGX* DB_GetSol (long);
115 ObjGX* DB_GetGTxt (long Ind);
116 // int DB_GetTool (BTool* tl1, long Ind);
117 ObjGX* DB_GetSur (long Ind, int mode);
118 ObjGX* DB_GetTra (long Ind);
119 
120 Point* DB_get_PT (long Ind);
121 Line* DB_get_LN (long Ind);
122 Vector* DB_get_VC (long Ind);
123 Circ* DB_get_CI (long Ind);
124 void* DB_get_CV (int *ityp, long Ind);
125 Plane* DB_get_PLN (long Ind);
126 ModelRef* DB_get_ModRef (long Ind);
127 ModelBas* DB_get_ModBas (int Ind);
129 
130 int DB_GetObjDat (void **pDat, int *oNr, int dbTyp, long dbInd);
131 int DB_GetObj (long, long*, int*);
132 ObjGX DB_GetObjGX (int typ, long apt_ind);
133 // int DB_GetObjUX (ObjUX *ox, int typ, long apt_ind);
134 int DB_GetConnObj (int*, long*, int*, long*, Point2 *);
135 long DB_GetObjTyp2Pt (int*, Point2 *, Point2 *);
136 void DB_GetRef (Plane*, long);
137 Activity* DB_get_Activ (long Ind);
138 
139 Plane* DB_DefRef (long Ind);
140 
141 void* DB_cPos ();
142 void* DB_cSav (long size, void *data);
143 void* DB_cGet (void *data, void *pos, long size);
144 
145 int DB_Lay (int, int, int);
146 int DB_Lay_add (int, int, char*, int*, double*);
147 
148 long DB_QueryPoint (Point*);
149 long DB_QueryLine (Point*);
150 long DB_QueryCirc (Point*);
151 long DB_QueryCurv (Point*);
152 int DB_QueryDynPoint (Point *, Point *);
153 
154 long DB_QueryPrvUsed (int typ, long istart);
155 long DB_QueryNxtUsed (int typ, long istart);
156 long DB_QueryNxtFree (int typ, int istart);
157 long DB_dbo_get_free (int typ);
158 
159 void DB_fix_tol (double);
160 int DB_2DTyp_3DTyp (int);
161 int DB_Typ_Char (char*);
162 // char* DB_Char_Typ (int typ);
163 
164 char* DB_mdlNam_iBas (int bmNr);
165 
166 void DB_Stat ();
167 int DB_save__ (char *mNam);
168 int DB_load__ (char *mNam);
169 long DB_dyn__ (int mode, int typ, long ind);
170 
171 
172 // EOF
int typ
Definition: xa_tra.c:151
long DB_MNM_SIZ
Definition: ut_DB.c:418
long DB_StoreDim_(long Ind, Dimen *dim1)
Definition: ut_DB.c:2302
ModelNode * DB_get_ModNod(int ind)
Definition: ut_DB.c:4035
long DB_StoreCvBsp(long Ind, CurvBSpl *cvbsp)
Definition: ut_DB.c:6402
long DB_StoreLine(long, Line *)
Definition: ut_DB.c:5870
3D-plane, Typ_PLN
Definition: ut_geo.h:631
void DB_fix_tol(double)
Definition: ut_DB.c:519
long DB_StoreCvEll(long Ind, CurvPoly *cvell)
Definition: ut_DB.c:6635
ObjGX * DB_GetCurv(long)
Definition: ut_DB.c:6843
double DB_GetVar(long)
Definition: ut_DB.c:2584
3D-dimension; Typ_Dim3
Definition: ut_geo.h:897
3D-line, Typ_LN
Definition: ut_geo.h:361
int DB_load__(char *mNam)
Definition: ut_DB.c:988
char mode
Definition: xa_tra.c:152
int DB_Lay_add(int, int, char *, int *, double *)
long DB_GetDynInd(int)
Definition: ut_DB.c:1920
Vector DB_GetVector(long)
Definition: ut_DB.c:5790
Activity * DB_get_Activ(long Ind)
Definition: ut_DB.c:7101
3D-circle, Typ_CI
Definition: ut_geo.h:404
long DB_CSIZ
Definition: ut_DB.c:419
Line DB_GetLine(long)
Definition: ut_DB.c:5925
Typ_ObjGX.
Definition: ut_geo.h:240
void DB_GetRef(Plane *, long)
Definition: ut_DB.c:2738
Typ_Activ ("I")
Definition: ut_geo.h:1007
long DB_StoreRef(long, Plane *)
Definition: ut_DB.c:2653
dimension; Typ_Dimen
Definition: ut_geo.h:888
long DB_QueryPrvUsed(int typ, long istart)
Definition: ut_DB.c:7626
ModelRef * DB_get_ModRef(long Ind)
Definition: ut_DB.c:3387
model reference; Typ_Model
Definition: ut_geo.h:829
long DB_QueryPoint(Point *)
Definition: ut_DB.c:7945
void DB_Init(int mode)
Definition: ut_DB.c:686
ObjGX DB_GetObjGX(int typ, long apt_ind)
Definition: ut_DB.c:1446
long DB_QueryNxtFree(int typ, int istart)
Definition: ut_DB.c:7810
long DB_Store_hdr_nt(ObjGX **oxo, long Ind)
Definition: ut_DB.c:6345
Curve: polygon, Typ_CVPOL.
Definition: ut_geo.h:472
long DB_StoreCvPlg(long Ind, CurvPoly *cvplg, int iNew)
Definition: ut_DB.c:6503
Plane * DB_DefRef(long Ind)
Definition: ut_DB.c:2690
int DB_Store_obj(long *dbi, int typ, void *data)
ObjGX * DB_GetSur(long Ind, int mode)
Definition: ut_DB.c:3277
void DB_Stat()
Definition: ut_DB.c:562
double * DB_get_Var(long Ind)
Definition: ut_DB.c:2568
long DB_Store_hdr_cv(ObjGX **cvo, long Ind)
Definition: ut_DB.c:6303
long APT_PL_SIZ
Definition: ut_DB.c:409
int DB_Lay(int, int, int)
ObjGX * DB_GetSol(long)
Definition: ut_DB.c:2802
long DB_dbo_get_free(int typ)
Definition: ut_DB.c:7548
void * DB_cPos()
Definition: ut_DB.c:6091
long DB_StorePoint(long, Point *)
Definition: ut_DB.c:5746
grafic text; Typ_GTXT
Definition: ut_geo.h:742
long DB_QueryCirc(Point *)
Definition: ut_DB.c:8057
int DB_GetConnObj(int *, long *, int *, long *, Point2 *)
Definition: ut_DB.c:7221
long DB_GetObjTyp2Pt(int *, Point2 *, Point2 *)
Definition: ut_DB.c:7311
Curve: B-spline Typ_CVBSP.
Definition: ut_geo.h:507
long APT_CV_SIZ
Definition: ut_DB.c:413
long DB_QueryNxtUsed(int typ, long istart)
Definition: ut_DB.c:7677
long APT_PT_SIZ
Definition: ut_DB.c:405
void * DB_cGet(void *data, void *pos, long size)
Definition: ut_DB.c:6145
long DB_StoreCirc(long, Circ *)
Definition: ut_DB.c:5961
long DB_StoreCurv(long, ObjGX *, int)
Definition: ut_DB.c:6661
long DB_StoreGTxt(long Ind, GText *gtx1)
Definition: ut_DB.c:2439
Point * DB_get_PT(long Ind)
Definition: ut_DB.c:1234
3D-point, Typ_PT
Definition: ut_geo.h:195
long APT_SU_SIZ
Definition: ut_DB.c:415
Typ_ModelNode.
Definition: ut_geo.h:839
long APT_SO_SIZ
Definition: ut_DB.c:416
ObjGX * DB_GetTra(long Ind)
Definition: ut_DB.c:7053
Line * DB_get_LN(long Ind)
Definition: ut_DB.c:1266
int DB_QueryDynPoint(Point *, Point *)
basic model description; Typ_SubModel
Definition: ut_geo.h:820
int DB_GetObjDat(void **pDat, int *oNr, int dbTyp, long dbInd)
Definition: ut_DB.c:1642
3D-vector, Typ_VC
Definition: ut_geo.h:209
int DB_save__(char *mNam)
Definition: ut_DB.c:807
long DB_dyn__(int mode, int typ, long ind)
Definition: ut_DB.c:3525
long DB_StoreVector(long, Vector *)
Definition: ut_DB.c:4404
void DB_Delete(int, long)
Definition: ut_DB.c:8388
Circ * DB_get_CI(long Ind)
Definition: ut_DB.c:1319
long APT_VR_SIZ
Definition: ut_DB.c:404
Circ DB_GetCirc(long)
Definition: ut_DB.c:6014
int DB_StoreSur(long *Ind, ObjGX *ox1)
Definition: ut_DB.c:3090
2D-point, Typ_PT2
Definition: ut_geo.h:189
long DB_QueryCurv(Point *)
Definition: ut_DB.c:8128
char ** DB_GetTxt(long)
int DB_Typ_Char(char *)
Definition: ut_gtypes.c:1021
int DB_2DTyp_3DTyp(int)
Definition: ut_gtypes.c:1052
long DB_FindVector(Vector *vc1)
Definition: ut_DB.c:4379
void * DB_cSav(long size, void *data)
Definition: ut_DB.c:6102
ObjGX * DB_GetGTxt(long Ind)
Definition: ut_DB.c:2155
long APT_CI_SIZ
Definition: ut_DB.c:408
int DB_StoreDummy(int typ, long Ind)
Definition: ut_DB.c:2896
long DB_Store_hdr_su(ObjGX **oxo, long Ind)
Definition: ut_DB.c:6262
int DB_StoreTxt(char **pos, char *text)
int DB_GetObj(long, long *, int *)
long APT_VC_SIZ
Definition: ut_DB.c:406
Point DB_GetPoint(long)
Definition: ut_DB.c:5830
long APT_MR_SIZ
Definition: ut_DB.c:410
void * DB_get_CV(int *ityp, long Ind)
Definition: ut_DB.c:1406
Plane * DB_get_PLN(long Ind)
Definition: ut_DB.c:1350
long DB_StoreVar(long, double)
Definition: ut_DB.c:2524
long APT_TX_SIZ
Definition: ut_DB.c:414
ModelBas * DB_get_ModBas(int Ind)
Definition: ut_DB.c:4275
long DB_StoreDim3(long Ind, Dim3 *dim3)
Definition: ut_DB.c:2351
long DB_QueryLine(Point *)
Definition: ut_DB.c:7978
long APT_LN_SIZ
Definition: ut_DB.c:407
int ind
Definition: xa_tra.c:151
Vector * DB_get_VC(long Ind)
Definition: ut_DB.c:1293
char * DB_mdlNam_iBas(int bmNr)
Definition: ut_DB.c:3782
int DB_StoreTra(long Ind, ObjGX *ox1)
Definition: ut_DB.c:6994