ut_obj.c File Reference

object FUNCTIONS UTO_ More...

#include "../xa/MS_Def0.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "../ut/ut_cast.h"
#include "../ut/ut_geo.h"
#include "../ut/ut_ox_base.h"
#include "../ut/ut_obj.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_bspl.h"
#include "../ut/ut_plg.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_gtypes.h"
#include "../gr/ut_UI.h"
#include "../db/ut_DB.h"
#include "../xa/xa_mem.h"

Functions

int UTO_pt_tratra (Point *, Point *)
int UTO_pt_trarot (Point *, Point *)
 typedef_MemTab (ObjRange)
int UTO_vc_perp_sur (Vector *vco, ObjGX *su1, Point *pti, int iDir, Memspc *tmpMen)
int UTO_vc_tangcrv (Vector *vco, Point *pti, int typ, void *data, Memspc *tmpMen)
int UT3D_vcn_cvo (Vector *vco, Point *pto, ObjGX *oi, Memspc *wrkSpc)
int UTO_box_obj (Point *pb1, Point *pb2, ObjGX *oxi)
void * UTO_obj_save (Memspc *memSpc, ObjGX *oxi)
int UTO_invert (ObjGX *oxi)
int UTO_2pt_limstru (Point *p1, Point *p2, double *v1, double *v2, int typ, void *o1, int imod)
int UTO_pt_ox (Point **pto, ObjGX *oxi)
int UTO_pt_objind (Point *pto, int typ, long ind, int ptNr)
int UTO_ptnr_obj (int typ, long ind)
int UT_get_ptlim (Point *pte, int typ, long ind, int mode)
int UTO_get_ptlim (Point *pte, ObjGX *oxi, int mode)
int UTO_pt_evpar1dbo (Point *pto, double lpar, int typ, long ind)
int UTO_pt_evpar1ost (Point *pto, int typ, void *pDat, double lpar)
int UTO_pt_midnobj (Point *pto, ObjGX *oa, int oNr)
int UTO_get_parpt (double *lpar, Point *pti, int typ, long ind)
int UTO_limstru_set (int typ, void *oo, Point *p1, double *v1, Point *p2, double *v2, Memspc *wrkSpc)
int UTO_set_ptlim (ObjGX *oxo, Point *pti, int mode)
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)
int UTO_obj_getp (void **objOut, ObjGX *ox1)
int UTO_ind_get (int *typ, long *ind, ObjGX *oxp)
int UTO_obj_get (void *objOut, ObjGX *ox1)
int UTO_stru_inv (int oTyp, void *oDat)
int UTO_stru_int (int *pNr, Point *pa, double *va, int o1Typ, void *o1, int o2Typ, void *o2, Memspc *wrkSpc)
int UTO_stru_tra (void *stro, int typ, void *stri, Mat_4x3 trmat)
int UTO_obj_tra (ObjGX **cvo, ObjGX *cvi, 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_obj_apptra (void *objo, int otyp, void *obji, Memspc *wrkSpc)
int UTO_copy_stru (void *oo, int *oSiz, int typ, void *ii, int iNr)
int UTO_obj_Disp__ (ObjGX *ox1, int att)
int UTO_obj_Draw__ (long *ind, int att, ObjGX *ox1)
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__ (ObjGX *oo, ObjGX *oi, ObjGX *oc1, ObjGX *oc2, int imod, Memspc *wrkSpc)

Variables

double APT_ln_len
static char TR_obj [OBJ_SIZ_MAX]
int(* UTO_pt_tr )(Point *, Point *)

Detailed Description

object FUNCTIONS UTO_

=====================================================
Liste_Funktionen_Beginn:

--------- functions for curves: ---------------------
UTO_ck_curvLimTyp       check if CurveLimits are Points or parameters
UTO_ck_curvForm         check if objTyp is ObjGX or other typ
UT3D_vcn_cvo            Normalvector an (planare) Curve
UTO_vc_tangcv           vector tangent to curve


--------- 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_s_             dump obj - structured display
UTO_dump__              dump object
UTO_dump_obj            dump object
UTO_ck_oTyp             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

UTO_obj_Disp__          temp. display of ObjGX-structs
UTO_obj_Draw__          temp. display of ObjGX-structs
UTO_obj_Disp_Sur        temp. display of surfaces

UTO_sav_ost             create DB-object & save it in Model.

UTO_obj_getp            get obj-pointer from oGX-struct
UTO_obj_get             Obj einlesen (liefert Daten)
UTO_get_DB              get dataStruct from DB-Obj Keep Refs.
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_get_parpt           get parameter from point (obj from typ/ind)
UTO_limstru_set         Anfangs- und/oder Endpunkt einer struct setzen
UTO_2pt_limstru         get limits (Anfangs- und Endpunkt)
UTO_get_ptlim           Anfangs oder Endpunkt einlesen (LN, AC). DO NOT USE
UTO_set_ptlim           Anfangs oder Endpunkt setzen (LN, AC).
UT_get_ptlim            ?
UTO_pt_ox               get typical point for omplex-obj
UTO_pt_objind           get point from object and ptNr
UTO_ptnr_obj            get nr of points of obj (polygon ..)
UTO_pt_evpar1dbo        get point from 0-1-parameter (curve from typ/ind)
UTO_pt_evpar1ost        get point on Obj from Typ/struct from parameter 0-1
UTO_pt_midnobj          get midpoint of n objects

UTO_stru_inv            invert object (Typ, struct)

UTO_stru_tra
UTO_obj_apptra          translate obj
UTO_obj_tra             translate (dzt nur curves)  REPLACE WITH UTRA_app_obj !!

UTO_INT_susu            intersect 2 surfs; result = curve
UTO_INT_crv_sur         intersect CRV X SUR; result = points
UTO_stru_int            intersect 2 objects (Typ, struct)
//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_obj_appprj          project obj > Plane         OBSOLETE: USE UPRJ_app__

UTO_obj_appmir          mirror
UTO_pt_mir
UTO_vc_mir
UTO_pln_mir

UTO_box_obj             Box mit obj vergroessern
UTO_invert              DO NOT USE       Obj umdrehen   (use UTO_stru_inv)

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
UTO_dumpRange

Liste_Funktionen_Ende:
=====================================================

- see also:
OGX                     complex-object-functions
UT3D_pta_obj            objekt  -> Polygon umwandeln (../ut/ut_ccv.c)
UT2D_void_obj2  DO NOT USE        ObjG2-Objekt -> memory kopieren

Function Documentation

int UTO_pt_tratra ( Point po,
Point pi 
)

Translate Point via UTO_obj_apptra

int UTO_pt_trarot ( Point po,
Point pi 
)

rotate Point via UTO_obj_apptra

typedef_MemTab ( ObjRange   ) 
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 UTO_vc_tangcrv ( Vector vco,
Point pti,
int  typ,
void *  data,
Memspc *  tmpMen 
)

    UTO_vc_tangcv           vector tangent to curve
    Input:
      typ   type of curve 
      data  curve-data

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_ptvc_sus (Normalvec) braucht SurStd* !!
    see also APT_DrawCurv
    see also UT3D_pta_sus  braucht SurStd* !
    see also UT3D_pta_obj

int UTO_box_obj ( Point pb1,
Point pb2,
ObjGX oxi 
)

    Box mit obj vergroessern; Box muss auf Maximum initialisiert sein !
    siehe DL_ReScale_pt_ini
    uses UT3D_box_extend

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_AC

int UTO_2pt_limstru ( Point p1,
Point p2,
double *  v1,
double *  v2,
int  typ,
void *  o1,
int  imod 
)

    UTO_2pt_limstru         get limits (startpoint, endpoint, parameters)
    
    Input:
      p1        keine Ausgabe von Anfangspunkt bei (p1 == NULL)
      p2        keine Ausgabe von Endpunkt bei (p2 == NULL)
      imod = 0  parametrierte Curves: es werden Limitpoints errechnet
      imod = 1  parametrierte Curves: nur Parameters liefern.
    
    Output:
      *v1 u *v2 only for CVBSP, CVPOL ..

int UTO_pt_ox ( Point **  pto,
ObjGX oxi 
)
int UTO_pt_objind ( Point pto,
int  typ,
long  ind,
int  ptNr 
)

get point from object and ptNr

int UTO_ptnr_obj ( int  typ,
long  ind 
)

UTO_ptnr_obj get nr of points of obj (polygon ..)

int UT_get_ptlim ( Point pte,
int  typ,
long  ind,
int  mode 
)

DO NOT USE - use UTO_2pt_limstru

int UTO_get_ptlim ( Point pte,
ObjGX oxi,
int  mode 
)

    UTO_get_ptlim           get start- or endpoint of line/curve..
    mode = 1 = get Startpoint
    mode = 2 = get Endpoint
   
    see also UTO_2pt_limstru

int UTO_pt_evpar1dbo ( Point pto,
double  lpar,
int  typ,
long  ind 
)

    UTO_pt_evpar1dbo          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
    
    see also UT3D_pt_evparcrv UTO_obj_int UTO_stru_int UTO_pt_evpar1ost

int UTO_pt_evpar1ost ( Point pto,
int  typ,
void *  pDat,
double  lpar 
)

    UTO_pt_evpar1ost         get point on Obj from Typ/struct from parameter 0-1
    
    see UTO_pt_evpar1dbo UT3D_pt_evparcrv

int UTO_pt_midnobj ( Point pto,
ObjGX oa,
int  oNr 
)

    get midpoint of n objects
    den Mittelpunkt der EingabeElemente suchen;
    
    see UT3D_pt_gcp_tria

int UTO_get_parpt ( double *  lpar,
Point pti,
int  typ,
long  ind 
)

    UTO_get_parpt           get parameter from point (obj from typ/ind)
    ACHTUNG: lpar muss im Bereich 0-1 sein; wird fuer Curves umgerechnet !!
    see UT3D_pt_evparcrv

int UTO_limstru_set ( int  typ,
void *  oo,
Point p1,
double *  v1,
Point p2,
double *  v2,
Memspc *  wrkSpc 
)

    UTO_limstru_set         set start- and/or endpoint of a struct of type <typ>
    
    LN,AC,CVELL: set p1, p2.
    CVPOL: set v1, v2; p1,p2 unused !
    CVBSP: if v1/v2 = UT_VAL_MAX:  use p1/p2; else use v1,v2
    
    see UTO_set_ptlim

int UTO_set_ptlim ( ObjGX oxo,
Point pti,
int  mode 
)

    UTO_set_ptlim           Anfangs oder Endpunkt setzen (LN, AC).
    mode = 1 = set Startpoint
    mode = 2 = set Endpoint
    
    geht nur bei direkten Daten - nicht mit Indexen !!
    
    see UTO_limstru_set

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
    
    see also: UT3D_pta_obj GL_Disp_sur

int UTO_dump__ ( ObjGX oxi,
char *  txt,
  ... 
)

dump object DO NOT USE - use UT3D_dump__

int UTO_dump_1 ( ObjGX oxi,
char *  txt,
  ... 
)
int UTO_dump_s_ ( ObjGX oxi,
char *  txt 
)

    dump complex-obj - structured display
    see UTO_dump__ UTO_dump_1

int UTO_dump_sWri ( ObjGX oxi,
char *  cOff 
)

    structured display; write Line
    see UTO_dump_1

int UTO_dump_s1 ( ObjGX oxi,
char *  txt 
)

    structured display
    see UTO_dump_1

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.

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).
    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          Grouptype of oxo: 0=data-struct; 1=complexObj
                      -1=Error
   
   
     otyp-in     otyp-out    struct   Grouptype
     Typ_PT      Typ_PT      Point       0
     Typ_VC      Typ_VC      Vector      0
     Typ_LN      Typ_LN      Line        0
     Typ_CI      Typ_CI      Circ        0
     Typ_PLN     Typ_PLN     Plane       0
     Typ_CVPOL   Typ_CVPOL   CurvPoly    0
     Typ_CVELL   Typ_CVELL   CurvElli    0
     Typ_CVBSP   Typ_CVBSP   CurvBSpl    0
     Typ_CVRBSP  Typ_CVRBSP  CurvRBSpl   0
     Typ_CVCLOT  Typ_CVCLOT  CurvClot    0
     Typ_CVCCV   Typ_CVCCV   ObjGX       1
     Typ_SUR     Typ_SUR     ObjGX       1
     Typ_SOL     Typ_SOL     ObjGX       1
     Typ_Tra     Typ_Tra     ObjGX       1
     Typ_Note   <Typ_GTXT    GText       0>
     Typ_Note   <Typ_ATXT    AText       0>
     Typ_Note   <Typ_Tag     AText       0>
     Typ_Model   Typ_Model   ModelRef    0
     Typ_VAR     Typ_VAR     double      0
     Typ_Activ   Typ_Activ   Activity    0
   
   
    see also:
    DB_GetObjGX    get complexObj from DB-Obj Keep Refs.   Give ObjGX.
    UTO_obj_getp   get dataStruct from ObjGX  Resolv Refs. Give pointer.
    UTO_obj_get    get dataStruct from ObjGX  Resolv Refs. Give a copy.
    UTO_get_DB     get dataStruct from DB-Obj Keep Refs.   Give pointer.
    DB_GetObjDat   get dataStruct from DB-Obj Resolv Refs. Give pointer.

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.
      via AP_obj_2_txt ED_add_Line
    
    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

