gCAD3D 2.40
ut_obj.c File Reference

complex-object-manipulationes (transform, convert ..) (UTO_) More...

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_geo_const.h"
#include "../ut/ut_cast.h"
#include "../ut/ut_ox_base.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_itmsh.h"
#include "../ut/ut_bspl.h"
#include "../ut/ut_rbspl.h"
#include "../ut/ut_plg.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_gtypes.h"
#include "../ut/ut_obj.h"
#include "../ut/func_types.h"
#include "../db/ut_DB.h"
#include "../xa/xa_msg.h"
#include "../xa/xa_mem.h"

Macros

#define TABSIZ   20
 

Functions

 typedef_MemTab (ObjRange)
 
int UTO_dbs_ox (void *dbs, int *form, ObjGX *ox)
 
int UTO_vc_perp_sur (Vector *vco, ObjGX *su1, Point *pti, int iDir, Memspc *tmpMen)
 
int UT3D_vcn_cvo (Vector *vco, Point *pto, ObjGX *oi, Memspc *wrkSpc)
 
void * UTO_obj_save (Memspc *memSpc, ObjGX *oxi)
 
int UTO_invert (ObjGX *oxi)
 
int UTO_ptnr_std_obj (int typ, long ind)
 
int UTO_pt_eval_par1_dbo (Point *pto, double lpar, int typ, long ind)
 
int UTO_pt_midnobj (Point *pto, ObjGX *oa, int oNr)
 
int UTO_parpt_pt_dbo (double *lpar, Point *pti, int typ, long ind)
 
int UTO_set_ptlim (int typ, void *oo, Point *p1, double *v1, Point *p2, double *v2)
 
int UTO_npt_Tes (int *pNr, Point **ppa, ObjGX *os)
 
int UTO_dump__ (ObjGX *oxi, char *txt,...)
 
int UTO_dump_1 (ObjGX *oxi, char *txt,...)
 
int UTO_dump_s_ (ObjGX *oxi, char *txt)
 
int UTO_dump_sWri (ObjGX *oxi, char *cOff)
 
int UTO_dump_s1 (ObjGX *oxi, char *txt)
 
int UTO_ck_nearptnobj (ObjGX *oa, int oNr, Point *pt1)
 
int UTO_siz_stru (int form)
 
int UTO_get_DB (void **oxo, int *oNr, int *otyp, long dbInd)
 
int UTO_sav_ost (int *dbTyp, long *dbInd, int typ, int form, int siz, void *obj)
 
double UTO_par_tot (int oTyp, void *oDat)
 
int UTO_par1_pt_pt_obj (double *po, Point *pti, int oTyp, void *oDat)
 
int UTO_obj_getp (void **objOut, int *oNr, ObjGX *ox1)
 
int UTO_ind_get (int *typ, long *ind, ObjGX *oxp)
 
int UTO_parLim_get_cv (double *v0, double *v1, int form, void *crv)
 
int UTO_stru_inv (int oTyp, void *oDat)
 
int UTO_npt_int_2ox (int *pNr, Point *pa, double *va1, int aSiz, ObjGX *oxi1, ObjGX *oxi2, Memspc *wrkSpc)
 
int UTO_stru_int (int *pNr, Point *pa, double *va1, int o1Typ, void *o1, int o2Typ, void *o2, Memspc *wrkSpc)
 
int UTO_obj_tra_m3 (void *stro, int typ, void *stri, Mat_4x3 trmat)
 
int UTO_pln_mir (Plane *plno, Plane *plni, ObjBin *objMir)
 
int UTO_pt_mir (Point *pto, Point *pti, ObjBin *objMir)
 
int UTO_vc_mir (Vector *vco, Vector *vci, ObjBin *objMir)
 
int UTO_obj_appmir (void *objo, int otyp, void *obji, Memspc *wrkSpc)
 
int UTO_trim_2par1 (void *objo, void *obji, int typ, double v0, double v1, Memspc *memSeg)
 
int UTO_copy_stru (void *oo, int *oSiz, int typ, void *ii, int iNr)
 
int UTO_copy_obj (void *objo, int *oSiz, void *obji)
 
int UTO_copy_tab (void *objo, int *oSiz, void *obji)
 
int UTO_copy_0 (void *objo, int *oSiz, void *obji)
 
int UTO_reloc_obj (ObjGX *oxi, long pDist)
 
