gCAD3D 2.35
tess_ut.c File Reference

write STL, OBJ, WRl files More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_os.h"
#include "../ut/ut_obj.h"
#include "../ut/ut_txfil.h"
#include "../ut/ut_iTab.h"
#include "../ut/ut_cast.h"
#include "../ut/ut_memTab.h"
#include "../db/ut_DB.h"
#include "../ut/func_types.h"
#include "../xa/xa_mem.h"
#include "../xa/xa_tex.h"
#include "../xa/xa.h"

Functions

 typedef_MemTab (ColRGB)
 
int TSU_exp_sm_sur (ObjGX *oxi)
 
int TSU_exp_sm__ (char *mnam, ModelRef *mdr)
 
int TSU_exp_stl1Fac (Point *p1, Point *p2, Point *p3)
 
int TSU_exp_stlFac (ObjGX *oxi)
 
int TSU_exp_objFac (ObjGX *oxi, ColRGB *sCol)
 
int TSU_exp_objCol (int mode, ColRGB *newCol)
 
int TSU_exp_objMtl (int iNr, ColRGB *newCol)
 
int TSU_exp_wrl1Mat (Vector *vcx, Vector *vcz, Point *pto)
 
int TSU_exp_wrl2Mat (Vector *vx, Vector *vz, Point *po)
 
int TSU_exp_wrl1Fac (ObjGX *oxi, ColRGB *sCol)
 
int TSU_exp_dxf1Fac (Point *p1, Point *p2, Point *p3)
 
int TSU_exp_dxfFac (ObjGX *oxi)
 
int TSU_exp_wrl2Tex (Point *pTab, int pNr, int iTex)
 
int TSU_exp_wrl2Fac (ObjGX *oxi, ColRGB *sCol, int iTex)
 
int TSU_exp_fac (ObjGX *oxi)
 
int TSU_exp_wrl2Col (ColRGB *newCol)
 
int TSU_exp_wrlProto (int pnr, void *vp)
 
int TSU_exp_wrlInit (int mode, int ii)
 
int TSU_exp_wrlTexFn (int iTex)
 
int TSU_exp_wrlCol (ColRGB *newCol)
 
int TSU_exp_init (char *mnam)
 
int TSU_exp_close (char *mnam)
 
int TSU_exp_sur (ObjGX *oxi)
 
int TSU_exp_Defaults ()
 
int TSU_exp_Open (char *modNam)
 
int TSU_exp_Ditto (int iNr, char *modNam, ModelRef *mdr)
 
int TSU_exp_Mod (int mode, ModelRef *mdr)
 
int TSU_exp__ (char *mode, char *fnam)
 
int TSU_imp_tess (Memspc *impSpc, char *fnam)
 

Variables

ColRGB AP_defcol
 die DefaultColor des aktiven (sub)Model More...
 
AP_STAT AP_stat
 
static FILE * TSU_fp =NULL
 
static char * TSU_fnam
 
static int TSU_ftyp
 
static int TSU_ptNr
 
static int TSU_facNr
 
static int TSU_errStat
 
static char actModNam [80]
 
static char layNam [] = "0"
 

Detailed Description

write STL, OBJ, WRl files

=====================================================
List_functions_start:
TSU_exp_sm_sur export all faces from Mockup-struct
TSU_exp_sm__ load sm.tess, transform, write
TSU_exp_Open start open subModel or mainModel
TSU_exp_Mod export subModel-Call (Ditto)
TSU_exp_fac wr faces
TSU_exp_stlFac wr faces stl
TSU_exp_stl1Fac wr face stl
TSU_exp_objFac wr face obj
TSU_exp_wrl1Mat wr mat VRML1
TSU_exp_wrl2Mat wr mat VRML2
TSU_exp_wrl1Fac wr faces for VRML1
TSU_exp_wrl2Fac wr faces for VRML2
TSU_exp_wrl2Col wr color VRML2
TSU_exp_wrlCol wr appearance/color VRML
TSU_exp_dxfFac wr faces dxf
TSU_exp_dxf1Fac wr face dxf
TSU_exp_Defaults wr default-colors
TSU_imp_tess import Mockup from file into Mockup-struct
List_functions_end:
=====================================================

Function Documentation

typedef_MemTab ( ColRGB  )
int TSU_exp_sm_sur ( ObjGX oxi)
int TSU_exp_sm__ ( char *  mnam,
ModelRef mdr 
)
int TSU_exp_stl1Fac ( Point p1,
Point p2,
Point p3 
)
int TSU_exp_stlFac ( ObjGX oxi)
int TSU_exp_objFac ( ObjGX oxi,
ColRGB sCol 
)
int TSU_exp_objCol ( int  mode,
ColRGB newCol 
)
mode 0=activate color;
1=write material-libraryFile
write color; obj-spec see ../exp/obj_ut.c
int TSU_exp_objMtl ( int  iNr,
ColRGB newCol 
)

write matl

int TSU_exp_wrl1Mat ( Vector vcx,
Vector vcz,
Point pto 
)
int TSU_exp_wrl2Mat ( Vector vx,
Vector vz,
Point po 
)
int TSU_exp_wrl1Fac ( ObjGX oxi,
ColRGB sCol 
)
int TSU_exp_dxf1Fac ( Point p1,
Point p2,
Point p3 
)
int TSU_exp_dxfFac ( ObjGX oxi)
int TSU_exp_wrl2Tex ( Point pTab,
int  pNr,
int  iTex 
)
int TSU_exp_wrl2Fac ( ObjGX oxi,
ColRGB sCol,
int  iTex 
)
int TSU_exp_fac ( ObjGX oxi)
int TSU_exp_wrl2Col ( ColRGB newCol)
int TSU_exp_wrlProto ( int  pnr,
void *  vp 
)
int TSU_exp_wrlInit ( int  mode,
int  ii 
)
int TSU_exp_wrlTexFn ( int  iTex)
int TSU_exp_wrlCol ( ColRGB newCol)
int TSU_exp_init ( char *  mnam)
int TSU_exp_close ( char *  mnam)
int TSU_exp_sur ( ObjGX oxi)
int TSU_exp_Defaults ( )
int TSU_exp_Open ( char *  modNam)
int TSU_exp_Ditto ( int  iNr,
char *  modNam,
ModelRef mdr 
)
int TSU_exp_Mod ( int  mode,
ModelRef mdr 
)
int TSU_exp__ ( char *  mode,
char *  fnam 
)
int TSU_imp_tess ( Memspc impSpc,
char *  fnam 
)

Variable Documentation

ColRGB AP_defcol

die DefaultColor des aktiven (sub)Model

AP_STAT AP_stat
FILE* TSU_fp =NULL
static
char* TSU_fnam
static
int TSU_ftyp
static
int TSU_ptNr
static
int TSU_facNr
static
int TSU_errStat
static
char actModNam[80]
static
char layNam[] = "0"
static