gCAD3D 2.35
ProgramFlow

../../doc/gcad_doxygen/ProgramFlow.dox

Startup
Workflow
Events
Edit_mem
Edit_edi
Transformations
Interaction
Views
Textures
Tesselate
CAD
MAN-Editor
ObjBrowser
NC
NC-Wcut
IGES
DXF
VRML
DL-OpenGL
DLLs
Plotten


Edit_mem


Edit_edi


Transformations

see also ut_transform.c  (UTRA_)
see also ConstructionPlane
UTRA_m3_inirot transformation from rotationaxis and angle
UTRA_def__ define transformation
UTRA_app_pt apply all defined Transformations to a point
UTRA_app_vc apply all defined Transformations to a Vector
UTRA_app__ UTRA_app_oTab UTRA_app_obj
UTO_obj_apptra apply Tra; creat new struct. in:Struct; preload trMat.
UTO_obj_tra ruft UTO_stru_tra; in: oGX u Mat_4x3
UTO_stru_tra apply Tra; generiert neue oGX; in: oGX u Mat_4x3
UTO_pt_tratra
UTO_pt_trarot

Views

APT_work_PrgCmd do "VIEW" source
GL_View_get returns active viewData
GL_View_set set viewData
GL_View_dump dump viewData
UI_GR_view save/restore viewData

Startup

main xa_main.c search ":/main ("
UI_win_main create window
UI_GL_draw__ Redraw-CB of OpenGL
AP_init__ only 1. call
AP_work__ work startup-parameters
ED_work_CurSet ruecksetzen od. bis new ln abarbeiten ..

Workflow

NC_Main.c   CommandInterpreter - main
UI_AP UserInterface;
UI_menCB Callback f File/new ...
UI_butCB Callback fuer Menufuncs, Buttons, ...
WC_Work__ subModel
WC_Work1 ========= HauptEntry in NC_Main.c ==========
APT_work_def DefinitionLine abarbeiten (decode, draw)
APED_dbo_oid Typ und Index der Zielvariable bestimmen
APT_decode_ausdr Eingabezeile zerteilen (1. Decodierstufe)
APT_decode_func decode SIN() X() D() ANG() P() L() ..
APT_decode_inp 2.Decodierstufe
APT_store_obj decode APT-object, store object.
APT_decode_bsp
APT_decode_ccv
AP_cont_nxt Kontursucher ..
APT_decode_pln2 Plane R = PERP ..
APT_decode_sbsp decode b-spline-surf
APT_trim_obj LN|CI|CV = CUT ..
TSU_DrawSurTRU Ruled Surface
TSU_DrawSurTRV Revolved Surface
TSU_DrawSurTS ungetrimmte/ungelochte Planare Flaeche
TSU_DrawSurTC getrimmte/gelochte Complex-Flaeche (Typ_SURTPS)
TSU_DrawSurTP getrimmte/gelochte Planare Flaechen
APT_work_PrgCmd Programming-Function (goto, call, WORK, if ...)
APT_work_NCCmd FROM TL ..
APT_do_auxCmd T1;G20;R0 ..
APT_wcut_line nur if (APT_workmode == Typ_nc_cut) ?
APT_drill_line nur if (APT_workmode == Typ_nc_cut) ?

Workflow CAD:

// activate new subMenu:
IE_cad_init2 // activate new mainMenu
IE_cad_init1 // activate new subMenu
// activate new inputField:
// receive Input from user:
IE_cad_sel1
// test content of all inputFields:
IE_cad_test1
// finish cad-object:
UI_CB_hide Hide - Funktion
DL_disp_set
UI_CB_view View - Funktion
GA_hide__ hidden-Elements-Tabelle bearbeiten

Events

------------------- GUI-events
UI_GL_mouse__ OpenGL-callback for user-selection
UI_GR_Select2 callback von GUI_Popup (Liste der sel.Obj)
sele_decode change selected_object into requested_object
UI_GR_Select_work2 work hide,view,SM or call
IE_sel_CB__ write selection -> CAD-inputfield
IE_cad_sel1 CAD-report sel.
OMN_CB_popup callback of popup-menu
// handle special-keycodes:
UI_key_spcCtrl // Ctrl on
UI_key_spcAlt // Alt ON
UI_key_spcShAlt // Shift + Alt ON
------------------- OpenGL-Events:
UI_GL_draw__ Redraw whole scene
UI_GL_move__ mouseMoveCallback from Grafic-window
UI_GL_mouse__ mouseButtonCallback from Grafic-window
UI_GL_keys__ KeybCallback from Grafic-window
Brw_CB_sel MouseButtonCallback from Browser-window
EDI_CB__ KeybCallback from Editor-window

CAD

// activate new subMenu:
IE_cad_init2 // activate new mainMenu
IE_cad_init1 // activate new subMenu
// activate new inputField:
// receive Input from user:
IE_cad_sel1
UI_cad Hauptmenue aufbauen
IE_cad_p_CB PointMenueEintrag selected ..
IE_activate nach Select obj: entspr. menu aktivieren.
IE_decode_Ln Inputtzeile in (Typen, Worte) zerlegen
IE_txt2par1 decode textline -> subgroup (nach SM)
IE_cad_sel1 Selektion wird gemeldet, decodiert, eingearbeitet.
IE_cad_test1 test ob alle Eingaben vorh;
ja:decode Felder, exec txt, activate OK.
IE_cad_OK OK-Butt.pressed: clear Inputboxen,Zeile->Datei