int UTO_isol_llt (void *oo, int *oSiz, void *oi)
 
int UTO_isol_ll1 (void *oo, int *oSiz, void *oi)
 
int UTO_isol_l0 (void *objo, int *oSiz, void *obji, int oNr)
 
int UTO_rec_set (ObjGX *oxo, int typ, int form, int siz, void *dat)
 
int UTO_isol__ (void *objo, int *oSiz, void *obji)
 
int UTO_write_endRec (void *outSpc)
 
int UTO_addRange (MemTab *oTab, int iTyp, long ind, long oNr)
 
int UTO_queryRange (MemTab(ObjRange)*rTab, int typ, long ind)
 
int UTO_dumpRange (MemTab(ObjRange)*oTab)
 
int UTO_INT_crv_sur (int *pNr, Point *pa, int typCv, void *o1, ObjGX *su1, Memspc *wrkSpc)
 
int UTO_INT_susu (int *oTyp, void **oDat, int *typ1Tab, long *dbi1Tab, int o1Nr, int *typ2Tab, long *dbi2Tab, int o2Nr, int imod, int outTyp, Memspc *wrkSpc)
 
int UTO_CUT__ (CurvCCV *oo, ObjDB *oi, ObjGX *oc1, ObjGX *oc2, int imod, Memspc *wrkSpc)
 
int UTO2_TNG_vc_obj (Point2 *ptg, Vector2 *vtg, int typ, void *obj, int imod)
 
int UTO2_TNG_pt_obj (Point2 *ptg, int *isolMax, Point2 *pt1, int typ, void *obj, int isol)
 
int UTO2_pt_mid_obj (Point2 *ptc, int typ, void *obj)
 
int UTO_TNG_maxSol (int typ)
 
int UTO_TNG_vc_cv (Line *lno, ObjGX *ox1, ObjGX *ox2, int isol, Memspc *memDat1)
 
int UTO_TNG_cv_cv (Line *lno, ObjGX *ox1, ObjGX *ox2, int isol, Memspc *memDat1)
 
int UTO_cv_cvtrm (int *otyp, void *cvo, void *cvi, CurvCCV *cvtrm)
 
int UTO_cv_ck_clo (int otyp, void *obj)
 
int UTO_cv_ck_dir_clo (int *rev, int *clo, int typ, void *obj)
 
int UTO_ck_surfTyp (ObjGX *oxi)
 
int UTO_MOD_resolv_open (int *ii1, int *ii2, int isol, int ptNr)
 
int UTO_MOD_resolv_closed (int *ii1, int *ii2, int isol, int ptNr)
 
int UTO_MOD_resolv_two_open (int *ii1, int *ii2, int imod, int p1Nr, int p2Nr)
 
int UTO_MOD_resolv_two_closed (int *iRev, int *ii1, int *ii2, int imod, int p1Nr, int p2Nr)
 

Variables

Plane WC_sur_act
 the active construction-plane More...
 
double APT_ModSiz
 
static char TR_obj [OBJ_SIZ_MAX]
 

Detailed Description

complex-object-manipulationes (transform, convert ..) (UTO_)

