gCAD3D 2.35
NC_Main.c File Reference

CommandInterpreter - main. More...

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "../gui/gui_types.h"
#include "../ut/ut_geo.h"
#include "../ut/ut_gtypes.h"
#include "../ut/gr_types.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_TX.h"
#include "../ut/ut_obj.h"
#include "../ut/ut_txfil.h"
#include "../ut/ut_os.h"
#include "../gr/ut_GL.h"
#include "../db/ut_DB.h"
#include "../gr/ut_gr.h"
#include "../gr/ut_DL.h"
#include "../xa/xa_ed.h"
#include "../xa/xa_edi__.h"
#include "../xa/xa_ga.h"
#include "../xa/xa_mem.h"
#include "../xa/xa.h"
#include "../xa/xa_sele.h"
#include "../xa/xa_ato.h"
#include "../ci/NC_Main.h"
#include "../ci/NC_apt.h"
#include "../xa/xa_uid.h"
#include "../ut/func_types.h"

Macros

#define PrgMod_normal   0
 
#define PrgMod_continue_if   1
 
#define PrgMod_skip_until_label   2
 
#define PrgMod_skip_until_macend   3
 
#define PrgMod_skip_until_mac   4
 
#define PrgMod_skip_until_line   5
 
#define PrgMod_skip_until_file   6
 
#define PrgMod_continue_file   7
 
#define PrgMod_continue_mac   8
 
#define UP_level_max   16
 
#define oaSIZ   10
 
#define WTAB_SIZ   10
 

Enumerations

enum  Typ_TACT {
  TAC_PRI, TAC_DRAW, TAC_STAT, TAC_MODE,
  TAC_SSTYLS, TAC_SHOW, TAC_HIDE, TAC_VIEW,
  TAC_CONST_PL, TAC_ZOOMALL, TAC_MODBOX, TAC_MODVAL,
  TAC_MODSIZ, TAC_DEFTX, TAC_DEFCOL, TAC_ATTL,
  TAC_ATTS, TAC_PROCESS, TAC_LDMOD, TAC_EXECM,
  TAC_DIM, TAC_HILI, TAC_LAY, TAC_DUMP,
  TAC_NOP
}
 
enum  Typ_TPCT {
  TPC_JUMP, TPC_MAC, TPC_GEO, TPC_END,
  TPC_IF, TPC_CALL
}
 

Functions

int AP_mdGet (int *lnr)
 
int WC_get_obj_stat ()
 
int WC_set_obj_stat (int stat)
 
void WC_Init_all (int mode)
 
int WC_Init_Modsiz (double newssiz)
 
void WC_Init_Tol ()
 
void WC_Init ()
 
void APT_Init ()
 
int APT_reset_view_stat ()
 
int APT_get_view_stat ()
 
int APT_set_view_stat ()
 
void UCS_Reset ()
 
void APT_Reset ()
 
void WC_EOF ()
 
void WC_setDisp3D (int mode)
 
void NC_set_actPos (Point2 *posU)
 
int NC_getGrafAtt ()
 
void NC_setGrafAtt (int AttInd)
 
int NC_setModSiz (double modSiz)
 
int NC_setRefsys (int RefInd)
 
int WC_actPos_disp ()
 
int WC_Work__ (int lNr, char *cbuf)
 
int WC_Work_upd (int lNr, char *cbuf)
 
int WC_Work1 (int lNr, char *cbuf)
 
int APT_do_auxCmd (int *i_typ, double *i_tab)
 
int APT_work_def (char *cmdIn, char **data)
 
int APT_work_parent_hide (int cldTyp, long cldDbi, int *iPar)
 
int APT_Draw__ (int iAtt, int typ, long ind)
 
int APT_eval_if (int *aus_typ, double *aus_tab)
 
int APT_work_TPC_IF (char **data)
 
int APT_work_PrgCodTab (int icod, char **data)
 
int APT_work_AppCodTab (char *cmd, char **data)
 
