../dox/CAD-Objects.dox
Create_CAD-Objects Delete_CAD-Objects Modify_CAD-Objects
CadObjects are permanent objects. (Visible & in Database). Input is a MemoryObject. Ouput is a sourceLine in the active model (sourceObj _src_). Source is Ascii-text. Find_CAD-Objects: see ResolveObjects
________________________________________________________________________________
Point p2={1.0, 1.0, 0.0};
ObjGX o1;
// clear UTF_FilBuf1
UTF_clear1 ();
// Init objNrs
AP_obj_2_txt (NULL, 0L, NULL, 0L);
// create a complexObj
OGX_SET_OBJ (&o1, Typ_PT, Typ_PT, 1, &p2);
// create sourceObj from complexObj in mem_cbuf1; add to UTF_FilBuf1
// ind -1: get next free ..
i1 = AP_obj_2_txt (mem_cbuf1, mem_cbuf1_SIZ, &o1, -1L);
printf(" %d |%s|\n",i1,mem_cbuf1);
// add objNam to last sourceObj in UTF_FilBuf1
UTF_add1_last_add (" #Mittelpkt oben");
UTF_dump1__ (); // dump UTF_FilBuf1
// add a commentline to UTF_FilBuf1
sprintf(mem_cbuf1,"# this is a test ..");
UTF_add1_line (mem_cbuf1);
// output UTF_FilBuf1 -> CAD
UTF_insert1 (-1L);
// update display (work new created objects)
APED_update__ (-1L);
------------------------------
AP_stru_2_txt // create sourceObj from complexObj
UTF_add1_last_add // add name to last obj in UTF_FilBuf1
UTO_sav_ost // create DB-object & save it in Model.
________________________________________________________________________________
// // reset selected-obj-group // Grp_init (); // add sourceObj's of sourcelines 4 and 8 to do/undo-list UNDO_grp_add (4L, 0); UNDO_grp_add (8L, 1); // delete the active undo-grp & update display UNDO_grp_del (); // see also Del_tab__ // alle temporaer geloeschten Zeilen entfernen (und Undo-Liste entleeren) // (temporaer geloeschten Zeilen beginnen mit "_") AP_APT_clean (); // Das gesamte Textfile loeschen (Funktion File/New) UI_menCB (NULL, "new");
________________________________________________________________________________
lNr = 8L; strcpy(cbuf1,"P1=P(710 350 150)"); // deactivate line, insert modified line, report change -> UNDO. irc = APED_src_chg (lNr, cbuf1); // update DB & display APED_update__ (lNr); // see also UTF_chg_line // modify line in memory
____________________________________________________________________________
1.6.3