MAN-Editor

sourcefiles for MAN-editor - not memory:
xa_ed.c      Neutral EditorFunctions (MAN, not Gtk-specific)    ED_
xa_edi__.c   Neutral EditorFunctions (MAN, not Gtk-specific)    ED_
GUI_edi_*()        GUI-EditorFunctions
sourcefiles for memory (MAN & CAD) - not editor:
xa_ed_mem.c  ApplicSpecficFunctions APT-Textfunctions im Memory APED_
ut_txfil.c   Textfunctions im Memory                            UTF_
create/modify textlines:
xa_src.c     check, modify, convert source-objects (text)       SRC_
other:
xa_cad_ed.c  CAD-GroupEditor                                    IE_ed1_
 
ED_work_END Button END = alles abarbeiten

ObjBrowser

UI_brw__ (1); // on; -1=off
Brw_Mdl_init (); // fill browserWindow
Brw_typeRow_upd // add type-row
Brw_objRow_add // add obj

Interaction

AP_stat.iActStat = 1; // ON; 0=off.
SRCU_win_var // init update variable
SRCU_win__ // create Toolbar
Events:
SRCU_ent_CB // new value entered into entryField
SRCU_tmr_CB__ // timer callback
UI_GL_mouse__ callback mouseButton
UI_GR_Select1 get selected obj
sele_ck_typ test if objTyp is active in reqObjTab
sele_ck_subCurv test for component of curve; give point on polygon ..
SRC_src_pt_dbo src from point and DB-obj

NC

APT_work_PrgCmd
APT_wcut_ln1 CUT P
NC_up_Work_ CUT S
NC_up_Pock_ POCK
Pock_CUT_CIRC CUT_CIR
Pock_POCK_CIRC POCK_CIR

NC-Wcut

UI_wcg__ gesamtes Panel generieren
UI_wcg_init_ erster Start
UI_wcg_CBcont Auswahl einer Kontur
UI_wcg_InitBuf Text -> aus_typ,aus_tab;
wcg_decode__ abarbeiten
AP_cont_nxt Kontur -> oxInpU (memspc)
wcg_decode_APT Konikinfos -> deTab
wcg_CreCutAll Ausgabeelemente -> oxOutU/O[oxOutNr]
wcg_CreCutCyl
wcg_CreCutCon
wcg_CreCutCpx
wcg_cpx_break
wcg_cpx_teilen
wcg_OutDrawAll Ausgabeobjekte anzeigen.
GR_DrawSur dzt werden Typ_SURRU einzeln ausgegeben
UI_wcg_InitProc Konikinfos anzeigen
UI_wcg_UpdateProc Konikinfos aus menue uebernehmen (OK-Butt.)
UI_wcg_askExit beenden
UI_wcg_CB_ExitDia beenden
UI_wcg_SaveOK Progr -> Editwin
wcg_encode__ das aktuelle APT-prog -> memspc54
........ NC-Tech ........
APT_wcut_line eine NC-Bearbeitungszeile decodieren
UI_wcTec__ Window aufbauen
UI_wcTec_Init1 erster Start
UI_wcTec_find_tec
NC_up_Work_ WORK CUT ..
NC_up_Pock_

IGES

UI_menCB "open"
AP_Import__ ("xa_ige_r", "IGE_r__", cbuf);
IGE_r__ Mainentry in ../exp/ige_r.c
IGE_r_work__ abarbeiten
IGE_r_work_1 subfigs, dann main abarbeiten
IGE_r_work_2 ein Obj ausgeben
UTF_add2_line
UI_expIgeCB

DXF

dxf_r.c        ../exp/dxf_r.c  Import DXF-functions        (dxfr_)
dxf_w.c        ../exp/dxf_w.c  Export DXF-functions        (dxfw_)
dxf_ut.c       ../exp/dxf_ut.c DXF-utility-functions       (dxf)
UI_menCB "impDxf"
dxfr_init get txsiz,dimsiz,$EXT..
dxfr_rec__ read nxt obj
AP_obj_2_txt create code, write > mem_cbuf1
UI_menCB "expDxf__" UI_save__
// AP_ExportDxf
// dxfw_rec

VRML

wrl_readTess__ wrl_ut.c Import
TSU_exp__ ../gr/tess_ut.c Export

Textures

ui_tex.c                  // ModifyTexturesWindow
xa_tex.c                  // Texture-Utility-Functions.
gru.c                     // OpenGl-Texture-Utility-Functions.
GRU_tex_pos1 compute texture-parameters (vectors, scale)
GL_Tex_Ini apply texture
glTexGendv (GL_S, apply horizontal vector vs
glTexGendv (GL_T, apply vertical vector vt
glRotatef apply rotation
glScalef apply scale
glTranslatef apply offset ...

Tesselate

DL-OpenGL

DL_ReScale__ Rescale rescale ScalAll
DL_InitAttTab Def.Attributtabelle laden
DL_DumpObjTab dump DispList
GL_DrawLine ../gr/ut_GL.c
GL_DrawTxtG ../gr/ut_GL.c
GL_Redraw redraw DL

DLLs

see also xa_dll.c (DLL_)

xa_dll.c
UI_DllLst_read fill list of userprograms (DLL's)
UI_DllLst_CB DLL by user selected ..
AP_exec_dll start plugin

Plotten

UI_WinPrint1
AP_print__ ../exp/prt_w.c