int APT_work_LAY (int aus_anz, int aus_typ[], double aus_tab[], char **data)
 
int APT_work_MODE (char **data)
 
int APT_work_TPC_CALL (char **data)
 
int APT_work_ATTS (int aus_anz, int aus_typ[], double aus_tab[])
 
int APT_work_ATTL (int aus_anz, int aus_typ[], double aus_tab[])
 
int APT_work_SHOW (int aus_anz, int aus_typ[], double aus_tab[])
 
int APT_work_VIEW (int aus_anz, int aus_typ[], double aus_tab[])
 
int APT_line_set (int i1)
 
int APT_UP_get ()
 
int APT_UP_up (char src)
 
int APT_UP_down ()
 
double APT_transl_rad (double rad_in)
 
int APT_transform (Point *pt1)
 
Point2 APT_transl2 (Point2 *ptin)
 
Point2 APT_rotate3 (Point *ptin)
 
int APT_DrawDim3 (int typ, long apt_ind, ObjGX *dim3)
 
void APT_DrawDimen (int typ, long apt_ind, ObjGX *dim1)
 
void APT_DrawTxtG (int iAtt, long apt_ind, GText *tx1)
 
int APT_DrawTxtA (int typ, long apt_ind, AText *tx1)
 
int APT_DrawSol (int iatt, long apt_ind)
 
int APT_DrawPln (int typ, long dbi, Plane *pl1)
 
int APT_DrawSur (int att, long apt_ind)
 
int APT_DrawModel (int typ, long apt_ind, ModelRef *mod1)
 
void APT_disp_TxtA (int typ, Point *pt1, char *txt)
 
int APT_disp_SymB (int symTyp, int att, Point *pt1)
 
void APT_disp_SymV (int typ, int att, Point2 *pt1, double scale)
 
void APT_disp_SymV1 (int typ, int att, Point *p1, double scale)
 
void APT_disp_SymV2 (int typ, int att, Point *pt1, Point *pt2, double scale)
 
void APT_disp_SymV3 (int typ, int att, Point *pt1, Vector *vc1, double scale)
 
void APT_disp_ln (Point2 *pt1, Point2 *pt2, int attInd, double zval1, double zval2)
 
void APT_disp_ac (ObjG2 *objU, int attInd, double zval)
 
int APT_disp_dir (Point *p1, Point *p2)
 
void APT_disp_nam (int typ, long ind, void *e1)
 
int PP_up_list (NC_up_rec **upAct, char *macnam, int workmode)
 
void APT_get_dreh (int *Dreh, double *rad_o, double rad_i)
 
double WC_ask_ModSiz ()
 
void APT_DrawPoint (int Typ, long dbi, Point *pt1)
 
void APT_DrawLine (int iAtt, long dbi, Line *ln1)
 
void APT_DrawCirc (int Typ, long dbi, Circ *ci1)
 
void APT_DrawCurv (int att, long dbi, ObjGX *cv1, double zval, Memspc *tbuf1)
 
void APT_curv2ptArr (Point2 *pta, int *ianz, ObjG2 *o1)
 
int APT_Lay_add (int layNr, int aus_anz, char *sptr, int *aus_typ, double *aus_tab)
 
int APT_decode__ (ObjAto *ato, char **data)
 
int APT_obj_expr (void *data, int typ, char *cbuf)
 
int APT_obj_ato (void *data, int typ, ObjAto *aus_obj)
 

Variables

int SRC_ato_anz
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! More...
 
int SRC_ato_SIZ
 size of aus_typ & aus_tab More...
 
int * SRC_ato_typ
 
double * SRC_ato_tab
 
int AP_src
 AP_SRC_MEM or AP_SRC_EDI. More...
 
int WC_modact_ind
 
Point WC_mod_ori
 der Model-Origin More...
 
int WC_sur_ind
 Der Index auf die ActiveConstrPlane. More...
 
Plane WC_sur_act
 the active construction-plane More...
 
Mat_4x3 WC_sur_mat
 