=====================================================
List_functions_start:
--------- functions for curves: ---------------------
UTO_ck_curvLimTyp check if CurveLimits are Points or parameters
UTO_ck_curvForm check if objTyp is ObjGX or other typ
UTO_cv_ck_clo check if curve is closed
UTO_cv_ck_dir_clo test direction and closed-curve-flag
UTO_parLim_get_cv get limiting parameters for curve
UTO_stru_inv invert object (Typ, struct)
trimmedCurve from DB-lFig (copy curve -> trimmedCurve)
UTO_cv_cvtrm standardCurve from trimmedCurve (CCV)
--------- functions for surfaces: -------------------
UTO_ck_surfTyp returns surfSubTyp
UTO_npt_Tes get table of pointers from tessSurf
--------- functions for all types of objects: -------
UTO_dump__ dump object
UTO_dump_s_ dump obj - structured display
UTO_ck_dbsTyp check object-typ (struct or object)
UTO_ck_typTyp check if 1=curv(LN|AC|CV ) | 2=surf(PLN|A|B)
UTO_ck_nearptnobj find object nearest to point
UTO_siz_stru give size of struct
UT3D_ptNr_obj get nr of points for polygon from obj (cv)
// UTO_ox_dbo get complexObj from DB-obj
// UTO_ox_obj get complexObj from binary-obj
UTO_dbs_ox DB-struct (data for VDPLC, ox for SAB) from ox
UTO_sav_ost create DB-object & save it in Model.
UTO_obj_getp get dataStruct for complexObj; resolv links.
UTO_get_DB get dataStruct from DB-Obj; keep Refs.
UTO_obj_get DO NOT USE get a copy of a complexObj
UTO_get_PT DO NOT USE make ObjX aus ObjGX (Pointer (zB Line*) holen).
UTO_get_LN DO NOT USE
UTO_objx_get DO NOT USE use UTO_obj_getp
UTO_parpt_pt_dbo get parameter from point (obj from typ/ind)
UTO_par1_pt_pt_obj get parameter from point on curve
UTO_par_tot get endParameter - unlimited
UTO_set_ptlim Anfangs- und/oder Endpunkt einer struct setzen
UTO_pt_objind get point from object and ptNr
UTO_ptnr_std_obj get nr of characteristic points for obj
UTO_pt_eval_par1_dbo get point from 0-1-parameter (curve from typ/ind)
UTO_pt_midnobj get midpoint of n objects
UTO2_pt_mid_obj get centerpoint of 2D-obj
UT3D_vcn_cvo Normalvector an (planare) Curve
UT3D_vc_tng_crv_pt vector tangent to curve at point
UTO_INT_susu intersect 2 surfs; result = curve
UTO_INT_crv_sur intersect CRV X SUR; result = points
UTO_npt_int_2ox intersect 2 limited objects where result = points
UTO_stru_int intersect 2 unlim. objects where result = points
//UTO_obj_int intersect obj with 1 cutting-object
UTO_CUT__ trim obj with 1 or 2 cutting-objects
UTO_trim_2par1 trim (modify) obj from dataStruct by 2 parameters
UTO_TNG_cv_cv get tangent curve - curve (P,C,S; not D,A,B)
UTO_TNG_vc_cv get tangent vector - curve (P,C,S; not D,A,B)
UTO2_TNG_vc_obj get point on 2D-curve (tangent from vector)
UTO2_TNG_pt_obj get point on 2D-curve (tangent from point)
UTO_TNG_maxSol return max nr of tangent-solutions for objtype
// UTO_obj_appprj project obj > Plane OBSOLETE: USE UPRJ_app__
UTO_obj_appmir mirror obj about line | plane
UTO_invert DO NOT USE Obj umdrehen (use UTO_stru_inv)
UTO_obj_tra_m3 DO NOT USE transform obj with matrix; use UTRA_app__
UTO_obj_save DO NOT USE Obj (nur struct) speichern (copy -> Memspc)
UTO_copy_obj DO NOT USE copy ObjGX-Table, recursive
UTO_copy_0 DO NOT USE duplicate obj (oGX-tree; keep data-pointers)
UTO_copy_tab DO NOT USE ObjGX-Table (rekursiv) kopieren
UTO_copy_stru DO NOT USE copy struct (ohne resolve - nicht recursiv)
UTO_isol__ DO NOT USE duplicate/isolate object (resolve Links)
UTO_reloc_obj DO NOT USE relocate obj (oGX-tree)
UTO_rec_set DO NOT USE einen Record schreiben, usagenotes
UTO_write_endRec write end-record for tesselated data
UTO_addRange add range to ObjRange
UTO_queryRange query if typ/DB-ind is in ObjRange
List_functions_end:
=====================================================
- see also:
OGX complex-object-functions
UT3D_npt_ox__ objekt -> Polygon umwandeln (../ut/ut_npt.c)
UT2D_void_obj2 DO NOT USE ObjG2-Objekt -> memory kopieren

Macro Definition Documentation

#define TABSIZ   20

Function Documentation

