00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef __curvgeom_h
00043 #define __curvgeom_h
00044
00045 #ifndef EXTERN
00046 #ifdef _DVS_
00047 #define EXTERN
00048 #else
00049 #define EXTERN extern
00050 #endif
00051 #endif
00052
00053 #include <stdio.h>
00054
00055 #ifndef __double_real
00056 #define __double_real
00057 typedef double real;
00058 #endif
00059 #ifndef __double_vector
00060 #define __double_vector
00061 typedef real vector[4];
00062 #endif
00063 #ifndef __int_id
00064 #define __int_id
00065 typedef int Id;
00066 #endif
00067 #ifndef __double_matrix
00068 #define __double_matrix
00069 typedef real matrix[4][4];
00070 #endif
00071 #ifndef __struct_solid
00072 #define __struct_solid
00073 typedef struct solid STYPE;
00074 #endif
00075 #ifndef __struct_halfedge
00076 #define __struct_halfedge
00077 typedef struct halfedge HTYPE;
00078 #endif
00079 #ifndef __struct_eulerop
00080 #define __struct_eulerop
00081 typedef struct eulerop EulerOp;
00082 #endif
00083
00084 #ifdef __curved_env__
00085 typedef enum cname CNAME;
00086 typedef struct lpoint LPOINT;
00087 #ifndef __CURVE
00088 #define __CURVE
00089 typedef struct curve CURVE;
00090 #endif
00091
00092 enum cname
00093 {
00094 LINE1,
00095 CURVE1,
00096 };
00097
00098 struct lpoint
00099 {
00100 vector pnt;
00101 LPOINT *pnxt;
00102 };
00103
00104 struct curve
00105 {
00106 Id tagno;
00107 CNAME tag_type;
00108 short times_used;
00109 CURVE *nextc;
00110 CURVE *prevc;
00111 LPOINT *lpnt;
00112 };
00113
00114 EXTERN Id maxct;
00115 #define MAXMEMO 10
00116 EXTERN HPTYPE he_store[MAXMEMO];
00117 EXTERN matrix Mc;
00118
00119
00120
00121 void MSD_execAddPointToCurve(void);
00122 int MSD_highAddPointToCurve(Id s, Id tag, real x, real y, real z);
00123 LPOINT *MSD_lowAddPointToCurve(SPTYPE s, CURVE *curv, real x, real y, real z);
00124 int MSD_execStructADDLPOINT(EulerOp *op);
00125 void MSD_printStructADDLPOINT(FILE *f, EulerOp *op);
00126 int MSD_readStructADDLPOINT(FILE *f, EulerOp *op);
00127 int MSD_modifyStructADDLPOINT(EulerOp *op);
00128
00129
00130 void MSD_execRemovePointFromCurve(void);
00131 int MSD_highRemovePointFromCurve(Id sn, Id tag);
00132 LPOINT *MSD_lowRemovePointFromCurve(SPTYPE s, CURVE *curv);
00133 int MSD_execStructREMLPOINT(EulerOp *op);
00134 void MSD_printStructREMLPOINT(FILE *f, EulerOp *op);
00135 int MSD_readStructREMLPOINT(FILE *f, EulerOp *op);
00136 int MSD_modifyStructREMLPOINT(EulerOp *op);
00137
00138
00139 void hget_he(void);
00140 int get_he(char *sn, Id v1, Id v2, Id fn, int memohe);
00141 void lget_he(HPTYPE he, int memohe);
00142 void hget_mate(void);
00143 int get_mate(int memohe, int memomate);
00144 void lget_mate(HPTYPE he, int memomate);
00145 void hget_next(void);
00146 int get_next(int memohe, int memonext);
00147 void lget_next(HPTYPE he, int memonext);
00148 void hget_prev(void);
00149 int get_prev(int memohe, int memoprev);
00150 void lget_prev(HPTYPE he, int memoprev);
00151 void hcmef(void);
00152 int cmef(int memohe1, int memohe2);
00153 void hcmev(void);
00154 int cmev(int memohe1, int memohe2, real x, real y, real z);
00155 void cnewloc(void);
00156 int ccnewloc(int memohe, real x, real y, real z);
00157 void hshow_memo(void);
00158 void lshow_memo(int memohe);
00159 void cputctag(void);
00160 void ceval_polyline(void);
00161
00162
00163 void MSD_lowCurveDeleteElement(CURVE *curv, SPTYPE s);
00164
00165
00166 void MSD_execEvaluateCurveLine(void);
00167 int MSD_highEvaluateCurveLine(Id sn, Id fn, Id v1, Id v2, int nsegm);
00168 void MSD_lowEvaluateCurveLine(HPTYPE he, int nsegm);
00169
00170
00171 void MSD_execEvaluateCurvePolyline(void);
00172 int MSD_highEvaluateCurvePolyline(Id sn, Id fn, Id v1, Id v2, int nsegm);
00173 void MSD_lowEvaluateCurvePolyline(HPTYPE he, int nsegm);
00174
00175
00176 CURVE *MSD_getCurve(SPTYPE s, Id tag);
00177
00178
00179 void MSD_execKillCurveLine(void);
00180 int MSD_highKillCurveLine(Id sn, Id tag);
00181 int MSD_lowKillCurveLine(SPTYPE s, CURVE *l);
00182 int MSD_execStructKILLLINE(EulerOp *op);
00183 void MSD_printStructKILLLINE(FILE *f, EulerOp *op);
00184 int MSD_readStructKILLLINE(FILE *f, EulerOp *op);
00185 int MSD_modifyStructKILLLINE(EulerOp *op);
00186
00187
00188 void MSD_execKillCurvePolyline(void);
00189 int MSD_highKillCurvePolyline(Id sn, Id tag);
00190 int MSD_lowKillCurvePolyline(SPTYPE s, CURVE *c);
00191 int MSD_execStructKILLPOLY(EulerOp *op);
00192 void MSD_printStructKILLPOLY(FILE *f, EulerOp *op);
00193 int MSD_readStructKILLPOLY(FILE *f, EulerOp *op);
00194 int MSD_modifyStructKILLPOLY(EulerOp *op);
00195
00196
00197 void MSD_execNewCurveLine(void);
00198 int MSD_highNewCurveLine(Id sn, Id tag);
00199 CURVE *MSD_lowNewCurveLine(SPTYPE s, Id tag);
00200 int MSD_execStructNEWLINE(EulerOp *op);
00201 void MSD_printStructNEWLINE(FILE *f, EulerOp *op);
00202 int MSD_readStructNEWLINE(FILE *f, EulerOp *op);
00203 int MSD_modifyStructNEWLINE(EulerOp *op);
00204
00205
00206 CURVE *MSD_lowNewCurve(CNAME what, SPTYPE s);
00207
00208
00209 void MSD_execNewCurvePolyline(void);
00210 int MSD_highNewCurvePolylineWithPoint(Id sn, Id tag, real x, real y, real z);
00211 int MSD_highNewCurvePolyline(Id sn, Id tag);
00212 CURVE *MSD_lowNewCurvePolyline(SPTYPE s, Id tag);
00213 int MSD_execStructNEWPOLY(EulerOp *op);
00214 void MSD_printStructNEWPOLY(FILE *f, EulerOp *op);
00215 int MSD_readStructNEWPOLY(FILE *f, EulerOp *op);
00216 int MSD_modifyStructNEWPOLY(EulerOp *op);
00217
00218
00219 void MSD_execGetNumberPoints(void);
00220 int MSD_highGetNumberPoints(Id sn, Id tag);
00221 int MSD_lowGetNumberPoints(LPOINT *plist);
00222
00223
00224 void MSD_execSetCurveAtributeToEdge(void);
00225 int MSD_highSetCurveAtributeToEdge(Id sn, Id tag, Id fn, Id v1, Id v2);
00226 int MSD_lowSetCurveAtributeToEdge(HPTYPE he, CURVE *tag);
00227 int MSD_highSetCurveAtribute(Id sn, Id tag, Id fn, Id v1, Id v2);
00228 int MSD_lowSetCurveAtribute(HPTYPE he, CURVE *tag);
00229 int MSD_execStructSETCTAG(EulerOp *op);
00230 void MSD_printStructSETCTAG(FILE *f, EulerOp *op);
00231 int MSD_readStructSETCTAG(FILE *f, EulerOp *op);
00232 int MSD_modifyStructSETCTAG(EulerOp *op);
00233
00234 #endif
00235 #endif