Mat_4x3 WC_sur_imat
 inverse TrMat of ActiveConstrPlane More...
 
double WC_sur_Z
 active Z-value of WC_sur_sur; More...
 
char WC_ConstPl_Z [16]
 ConstPl-Z-axis (DZ, ...R20 ... More...
 
double AP_txsiz
 Notes-Defaultsize. More...
 
double AP_txdimsiz
 Dimensions-Text-Defaultsize. More...
 
int AP_txNkNr
 Nachkommastellen. More...
 
ColRGB AP_defcol
 die DefaultColor des aktiven (sub)Model More...
 
int APT_mac_fil
 
double GR_tx_scale
 
int TSU_mode
 
long DL_ind_act
 
char ** process_CmdTab
 
static long NC_stat_SIZ =0
 
static long NC_stat_IND =0
 
static NC_recTypNC_stat__
 
static long AP_dli_act
 
int AP_mdLev
 
static int AP_mdLnr [12]
 
static int AP_mdLne [12]
 
int APT_3d_mode = OFF
 
static int APT_view_stat
 
Point APT_tcpos
 
double APT_Z_clear
 
double APT_Z_deep
 
int APT_obj_stat
 
int APT_subTyp
 
double APT_pock_distk = 1.0
 
double APT_pock_distc = 1.0
 
double APT_pock_dirc = 0.
 
Memspc APTSpcObj
 
Memspc APTSpcTmp
 
double WC_sur1 = 0.0
 
double WC_sur2_Def = 50.1
 
double WC_sur2 = 50.1
 
double WC_thick = 50.0
 
double WC_sur3 = 0.0
 
int APT_konik = 0
 
int APT_dispNam
 
int APT_dispDir
 
int APT_dispPT = ON
 
int APT_dispPL = ON
 
int APT_dispSOL = ON
 
int APT_disp3D = ON
 
int APT_TL_Side = 0
 
int NC_TL_act = -1
 
Point2 actPosO
 
Point2 actPosOtr
 
Vector2 actVecO
 
Point2 actPosU
 
Point2 actPosUtr
 
int APT_ObjU_anz
 
int APT_ObjO_anz
 
ObjG2 APT_ObjU [20]
 
ObjG2 APT_ObjO [20]
 
ObjG2 old_APT_ObjU
 
ObjG2 old_APT_ObjUtr
 
ObjG2 old_APT_ObjOtr
 
ObjG2 old_APT_ObjO
 
int APT_tra
 
int APT_mirr
 
int APT_proj
 
Mat_4x3 APT_mat_tra
 
Mat_4x3 APT_mat_mirr
 
Mat_4x3 APT_mat_proj
 
Plane APT_pln_tra
 
int NC_rapid
 
int NC_work_modeU
 
NC_up_recNC_up_act
 
static int UpMirX
 
static int UpMirY
 
static Point2 UpOri
 
static Point2 UpFrom
 
static double UpOriAng
 
static double UpOriAng_sin
 
static double UpOriAng_cos
 
static Point2 RefOri
 
static double RefOriAng
 
static double RefOriAng_sin
 
static double RefOriAng_cos
 
static int UP_mode = OFF
 
int UP_resolv = ON
 
char UP_act_typ
 
static char UP_typ_DE
 
static char UP_level_typ [16]
 
static char UP_level_src [16]
 
static int UP_level_adr [16]
 
int UP_level
 
static int UP_workmode
 
static int Prg_line_nr
 
int APT_line_cnt = 0
 
int APT_line_act
 
int APT_line_old = 0
 
int APT_line_stat
 
static char APT_label [64]
 
static char APT_macnam [64]
 
static char APT_filnam [128]
 
int APT_stat_act
 
int APT_OPSTOP_stat = ON
 
int APT_tl_stat = 0
 
int APT_tl_act = 0
 
int APT_start = OFF
 
int APT_Stat_Draw = ON
 
int APT_stat_FROM = OFF
 
static int l_irc = 25
 
static int fpOutAnz
 
int GR_Att_act
 
int GR_lay_act = 0
 
int GR_pick = OFF
 
static int PrgCmdAnz = 41
 
static char * AppCodTab []
 
static char * PrgCodTab []
 
static char insBuf [10][64]
 
static int insAnz
 
static int insCnt [10]
 
static int insSym [10]
 
double APT_ModSiz = 500.
 
double APT_TOL_ac = 0.1
 
char * APT_defTxt
 
int APT_prim_typ
 

Detailed Description

CommandInterpreter - main.

=====================================================
List_functions_start:
WC_Work__ mainFunc; test for submodels
WC_Work1 mainFunc
WC_Work_upd call WC_Work1 with 0-terminated memory-line, restore.
APT_work_def work DefinitionLine (decodieren, in DB-speichern, darstellen)
APT_work_parent_hide hide parent-obj
APT_work_PrgCmd work programcodes
// APT_decode__ DO NOT USE; new func: ATO_ato_srcLn__
APT_obj_ato create struct from atomicObjs
APT_obj_expr Create struct from ModelCode
APT_PP_WriOut
APT_transl2 rel coords -> abs coords
APT_alloc1 realloc NC_stat__
APT_Draw__ draw (load from DB, APT_DrawXX)
APT_hiliObj
APT_disp_obj PT,LN,AC,POL2
// APT_disp_TxtG
APT_disp_SymB disp temp bitmap symbols SYM_TRI_S SYM_STAR_S ..
APT_disp_SymV display symbols at 2D-pos (not rotated symbols)
APT_disp_SymV1 display symbols in x-y-plane (not rotated symbols eg SYM_CROSS)
APT_disp_SymV2 display oriented symbols in x-y-plane; eg SYM_ARROH
APT_disp_SymV3 disp temp oriented vector-symbols SYM_ARROW SYM_SQUARE ..
APT_disp_cv
APT_disp_nam display objName at objPosition
APT_curv2ptArr Polygonpoints into 2D-pointArray
WC_ask_WC_mode return WC_mode
WC_ask_actPos return actPosU
WC_ask_actZsur return WC_sur_Z
WC_ask_Zsur1 return WC_sur1
WC_ask_Zsur2 return WC_sur2
APT_do_auxCmd handle change Graf. Attribut u. Refsys
APT_eval_if evaluate expression
APT_UP_get give APT_line_act of calling line ..
AP_mdGet query subModelLevel & APT-LineNr of active subModelCall
// WC_get_obj_typ der Typ des zuletzt generierten Objekts
WC_get_obj_stat 0=OK, 1=workmode
WC_set_obj_stat 0=OK, 1=workmode
WC_Init_all 0=normal, 1=PP
WC_Init_Tol recompute all tolerances from APT_ModSiz
WC_setDisp3D switch 3D-mode/2D-mode
NC_setRefsys Change active Plane
WC_setPosKreuz disp cross
WC_actPos_save
WC_actPos_dump
WC_actPos_reset
WC_ask_actObj
List_functions_end:
=====================================================

Macro Definition Documentation

#define PrgMod_normal   0
#define PrgMod_continue_if   1
#define PrgMod_skip_until_label   2
#define PrgMod_skip_until_macend   3
#define PrgMod_skip_until_mac   4
#define PrgMod_skip_until_line   5
#define PrgMod_skip_until_file   6
#define PrgMod_continue_file   7
#define PrgMod_continue_mac   8
#define UP_level_max   16
#define oaSIZ   10
#define WTAB_SIZ   10

Enumeration Type Documentation

enum Typ_TACT
Enumerator
TAC_PRI 
TAC_DRAW 
TAC_STAT 
TAC_MODE 
TAC_SSTYLS 
TAC_SHOW 
TAC_HIDE 
TAC_VIEW 
TAC_CONST_PL 
TAC_ZOOMALL 
TAC_MODBOX 
TAC_MODVAL 
TAC_MODSIZ 
TAC_DEFTX 
TAC_DEFCOL 
TAC_ATTL 
TAC_ATTS 
TAC_PROCESS 
TAC_LDMOD 
TAC_EXECM 
TAC_DIM 
TAC_HILI 
TAC_LAY 
TAC_DUMP 
TAC_NOP 
enum Typ_TPCT
Enumerator
TPC_JUMP 
TPC_MAC 
TPC_GEO 
TPC_END 
TPC_IF 
TPC_CALL 

Function Documentation

int AP_mdGet ( int *  lnr)

query subModelLevel & APT-LineNr of active subModelCall RetCod: AP_mdLev -1 im primary Model 0-12 im subModel

int WC_get_obj_stat ( )

0=OK, 1=workmode (obj in statu nascendi; see APT_decode_ccv)

int WC_set_obj_stat ( int  stat)

0=perm, 1=workmode (obj in status nascendi; see APT_decode_ccv)

void WC_Init_all ( int  mode)
int WC_Init_Modsiz ( double  newssiz)

see WC_ask_ModSiz

void WC_Init_Tol ( )
compute all Tolerances from APT_ModSiz (Defaultvalue = 500)
sets: Default:
UT_TOL_pt identical Points-tolerence 0.0001
UT_TOL_ln max deviation of a point from a line 0.001
UT_TOL_cv max deviation of point from curve 0.005
UT_DISP_cv max deviation of displayPolygon from curve 0.05
WC_sur2_Def, WC_sur2, APT_ln_len.
see ../ut/ut_tol_const.h (defaults)
void WC_Init ( )
void APT_Init ( )
int APT_reset_view_stat ( )
int APT_get_view_stat ( )
int APT_set_view_stat ( )
void UCS_Reset ( )

see AP_Init_planes see GL_SetConstrPln

void APT_Reset ( )
void WC_EOF ( )
void WC_setDisp3D ( int  mode)

ON = 3D; else 2D

void NC_set_actPos ( Point2 posU)
int NC_getGrafAtt ( )
void NC_setGrafAtt ( int  AttInd)

set GR_Att_act

int NC_setModSiz ( double  modSiz)
int NC_setRefsys ( int  RefInd)
int WC_actPos_disp ( )
int WC_Work__ ( int  lNr,
char *  cbuf 
)
work sourceObj.
RetCod:
-2 do nothing
-3 obj not yet complete
int WC_Work_upd ( int  lNr,
char *  cbuf 
)
int WC_Work1 ( int  lNr,
char *  cbuf 
)
main-interpreter-function
Input:
cbuf must be terminated with '\'; without objName.
Output:
retCod 0 = OK;
-1 = Error, stop.
-2 = invisible obj (joint, activity), continue
-3 = obj not yet complete
subModels must be loaded (else use WC_Work__).
int APT_do_auxCmd ( int *  i_typ,
double *  i_tab 
)

handle change Graf. Attribut u. Refsys

int APT_work_def ( char *  cmdIn,
char **  data 
)
Work DefinitionLine (decode, store obj in DB, display obj).
RetCod: defTyp. or -3 (obj not yet complete)
Input:
cmdIn obj left of '='
data pointer to srcTxt right of '='
int APT_work_parent_hide ( int  cldTyp,
long  cldDbi,
int *  iPar 
)
APT_work_parent_hide hide parent-obj
overwrite display of already present obj's (eg "S<child>=CUT L<parent> ..")
(set (DL_Att*)GR_ObjTab[child].sChd = 1)
hide parent-obj (set (DL_Att*)GR_ObjTab[parent].sPar = 1)
(set (DL_Att*)GR_ObjTab[parent].unvis = 1)
child = GL_GetActInd ();
parent =
Input:
cldTyp,cldDbi typ/dbi of child (output-obj)
iPar[0],iPar[1] Typ_cmdNCsub / T_CUT|T_MIR|..
iPar[2],iPar[3] typ/dbi of parent (basic-obj; first obj of "CUT"
int APT_Draw__ ( int  iAtt,
int  typ,
long  ind 
)
obj ex DB laden (DB_GetXX), ausgeben via APT_DrawXX
create/modify obj: see DL_SetInd
is using memspc201
Input:
ind dbi
int APT_eval_if ( int *  aus_typ,
double *  aus_tab 
)

evaluate expression;

int APT_work_TPC_IF ( char **  data)
int APT_work_PrgCodTab ( int  icod,
char **  data 
)
int APT_work_AppCodTab ( char *  cmd,
char **  data 
)
work commands HIDE VIEW MODSIZ DEFTX EXECM .. (AppCodTab)
retCod: >=0 cmd in AppCodTab; cmd executed.
-1 error executing commend.
-2 cmd not in AppCodTab;
int APT_work_LAY ( int  aus_anz,
int  aus_typ[],
double  aus_tab[],
char **  data 
)
int APT_work_MODE ( char **  data)
int APT_work_TPC_CALL ( char **  data)
int APT_work_ATTS ( int  aus_anz,
int  aus_typ[],
double  aus_tab[] 
)
int APT_work_ATTL ( int  aus_anz,
int  aus_typ[],
double  aus_tab[] 
)
int APT_work_SHOW ( int  aus_anz,
int  aus_typ[],
double  aus_tab[] 
)
int APT_work_VIEW ( int  aus_anz,
int  aus_typ[],
double  aus_tab[] 
)
int APT_line_set ( int  i1)
int APT_UP_get ( )

returns APT_line_act of calling line ..

int APT_UP_up ( char  src)
int APT_UP_down ( )
double APT_transl_rad ( double  rad_in)
int APT_transform ( Point pt1)
Point2 APT_transl2 ( Point2 ptin)
Point2 APT_rotate3 ( Point ptin)
int APT_DrawDim3 ( int  typ,
long  apt_ind,
ObjGX dim3 
)
void APT_DrawDimen ( int  typ,
long  apt_ind,
ObjGX dim1 
)
void APT_DrawTxtG ( int  iAtt,
long  apt_ind,
GText tx1 
)
int APT_DrawTxtA ( int  typ,
long  apt_ind,
AText tx1 
)
int APT_DrawSol ( int  iatt,
long  apt_ind 
)
int APT_DrawPln ( int  typ,
long  dbi,
Plane pl1 
)
int APT_DrawSur ( int  att,
long  apt_ind 
)
int APT_DrawModel ( int  typ,
long  apt_ind,
ModelRef mod1 
)
void APT_disp_TxtA ( int  typ,
Point pt1,
char *  txt 
)
int APT_disp_SymB ( int  symTyp,
int  att,
Point pt1 
)
APT_disp_SymB disp temp bitmap symbols SYM_TRI_S SYM_STAR_S ..
Input:
att see GL_col_tab
see also GL_DrawSymB
void APT_disp_SymV ( int  typ,
int  att,
Point2 pt1,
double  scale 
)

APT_disp_SymV display symbols at 2D-pos (not rotated symbols)

void APT_disp_SymV1 ( int  typ,
int  att,
Point p1,
double  scale 
)
APT_disp_SymV1 display symbols in x-y-plane (not rotated symbols)
oriented symbols in x-y-plane: see APT_disp_SymV2
void APT_disp_SymV2 ( int  typ,
int  att,
Point pt1,
Point pt2,
double  scale 
)
APT_disp_SymV2 display oriented symbols in x-y-plane; eg SYM_ARROH
Input:
typ SYM_ARROH (arrowhead)
pt1 position Head
pt2 direction
void APT_disp_SymV3 ( int  typ,
int  att,
Point pt1,
Vector vc1,
double  scale 
)
APT_disp_SymV3 disp temp oriented vector-symbols SYM_ARROW SYM_SQUARE ..
void APT_disp_ln ( Point2 pt1,
Point2 pt2,
int  attInd,
double  zval1,
double  zval2 
)
void APT_disp_ac ( ObjG2 objU,
int  attInd,
double  zval 
)
int APT_disp_dir ( Point p1,
Point p2 
)
APT_disp_dir display obj-direction with arrow
void APT_disp_nam ( int  typ,
long  ind,
void *  e1 
)
display objName at objPosition.
Input:
typ,ind typ & DB-ind of obj to display
e1 data-struct of obj
int PP_up_list ( NC_up_rec **  upAct,
char *  macnam,
int  workmode 
)
void APT_get_dreh ( int *  Dreh,
double *  rad_o,
double  rad_i 
)
double WC_ask_ModSiz ( )
void APT_DrawPoint ( int  Typ,
long  dbi,
Point pt1 
)
void APT_DrawLine ( int  iAtt,
long  dbi,
Line ln1 
)
void APT_DrawCirc ( int  Typ,
long  dbi,
Circ ci1 
)
void APT_DrawCurv ( int  att,
long  dbi,
ObjGX cv1,
double  zval,
Memspc tbuf1 
)
dbi ist DB-index; nicht DL-Index !
Input:
dbi dbi
void APT_curv2ptArr ( Point2 pta,
int *  ianz,
ObjG2 o1 
)
int APT_Lay_add ( int  layNr,
int  aus_anz,
char *  sptr,
int *  aus_typ,
double *  aus_tab 
)
int APT_decode__ ( ObjAto ato,
char **  data 
)
DO NOT USE; new func: ATO_ato_srcLn__
decode textline <data> into types and values (aus_typ, aus_tab)
NEEDS TERMINATING '\0' !
uses memspc54 memspc55 memspc012 for ato !
Names ("xx #name") must have been removed
Input:
data pointer to sourceText;
Output:
ato->typ pointer to array of integers (atomicObj - types)
ato->val pointer to array of doubles (atomicObj - values)
retCod nr of atomic objects
see also
APT_obj_ato create struct from atomicObjs
APT_obj_expr create struct from ModelCode (text).
UTF_GetLinNr copy sourcecodeline
int APT_obj_expr ( void *  data,
int  typ,
char *  cbuf 
)
get struct from ModelCode (text).
copies struct -> data
Input:
typ requested typ of object; eg Typ_PT;
data must have corresponding size.
Result unknown: set typ=0; size of data = OBJ_SIZ_MAX
cbuf sourceCode; eg "P21"
Output:
data struct corresponding to <typ>
Returncodes:
-1 Error else type of data
int APT_obj_ato ( void *  data,
int  typ,
ObjAto aus_obj 
)
APT_obj_ato create struct from atomicObjs
Output:
data memspc for the obj of typ <typ>; eg a struct Vector or Point ..
see also APT_store_obj

Variable Documentation

int SRC_ato_anz

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

int SRC_ato_SIZ

size of aus_typ & aus_tab

int * SRC_ato_typ
used for objTypes in APT_decode_ausdr
in IE: memspc55
double* SRC_ato_tab
used for objData in APT_decode_ausdr
in IE: memspc54
int AP_src

AP_SRC_MEM or AP_SRC_EDI.

int WC_modact_ind
Point WC_mod_ori

der Model-Origin

int WC_sur_ind

Der Index auf die ActiveConstrPlane.

Plane WC_sur_act

the active construction-plane

Mat_4x3 WC_sur_mat

TrMat of ActiveConstrPlane only if (WC_sur_ind > 0)

Mat_4x3 WC_sur_imat

inverse TrMat of ActiveConstrPlane

double WC_sur_Z

active Z-value of WC_sur_sur;

char WC_ConstPl_Z[16]

ConstPl-Z-axis (DZ, ...R20 ...

double AP_txsiz

Notes-Defaultsize.

double AP_txdimsiz

Dimensions-Text-Defaultsize.

int AP_txNkNr

Nachkommastellen.

ColRGB AP_defcol

die DefaultColor des aktiven (sub)Model

int APT_mac_fil
double GR_tx_scale
int TSU_mode
long DL_ind_act
char** process_CmdTab
long NC_stat_SIZ =0
static
long NC_stat_IND =0
static
NC_recTyp* NC_stat__
static
long AP_dli_act
static
int AP_mdLev
int AP_mdLnr[12]
static
int AP_mdLne[12]
static
int APT_3d_mode = OFF
int APT_view_stat
static
Point APT_tcpos
double APT_Z_clear
double APT_Z_deep
int APT_obj_stat
int APT_subTyp
double APT_pock_distk = 1.0
double APT_pock_distc = 1.0
double APT_pock_dirc = 0.
Memspc APTSpcObj
Memspc APTSpcTmp
double WC_sur1 = 0.0
double WC_sur2_Def = 50.1
double WC_sur2 = 50.1
double WC_thick = 50.0
double WC_sur3 = 0.0
int APT_konik = 0
int APT_dispNam
int APT_dispDir
int APT_dispPT = ON
int APT_dispPL = ON
int APT_dispSOL = ON
int APT_disp3D = ON
int APT_TL_Side = 0
int NC_TL_act = -1
Point2 actPosO
Point2 actPosOtr
Vector2 actVecO
Point2 actPosU
Point2 actPosUtr
int APT_ObjU_anz
int APT_ObjO_anz
ObjG2 APT_ObjU[20]
ObjG2 APT_ObjO[20]
ObjG2 old_APT_ObjU
ObjG2 old_APT_ObjUtr
ObjG2 old_APT_ObjOtr
ObjG2 old_APT_ObjO
int APT_tra
int APT_mirr
int APT_proj
Mat_4x3 APT_mat_tra
Mat_4x3 APT_mat_mirr
Mat_4x3 APT_mat_proj
Plane APT_pln_tra
int NC_rapid
int NC_work_modeU
NC_up_rec* NC_up_act
int UpMirX
static
int UpMirY
static
Point2 UpOri
static
Point2 UpFrom
static
double UpOriAng
static
double UpOriAng_sin
static
double UpOriAng_cos
static
Point2 RefOri
static
double RefOriAng
static
double RefOriAng_sin
static
double RefOriAng_cos
static
int UP_mode = OFF
static
int UP_resolv = ON
char UP_act_typ
char UP_typ_DE
static
char UP_level_typ[16]
static
char UP_level_src[16]
static
int UP_level_adr[16]
static
int UP_level
int UP_workmode
static
int Prg_line_nr
static
int APT_line_cnt = 0
int APT_line_act
int APT_line_old = 0
int APT_line_stat
char APT_label[64]
static
char APT_macnam[64]
static
char APT_filnam[128]
static
int APT_stat_act
int APT_OPSTOP_stat = ON
int APT_tl_stat = 0
int APT_tl_act = 0
int APT_start = OFF
int APT_Stat_Draw = ON
int APT_stat_FROM = OFF
int l_irc = 25
static
int fpOutAnz
static
int GR_Att_act
int GR_lay_act = 0
int GR_pick = OFF
int PrgCmdAnz = 41
static
char* AppCodTab[]
static
Initial value:
= {
"PRI", "DRAW", "STAT", "MODE", "SSTYLS",
"SHOW", "HIDE", "VIEW", "CONST_PL", "ZOOMALL",
"MODBOX", "MODVAL", "MODSIZ", "DEFTX", "DEFCOL",
"ATTL", "ATTS", "PROCESS", "LDMOD", "EXECM",
"DIM", "HILI", "LAY", "DUMP", "NOP",
NULL}
char* PrgCodTab[]
static
Initial value:
= {
"JUMP", "MAC", "GEO", "END", "IF",
"CALL", NULL}
char insBuf[10][64]
static
int insAnz
static
int insCnt[10]
static
int insSym[10]
static
double APT_ModSiz = 500.
double APT_TOL_ac = 0.1
char* APT_defTxt
int APT_prim_typ