typedef_MemTab ( ObjRange  )
int UTO_dbs_ox ( void *  dbs,
int *  form,
ObjGX ox 
)
* UTO_dbs_ox DB-struct (data for VDPLC, ox for SAB) from ox
* get obj-data for variable,vector,point,line,circ
* get complex-obj for curve,surf,body (with point to data)
* Output:
* dbs size should be OBJ_SIZ_MAX; typ=ox->form
* form struct-type of output; ox.for for VDPLC, Typ_ObjGX for SAB
*
int UTO_vc_perp_sur ( Vector vco,
ObjGX su1,
Point pti,
int  iDir,
Memspc tmpMen 
)
* UTO_vc_perp_sur vector right-angled to surface
* Input:
* iDir 0=perp; 1=parl, 2=across;
*
int UT3D_vcn_cvo ( Vector vco,
Point pto,
ObjGX oi,
Memspc wrkSpc 
)
* Normalvector an (planare) Curve
* Liefert auch den ersten Punkt der Kontur !
* see also UT3D_vc_perppta
* see also UT3D_ptvc_sus (Normalvec) braucht SurStd* !!
* see also UT3D_pta_sus braucht SurStd* !
* see also UT3D_npt_ox__
*
void* UTO_obj_save ( Memspc memSpc,
ObjGX oxi 
)
* UTO_obj_save DO NOT USE copy complexObj -> Memspc
* TODO: make a new OGX_ox_copyMem
* returns Startadress
* see also DB_store_stru
*
int UTO_invert ( ObjGX oxi)
* UTO_invert Obj umdrehen
* implem.: Typ_LN Typ_CI
*
int UTO_ptnr_std_obj ( int  typ,
long  ind 
)
* UTO_ptnr_std_obj get nr of characteristic points for obj
* get points with UT3D_ptvcpar1_std_obj
*
int UTO_pt_eval_par1_dbo ( Point pto,
double  lpar,
int  typ,
long  ind 
)
* UTO_pt_eval_par1_dbo get point from 0-1-parameter (curve from typ/ind)
* ACHTUNG: lpar muss im Bereich 0-1 sein; wird fuer Curves umgerechnet !!
*
* Input:
* typ DB-typ
* ind DB-index
*
*
int UTO_pt_midnobj ( Point pto,
ObjGX oa,
int  oNr 
)
* get midpoint of n objects
* den Mittelpunkt der EingabeElemente suchen;
*
*
int UTO_parpt_pt_dbo ( double *  lpar,
Point pti,
int  typ,
long  ind 
)
* UTO_parpt_pt_dbo get parameter from point (obj from typ/ind)
* ACHTUNG: lpar muss im Bereich 0-1 sein; wird fuer Curves umgerechnet !!
*
int UTO_set_ptlim ( int  typ,
void *  oo,
Point p1,
double *  v1,
Point p2,
double *  v2 
)
* UTO_set_ptlim set start- and/or endpoint of a struct of type <typ>
* Input:
* typ, oo type and struct of obj
* p1 startpoint; NULL=undefined
* v1 parameter startpoint; NULL=undefined (par_0-1)
* p2 endpoint; NULL=undefined
* v2 parameter endpoint; NULL=undefined (par_0-1)
*
* LN: p1 and/or p2; v1, v2 ignored
* AC: (p1 and/or p2) or (v1 and/or v2)
* CVELL: p1, p2 used; v1, v2;
* CVPOL: v1, v2 used; else p1, p2 used;
* CVBSP: v1, v2 used; else p1, p2 used;
* CVRBSP: v1, v2 used; p1, p2;
*
* see UT3D_ptvcpar1_std_obj // get_ptlim get start|endpoint
*
int UTO_npt_Tes ( int *  pNr,
Point **  ppa,
ObjGX os 
)
* get table of pointers from tesselated surface os
* Input:
* pNr size of ppa
* Output:
* pNr nr of points in ppa
*
*
int UTO_dump__ ( ObjGX oxi,
char *  txt,
  ... 
)

dump complex-object (Typ_ObjGX)

