../dox/ObjectFormatConversions.dox
Obj-types:
objectTypes eg Typ_PT objectIDs eg "P123" sourceLines editor functions sourceObjects text;expressions eg "P12" "DZ" "L(P10 D(0 0 1))" atomicObjects ausTyp/ausTab-array; (*int, *double) binaryObjects type & dedicated structure; eg (int)Typ_PT, (Point)pt DB-Obj type, DB-index; (int, long) DB-Obj type, DB-index; (int, long) complexObject struct ObjGX; (ObjGX)
Files:
NC_apt.c CommandInterpreter - decode-functions (APT_decode_) ut_gtypes.c typChar, typ, name(typ,index), .. ut_ox_base.c complex-object-manipulationes (copy, relocate) (OGX_) ut_obj.c object-manipulationes (transform, convert ..) (UTO_) xa_obj_txt.c convert object-struct -> source-text (AP_obj_) xa_src.c check, modify, convert source-objects (text) (SRC_)
see also ResolveObjects
_____________________________________________________________________
objectTyp and objectID
objTyp (int) or (char) Typ_PT 'P' _typ_
objID (char*) "P123" _oid_
"P12" P is the objectType (Typ_PT)
AP_typ_typChar make typ from typChar ("P" -> Typ_PT) APT_decode_obj give typ and index from objectID eg "P12" AP_typ_2_bastyp give basictyp from typ (eg Typ_SUR from Typ_SURRU) AP_typ_srcExpr decode expression AP_typ_FncNam get type of function DB_Typ_Char give typ(int) from text "PT" --> Typ_PT; AP_cmp_typ check for identical types UTO_ck_oTyp check object-typ (struct or object) UTO_ck_typTyp check if typ=curve (Typ_lFig) or surface (Typ_SUR) UTO_ck_curvLimTyp check if CurveLimits are Points or parameters UTO_ck_curvForm check if objTyp is ObjGX or other typ AP_ck_ftyp returns fileTyp as int; 0=native, 1-9=Import, 10-19=Mockup AP_i2ftyp returns fileTyp as text
_____________________________________________________________________
objectTyp and objectID
objTyp (int) or (char) Typ_PT 'P' _typ_
objID (char*) "P123" _oid_
"P12" P is the objectType (Typ_PT)
AP_typChar_typ make typChar from typ (Typ_PT -> 'P') AP_name_typInd make name from typ and DB-Index (visible object types) AP_oid_dbo make name from typ and DB-index (all types) AP_cre_defHdr create new (unused) objHeader
_____________________________________________________________________
functions - result is sourceLine UTF_GetLinNr get a copy of a sourceObj-line UTF_GetPosLnr get a pointer to a sourceObj-line AP_obj_2_txt change obj to text and save it with UTF_add1_line APT_decode_func SQRT SIN COS TAN ASIN ACOS ATAN ABS FIX RND APED_ck_defLn check if Line cBuf is a Definitionline
_____________________________________________________________________
get sourceObject (as asciiText) _src_ ----------- create sourceLines: AP_stru_2_txt change object into text (definition-line) APT_decode_print create sourceObj from atomicObjs SRC_dbo create sourceObj from Database-object SRC_fmt write sourceCode formatted for dynamic obj; eg "D(P1 P2)" SRC_fmt_sub format sourceObj (text) for compound-DB-obj AP_src_sel_fmt format sourceObj (text) for selected compound-obj SRC_isol_dbo convert DB-obj (typ/DB-index) into isolated sourceObj (text) AP_obj_add_obj add objname to string AP_obj_add_pt add Point* as "P(xyz)" AP_obj_add_vc add struct Vector* to string " D(x y z)" AP_obj_add_val add double > text ( xa_obj_txt.c ) AP_obj_add_cvBsp_p add "BSP,P(..) P(.." with points //AP_pt_segpar give Text for Point on geometr. Obj near Cursor AP_txt_vec check if Vector is a Defaultvector (DX or DIX or ...) ----------- decode sourceLines: APT_exp_ln__ separate sourceline into expressions APED_decAdd decode textLine, add all objs to group (oTab) APED_dec_txt decode textLine, add all objs to group (oTab) APED_nxt_obj find next obj in string; skip brackets. IE_decode_Ln decode textLine (typTab, textTab) IE_txt2par1 get requested typ from (typTab, textTab) AP_src_typ__ get typText from typ AP_src_typMod get modifier-text from (modifier)typ DB_Char_Typ make text from (int)typ; Typ_PT --> "PT" ..
_____________________________________________________________________
atomicObjects (ausTyp/ausTab, array) _ato_:
(list of objTyp and list of objValues)
ATO_ato_srcLn__ split sourceLine, add all expressions to ato.
APT_decode__ sourceObj -> atomicObj (ausTyp/ausTab-array)
APT_decode_obj__ create struct from atomicObjs
ATO_sort1
ATO_getSpc__
ATO_getSpc1
ATO_srcTxt get atomicObj from Typ_Txt (after AP_typ_srcExpr)
APT_decode_ausdr decode sourceObj -> atomicObj
APT_decode_ausdr1 operators constantObjects constantValues
SRC_ato_SIZ, SRC_ato_typ, SRC_ato_tab = global memspc
_____________________________________________________________________
binObj (dedicated structure) pt|ln..:
(typ - (int) eg Typ_PT for (Point), Typ_VC for (Vector)
(structure; the type of the structure must be known)
--------- get binaryObject
UTO_obj_getp cplxObj -> binObj (pointer)
UTO_obj_get cplxObj -> binObj (copy)
UTO_copy_stru copy struct (no resolve - not recursive)
APT_decode_objTx Create struct from ModelCode (text).
UT3D_pt_txt get point from text
UT3D_vc_txt get vector from text
AP_vec_txt give vector-struc from vector-text (only defvecs)
APT_decode_pt APT_decode_ln APT_decode_ci atomicObj -> struct
APT_decode_ang APT_decode_goAxis APT_decode_goRadius (../ci/NC_apt.c)
UTO_ck_surfTyp returns surfSubTyp (see also SUR_ck_typ)
UTO_siz_stru get size of structure
_____________________________________________________________________
DB-Obj: (objectType and dataBaseIndex) _dbo_ DBO_sel__ change selection into DB-object DBO_dump__ dump DB-object -> debug-window
_____________________________________________________________________
complexObj (ObjGX) _obj_ (ObjGX = objType + structure ..) OGX_SET_INDEX DB-Obj -> complexObj (UTO_obj_load, UTO_stru_2_obj) OGX_SET_OBJ binObj -> complexObj OGX_siz_obj return size of complete ObjGX-Tree; UTO_obj_save copy complexObj -> Memspc UTO_copy_obj copy complexObj -> memory UTO_isol__ duplicate/isolate object (resolve Links) UTO_reloc_obj relocate obj (oGX-tree)
1.6.3