int UTO_obj_getp ( void **  objOut,
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
    
    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_obj_get ( void *  objOut,
ObjGX ox1 
)

    UTO_obj_get                    get dataStruct from ObjGX
      Returns a copy of the dataStruct, not a pointer.
      Referenced objects (Typ_Index) are resolved.
    cplxObj -> binObj (copy)

int UTO_stru_inv ( int  oTyp,
void *  oDat 
)

    UTO_stru_inv            invert object (Typ, struct)
    
    ACHTUNG: es wird nur die Drehrichtung umgedreht; die Geometrie bleibt
      optisch ganz gleich !!
    
    see also UT3D_vc_invert UT3D_pl_invert UT3D_cv_inv UT3D_m3_invm3 

int UTO_stru_int ( int *  pNr,
Point pa,
double *  va,
int  o1Typ,
void *  o1,
int  o2Typ,
void *  o2,
Memspc *  wrkSpc 
)

    intersect 2 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
      o2    cutting obj;
        o1, o2: nur structs (keine ObjGX !)
        o2Typ=Typ_Val: o2=(double*)parameter;
    Output:
      pNr   number of points in pa
      pa    intersectionPoints
      va    corresponding parameter; not for all funcs.
    RetCod:
       0    OK, 0-<pNr> intersectionpoints in pa.
      -1    Error
   
    Typ_CVPOL X Typ_Val:  returns only va, not pa.
    TODO:
      requested output (points|parameters|both) should be
        controlled by a inputParameter.

int UTO_stru_tra ( void *  stro,
int  typ,
void *  stri,
Mat_4x3  trmat 
)

    better use UTRA_app__
    siehe UTO_obj_tra

int UTO_obj_tra ( ObjGX **  cvo,
ObjGX cvi,
Mat_4x3  trmat 
)

    DO NOT USE
    REPLACE WITH UTRA_app_obj !!

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 UT3D_pt_evparcrv
    see UTO_stru_int
    see UTO_CUT__

int UTO_obj_apptra ( void *  objo,
int  otyp,
void *  obji,
Memspc *  wrkSpc 
)

    init Translation: UTO_obj_apptra (NULL, Typ_VC, &translVector);
    init Rotation:    UTO_obj_apptra (NULL, Typ_TraRot, (TraRot*)&TrRorStru);
                        (TrRorStru: Matrix muss mit UT3D_m3_inirot geladen sein)
    see UTO_stru_tra oder UTO_obj_tra
    
    Input:  obji immer eine struct (auch bei Typ_CV !)
    Output: objo immer eine struct (auch bei Typ_CV !)
    wrkSpc wird nur fuer Curves benutzt (kann bei PT/LN/AC NULL sein)

int UTO_copy_stru ( void *  oo,
int *  oSiz,
int  typ,
void *  ii,
int  iNr 
)

    UTO_copy_stru           copy struct (no resolve - not recursive)
    see OGX_ox_copy_obj DB_store_stru
      oo    outSpace;
      oSiz  size of outSpace; wird korrigiert.
      ii    iNr Objekte vom Typ typ. 
      iNr   Anzahl Objekte vom Typ typ.
    
    RetCod: copied size

int UTO_obj_Disp__ ( ObjGX ox1,
int  att 
)

    Input:
      ox1 
      wrkSpc   necessary for TypCV, else NULL
      att
    
    see UTO_obj_Draw__ GR_Disp_ost GR_Disp_dbo GR_Draw_dbo

int UTO_obj_Draw__ ( long *  ind,
int  att,
ObjGX ox1 
)

    Input:
      ind      DispListIndex; get it from DL_StoreObj
      att      Points: 0=normal, black;  1=red (hilited);
      ox1 
    
    see UTO_obj_Disp__ GR_Disp_ost GR_Disp_dbo GR_Draw_dbo
        APT_DrawCurv GR_DrawCurv

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 
)

    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
   
    see also UTO_copy_obj UTO_obj_save

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 
)

    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 
)

    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_AC|Typ_CVBSP|Typ_CVPOL oDat struct of type oTyp RetCod nr of possible solutions

int UTO_CUT__ ( ObjGX oo,
ObjGX 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;
   
    RetCod:
      1-n  = nr of possible solutions ..
    
    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...


Variable Documentation

double APT_ln_len
char TR_obj[OBJ_SIZ_MAX] [static]
int(* UTO_pt_tr)(Point *, Point *)
Generated on Fri Apr 6 09:40:09 2012 for gCAD3D by  doxygen 1.6.3