int UTO_dump_1 ( ObjGX oxi,
char *  txt,
  ... 
)
int UTO_dump_s_ ( ObjGX oxi,
char *  txt 
)
* dump complex-obj - structured display
* see UTO_dump__ - dump also all subObjects
*
int UTO_dump_sWri ( ObjGX oxi,
char *  cOff 
)
* structured display; write Line
*
int UTO_dump_s1 ( ObjGX oxi,
char *  txt 
)
* structured display
*
int UTO_ck_nearptnobj ( ObjGX oa,
int  oNr,
Point pt1 
)
* find object nearest to point
* den Kreis, dessen Mittelpunkt pt21 am naechsten ist, auswaehlen
* give back its index
*
int UTO_siz_stru ( int  form)
* UTO_siz_stru give size of struct
* form does not have size: 0 returned.
* TODO make it a static table ..
*
int UTO_get_DB ( void **  oxo,
int *  oNr,
int *  otyp,
long  dbInd 
)
*
* UTO_get_DB get DB-data-struct from typ, DB-index
* Returns a pointer to the data-struct.
* Does NOT resolve objRefs (Typ_Index).
* Input:
* otyp dbtyp
* dbInd DB-index
* Output:
* otyp wird bei Typ_CV auf die genaue ObjType korrigiert;
* bei Typ_SUR --> Typ_ObjGX
* oxo Pointer auf die korrekte struct - NICHT auf ObjGX !
* oNr number of structs in oxo
* RetCod 0=OK, data-struct;
* 1=OK, complexObj
* -1=Error (dbo not defined)
*
*
* otyp-in otyp-out struct Grouptype
* Typ_CVTRM Typ_CVTRM CurvCCV 1 // was ObjGX until 2014-06-04
* Typ_Note <Typ_GTXT GText 0>
* Typ_Note <Typ_ATXT AText 0>
* Typ_Note <Typ_Tag AText 0>
* Typ_VAR Typ_VAR double 0
*
*
* see also:
* DB_GetObjGX get complexObj from DB-Obj Keep Refs. Give ObjGX.
* UTO_get_DB get dataStruct from DB-Obj Keep Refs. Give pointer.
* DB_GetObjDat get dataStruct from DB-Obj Resolv Refs. Give pointer.
*
* UTO_obj_getp get dataStruct from ObjGX Resolv Refs. Give pointer.
* UTO_obj_get get dataStruct from ObjGX Resolv Refs. Give a copy.
*
int UTO_sav_ost ( int *  dbTyp,
long *  dbInd,
int  typ,
int  form,
int  siz,
void *  obj 
)
* UTO_sav_ost create DB-object & save it in Model.
*
* Output:
* dbTyp
* dbInd
* RetCod: 0=OK, -1=Err
*
* Example:
* int iTyp;
* long dbi;
* Point pa[]={{0., 0., 0.},{5., 0., 0.},{5., 2., 0.},{7., 0., 0.}};
* UTO_sav_ost (&iTyp, &dbi, Typ_CVPOL, Typ_PT, 4, (void*)pa);
*
* AP_stru_2_txt (NULL, 0, NULL, 0); // init the objNr's before UTO_sav_ost
* ACHTUNG: verwendet mem_cbuf1
*
double UTO_par_tot ( int  oTyp,
void *  oDat 
)

UTO_par_tot get endParameter - unlimited

int UTO_par1_pt_pt_obj ( double *  po,
Point pti,
int  oTyp,
void *  oDat 
)
* UTO_par1_pt_pt_obj get parameter from point on curve
* ACHTUNG: liefert (auch fuer B-Splines) immer Werte zwischen 0-1 !
*
int UTO_obj_getp ( void **  objOut,
int *  oNr,
ObjGX ox1 
)
* UTO_obj_getp get dataStruct from ObjGX
* Returns a pointer to the data-struct from ObjGX
* Referenced objects (Typ_Index) are resolved.
*
* Input:
* ox1 obj as ObjGX
* Output:
* objOut datastruct, typ = RetCode
* RetCod = typ of datastruct (form). CCV: returns Typ_ObjGX.
* -1 = Error
*
* CCV: rc=Typ_ObjGX
* Polygon: rc=Typ_CVPOL; objOut=CurvPoly
* see UTO_get_DB get dataStruct from DB-Obj Keep Refs. Give pointer.
* see DB_GetObjGX DB UTO_obj_get UTO_objx_get
*
int UTO_ind_get ( int *  typ,
long *  ind,
ObjGX oxp 
)
int UTO_parLim_get_cv ( double *  v0,
double *  v1,
int  form,
void *  crv 
)
int UTO_stru_inv ( int  oTyp,
void *  oDat 
)
* UTO_stru_inv invert object (Typ, struct); reverse direction
* modifies oDat !
* changes start/enpoint, dir,
* the resulting curves looks identical !
*
*
int UTO_npt_int_2ox ( int *  pNr,
Point pa,
double *  va1,
int  aSiz,
ObjGX oxi1,
ObjGX oxi2,
Memspc wrkSpc 
)
* intersect 2 limited objects (ox1 X ox2) where result = points
* handles CURV X SURF and CURV X CURV, but not SURF X SURF.
* Input:
* aSiz size of pa, va
* Output:
* pNr number of points in pa
* pa intersectionPoints (if pa != NULL)
* Typ_CVPOL X Typ_Val: returns only va1, not pa.
* va1 corresponding parameters on o1 (if va1 != NULL)
* RetCod:
* 0 OK, 0-<pNr> intersectionpoints in pa.
* -1 Error
*
* VAR PT LN CI VC CV CVPOL CVPSP3 CVBSP CVRBSP CVCCV CVELL CVBEZ CVRBEZ
* CVCLOT CVLNA
* PLN SUR ... SOL ...
* Angle Dist Par1 UVal VVal
*
* TODO: if va1 or pt not given: get tempSpace !
*
*

???

int UTO_stru_int ( int *  pNr,
Point pa,
double *  va1,
int  o1Typ,
void *  o1,
int  o2Typ,
void *  o2,
Memspc wrkSpc 
)
* intersect 2 (unlimited) objects (Typ, struct) where result = points
* handles CURV X SURF and CURV X CURV, but not SURF X SURF.
* Input:
* pNr size of pa
* o1 obj to cut (must be struct, not ObjGX)
* o1Typ type of o1
* o2 cutting obj;
* o2Typ type of o2 (must be struct, not ObjGX)
* o2Typ=Typ_Val: o2=(double*)parameter;
* pa == NULL: no points
* va1 == NULL: no parameters
* Output:
* pNr number of points in pa
* pa intersectionPoints (if pa != NULL)
* Typ_CVPOL X Typ_Val: returns only va1, not pa.
* va1 corresponding parameters on o1 (if va1 != NULL)
* RetCod:
* 0 OK, 0-<pNr> intersectionpoints in pa.
* -1 Error
*
* intersect limited objects: see UTO_npt_int_2ox
* TODO:
* requested output (points|parameters|both) should be
* controlled by a inputParameter.
*
int UTO_obj_tra_m3 ( void *  stro,
int  typ,
void *  stri,
Mat_4x3  trmat 
)
* DO NOT USE - use UTRA_app__
* stro must have enough size for complete object
*
int UTO_pln_mir ( Plane plno,
Plane plni,
ObjBin objMir 
)
int UTO_pt_mir ( Point pto,
Point pti,
ObjBin objMir 
)
int UTO_vc_mir ( Vector vco,
Vector vci,
ObjBin objMir 
)
int UTO_obj_appmir ( void *  objo,
int  otyp,
void *  obji,
Memspc wrkSpc 
)

mirror

int UTO_trim_2par1 ( void *  objo,
void *  obji,
int  typ,
double  v0,
double  v1,
Memspc memSeg 
)
* trim (modify) obj from dataStruct by 2 parameters
* Input:
* obji dataStruct in
* typ type of dataStruct
* v0, v1 parameters 0-1
* Output:
* objo modified dataStruct out.
* oTyp type of outputObj; ed Typ_LN|..
* objo dataStruct of outputObj; maxSiz OBJ_SIZ_MAX.
* RetCod:
*
* see UTO_CUT__
*
int UTO_copy_stru ( void *  oo,
int *  oSiz,
int  typ,
void *  ii,
int  iNr 
)
* UTO_copy_stru copy struct (no resolve - not recursive)
* Input:
* oSiz size of outSpace
* ii obj to copy
* typ type of struct ii
* iNr nr of objects of same type in ii
* Output:
* oSiz remaining size of outSpace
* oo here is a copy of ii
*
* RetCod: copied size
*
int UTO_copy_obj ( void *  objo,
int *  oSiz,
void *  obji 
)
* copy ObjGX-Table, recursive
* Input:
* obji complexObj to be copied
* objo where to save obji
* oSiz free space at objo
* Output:
* objo copy of obji
* oSiz oSiz is reduced (new free size)
* RetCode:
* -1 out of memory-Error
*
* see also UTO_copy_tab DB_store_obj UTRA_app_obj UTO_write_obj
*
int UTO_copy_tab ( void *  objo,
int *  oSiz,
void *  obji 
)
* copy ObjGX-object-data (not parentRecord); recursive.
* Input:
* objo where to save data-records of obji
* oSiz free space at objo
* obji ObjGX-parentRecord (only its data will be copied)
* Output:
* objo all data-records of obji
* oSiz oSiz is reduced (new free size)
* obji data-pointer correctd; points into objo.
* RetCode:
* -1 out of memory-Error
*
* see also DB_store_obj
*
int UTO_copy_0 ( void *  objo,
int *  oSiz,
void *  obji 
)
* DO NOT USE; use OGX_ox_copy__
* copy ObjGX-Record for isolate.
* do not copy/modify .data (or later isolate) <<< NOT YET; using UTO_copy_tab
* obji must be ObjGX !
*
* Input:
* oSiz size of objo; wird recursiv verkleinert !
* obji ist der parentRecord
* Output:
* oSiz freier Restplatz in objo
* RetCode:
* -1 out of memory-Error
*
*
int UTO_reloc_obj ( ObjGX oxi,
long  pDist 
)
* fix all ObjGX-Obj addresses (eg for realloc)
* pDist = (char*)oldAdress - (char*)newAdress
*
* see also tess_reloc_f_ wrl_reloc__ TSU_store (reallokiert auch !)
*
int UTO_isol_llt ( void *  oo,
int *  oSiz,
void *  oi 
)
* resolv LinkTable in oi.
* replace data in oi (oi is already copied)
* add new records (Point*) into oo.
*
int UTO_isol_ll1 ( void *  oo,
int *  oSiz,
void *  oi 
)
* DO NOT USE; use OGX_ox_copy__
* resolv Link in oi.
* replace form und data in oi (oi is already copied)
* add new records into oo.
* Input:
* oi ein ObjGX-Record mit einem Link
*
int UTO_isol_l0 ( void *  objo,
int *  oSiz,
void *  obji,
int  oNr 
)
* DO NOT USE; use OGX_ox_copy__
* die Links (Typ_Index) in obji aufloesen.
* obji ist eine (schon duplizierte) table of oNr ObjGX-records.
* objo nur fuer ganz neue objekte
*
int UTO_rec_set ( ObjGX oxo,
int  typ,
int  form,
int  siz,
void *  dat 
)

DO NOT USE - replaced with OGX_SET_OBJ

int UTO_isol__ ( void *  objo,
int *  oSiz,
void *  obji 
)
* DO NOT USE - use OGX_ox_copy__
* duplicate/isolate object
* isolate = kill links; change Typ_Index --> Typ_<struct> + Address
* die DatenAdressen (.data of structs) werden nicht veraendert.
* Input MUSS ein oGX sein !!!
*
* Input:
* obji (ObjGX*)
* oSiz size of objo; wird recursiv verkleinert !
* Output:
* objo (ObjGX*)
* oSiz freier Restplatz in objo
*
int UTO_write_endRec ( void *  outSpc)

UTO_write_endRec write end-record for tesselated data

int UTO_addRange ( MemTab oTab,
int  iTyp,
long  ind,
long  oNr 
)
int UTO_queryRange ( MemTab(ObjRange)*  rTab,
int  typ,
long  ind 
)
* UTO_queryRange query if typ/DB-ind is in ObjRange
* RetCod:
* 0 yes typ/ind is inside a range-obj;
* -1 no.
*
int UTO_dumpRange ( MemTab(ObjRange)*  oTab)
* RetCod:
* 0 yes typ/ind is inside a range-obj;
* -1 no.
*
int UTO_INT_crv_sur ( int *  pNr,
Point pa,
int  typCv,
void *  o1,
ObjGX su1,
Memspc wrkSpc 
)

Input: Output:

int UTO_INT_susu ( int *  oTyp,
void **  oDat,
int *  typ1Tab,
long *  dbi1Tab,
int  o1Nr,
int *  typ2Tab,
long *  dbi2Tab,
int  o2Nr,
int  imod,
int  outTyp,
Memspc wrkSpc 
)

ATTENTION: needs all memspc ! Input: o1Typ list of types; o1 list of structs; imod solutionNr; 0=nur_erstes, 1=nur_zweites usw outTyp solltyp out: Typ_CVBSP (10) | Typ_CVPOL (8) Output: oTyp TypLN|Typ_CI|Typ_CVBSP|Typ_CVPOL oDat struct of type oTyp RetCod nr of possible solutions

int UTO_CUT__ ( CurvCCV oo,
ObjDB oi,
ObjGX oc1,
ObjGX oc2,
int  imod,
Memspc wrkSpc 
)
* trim obj with 1 or 2 cutting-objects;
* cutting-Parameters:
* typ=Typ_Par1; form=Typ_Float8; value 0-1;
* typ=Typ_Val; form=Typ_Float8; used for knotvalues for BSP's;
*
* Input:
* oi obj to cut!
* oc1 1. cuttingObj or parameter
* oc2 2. cuttingObj or parameter; none: oc2.typ=Typ_Error.
* imod solutionNr; 0=undefined, 1=first sol...
*
* Output:
* oo
* RetCod 1-n nr of possible solutions ..
* -3 object not yet complete
*
*
int UTO2_TNG_vc_obj ( Point2 ptg,
Vector2 vtg,
int  typ,
void *  obj,
int  imod 
)
* get point on 2D-curve (tangent from vector)
* imod 0-n solution-number
* RetCod: nr of solutions
*
int UTO2_TNG_pt_obj ( Point2 ptg,
int *  isolMax,
Point2 pt1,
int  typ,
void *  obj,
int  isol 
)
* get point on 2D-curve (tangent from point)
* isol 0-n; 0=solution-1; 1=solution-2; ..
* -1 Error isol (no solution possible; decrement isol)
*
int UTO2_pt_mid_obj ( Point2 ptc,
int  typ,
void *  obj 
)
int UTO_TNG_maxSol ( int  typ)
int UTO_TNG_vc_cv ( Line lno,
ObjGX ox1,
ObjGX ox2,
int  isol,
Memspc memDat1 
)
* get tangent vector - curve (P,C,S; not D,A,B)
* Input:
* ox1 must be line or vector.
* ox2 P,C,S
* isol 0-n; solution-number
* Output:
* RetCod:
* >0 max nr of solutions
* -1 no solution for isol; decrement isol.
* -2 cannot find solution (internal error)
*
int UTO_TNG_cv_cv ( Line lno,
ObjGX ox1,
ObjGX ox2,
int  isol,
Memspc memDat1 
)
* get tangent curve - curve (P,C,S; not D,A,B)
* Tangent curve-point: point must be first object !
* isol 0-n; 0=solution-1; 1=solution-2; ..
* RetCod:
* >0 max. nr of solutions
* -1 no solution for isol; decrement isol.
* -2 cannot find solution (internal error)
*
int UTO_cv_cvtrm ( int *  otyp,
void *  cvo,
void *  cvi,
CurvCCV cvtrm 
)
* change trimmedCurve into standardCurve
* Input:
* otyp type of struct cvi
* cvi untrimmed curve (basic curve of cvtrm); NULL if unknown
* cvtrm trim-record
* Output:
* otyp exact type of struct cvo
* cvo trimmed curve of type otyp (if size unknown: OBJ_SIZ_MAX);
*
*
int UTO_cv_ck_clo ( int  otyp,
void *  obj 
)
* UTO_cv_ck_clo test if curve is closed; ignore trimmed.
* 360-deg-circ/elli
* returns 1 NO, not closed
* 0 YES, closed
* -2 degenerated.
* TODO: CCV
*
int UTO_cv_ck_dir_clo ( int *  rev,
int *  clo,
int  typ,
void *  obj 
)
* UTO_cv_ck_dir_clo test direction and closed-curve-flag
*
* Output:
* rev direction; 0=forward, 1=reverse;
* clo closed; 0=yes, 1=not_closed. (-1=not set, -2=curve_degenerated)
* RetCod
*
* closed-yes: endpoint == startpoint.
*
int UTO_ck_surfTyp ( ObjGX oxi)
* UTO_ck_surfTyp returns surfSubTyp
* Input:
* oxi su_tab-record
* Output:
*
* see also SUR_ck_typ (get details for surfaces)
*
int UTO_MOD_resolv_open ( int *  ii1,
int *  ii2,
int  isol,
int  ptNr 
)
int UTO_MOD_resolv_closed ( int *  ii1,
int *  ii2,
int  isol,
int  ptNr 
)
int UTO_MOD_resolv_two_open ( int *  ii1,
int *  ii2,
int  imod,
int  p1Nr,
int  p2Nr 
)
int UTO_MOD_resolv_two_closed ( int *  iRev,
int *  ii1,
int *  ii2,
int  imod,
int  p1Nr,
int  p2Nr 
)

Variable Documentation

Plane WC_sur_act

the active construction-plane

double APT_ModSiz
char TR_obj[OBJ_SIZ_MAX]
static