gCAD3D 2.35
ut_int.c File Reference

intersect More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "../ut/ut_geo.h"
#include "../ut/func_types.h"
#include "../gr/tess_su.h"
#include "../xa/xa_mem.h"

Functions

int INT2_pta_lna (void *oTab, int *oNr, Memspc *wrkSpc)
 
int INT_intplsur (int *oTyp, void **oDat, Plane *pl1, long *sTab, int *sTyp, int sNr, int imod, int outTyp)
 
int INT_intplcon (int *oTyp, void *oSpc, Plane *pli, Conus *coi)
 
int INT_intpltor (int *oTyp, void *oSpc, Plane *pln, Torus *tor)
 
int INT_int_tria_pln (Line *lnTab, int *lnNr, int lnSiz, Triangle *triTab, int triNr, int triSiz, Plane *pln)
 
int INT_ln2pta__ (Memspc *oSpc, Memspc *pSpc, Memspc *tSpc, Line *lnTab, int lnNr)
 
int INT_pta2crv__ (ObjGX *oxo, Memspc *oSpc, Memspc *pSpc, Memspc *tSpc, int imod, int outTyp)
 
int INT_int_tria_tria (Line *lnTab, int *lnNr, int lnSiz, Triangle *tri1Tab, int tri1Nr, int tri1Siz, Triangle *tri2Tab, int tri2Nr, int tri2Siz)
 
int INT_intsursur (int *oTyp, void **oDat, int *s1Typ, long *s1Dbi, int s1Nr, int *s2Typ, long *s2Dbi, int s2Nr, int imod, int outTyp)
 

Detailed Description

intersect

=====================================================
List_functions_start:
INT2_pta_lna connect LineSegments --> Polygon
INT_intplsur Intersect Surface - Plane
INT_intplcon intersect Plane Cone
INT_intsursur Intersect Surface - Surface
INT_int_tria_tria intersect Surface - Surface --> n LineSegments
INT_int_tria_pln intersect Plane - nTriangles --> nLineSegments
INT_ln2pta__ connect LineSegments --> Polygon
INT_pta2crv__ change Polygon to Line Circ Elli or BSpl-Curve
List_functions_end:
=====================================================
- see also:
UTO_obj_int
UTO_obj_trim

Function Documentation

int INT2_pta_lna ( void *  oTab,
int *  oNr,
Memspc wrkSpc 
)
aus den 2D-Linien ein 2D-Polygon machen
das Point2-Polygon wird in oTab zurueckgeliefert, Anzahl oNr wird korrigiert
int INT_intplsur ( int *  oTyp,
void **  oDat,
Plane pl1,
long *  sTab,
int *  sTyp,
int  sNr,
int  imod,
int  outTyp 
)
Intersect Surface - Plane
xSpc is char[OBJ_SIZ_MAX]; Typ_LN: struct Line; else struct ObjGX
sTab *long-Liste von APT-Surfs, Anzahl sNr
Input:
sTyp list of Typ_SUR|Typ_SOL
sTab list of DBi's
imod solutionNr; 0=nur_erstes, 1=nur_zweites usw
outTyp solltyp out: Typ_CVBSP (10) | Typ_CVPOL (8)
Output:
RetCod
>0 max nr of solutions
-1 Err
int INT_intplcon ( int *  oTyp,
void *  oSpc,
Plane pli,
Conus coi 
)
intersect Plane Cone; Output:
oTyp = Typ_LN (Plane parallel zu Konusachse am Mantel)
oTyp = Typ_CI (Plane normal auf Konusachse) ...
oTyp = Typ_CVELL (Plane nicht normal auf Konusachse) ...
irc 0 OK (Circ od Elli out)
irc -1 Plane touches cone (Line out)
irc -2 Plane outside cone
int INT_intpltor ( int *  oTyp,
void *  oSpc,
Plane pln,
Torus tor 
)
intersect Plane Torus; Output:
oTyp = Typ_CI (Plane normal od parallel zu Torusachse) ...
irc 0 OK (Circ od Elli out)
irc -1 Plane touches Torus
irc -2 Plane outside Torus
int INT_int_tria_pln ( Line lnTab,
int *  lnNr,
int  lnSiz,
Triangle triTab,
int  triNr,
int  triSiz,
Plane pln 
)

intersect Plane - nTriangles –> nLineSegments

int INT_ln2pta__ ( Memspc oSpc,
Memspc pSpc,
Memspc tSpc,
Line lnTab,
int  lnNr 
)
connect LineSegments --> Polygon
Bei l1e beginnen; Indextabelle iTab1 aufbauen; gefundene als done markieren.
Dann verkehrt; bei l1a beginnen; eine zweite Indextabelle aufbauen.
Dann beide Tabellen vereinigen und speichern;
(zuerst iTab2 verkehrt und dann iTab1 anhaengen).
dann das ganze (mit den noch nicht bearbeiteten Lines) von vorn.
OUT:
oSpc die Objekdaten; an der Startadresse liegt ein Obj Typ_Group; seine
Members sind 1-n Polygone (ebenfalls als Objekte).
pSpc die Punktdaten
tSpc tempSpace
int INT_pta2crv__ ( ObjGX oxo,
Memspc oSpc,
Memspc pSpc,
Memspc tSpc,
int  imod,
int  outTyp 
)
change Polygon to Line or Circ or Ellipse or BSpl-Curve
oSpc space for Input-Objects (Polygons)
pSpc space for Points
tSpc tempSpace
Input:
oSpc Memspc with group of polygonCurves
imod nr of polygonCurve to change
outTyp Typ_CVBSP (10) | Typ_CVPOL (8)
Output:
oxo LN|Plg|Bsp
RetCod max nr of solutions
int INT_int_tria_tria ( Line lnTab,
int *  lnNr,
int  lnSiz,
Triangle tri1Tab,
int  tri1Nr,
int  tri1Siz,
Triangle tri2Tab,
int  tri2Nr,
int  tri2Siz 
)

intersect Surface - Surface –> n LineSegments (see also INT_int_tria_pln

int INT_intsursur ( int *  oTyp,
void **  oDat,
int *  s1Typ,
long *  s1Dbi,
int  s1Nr,
int *  s2Typ,
long *  s2Dbi,
int  s2Nr,
int  imod,
int  outTyp 
)
Intersect Surface - Surface
oDat is char[OBJ_SIZ_MAX]; Typ_LN: struct Line; else struct ObjGX
sTab *long-Liste von APT-Surfs, Anzahl sNr
imod Index auszugebender Objekte; 0=nur_erstes, 1=nur_zweites usw
Input:
imod solutionNr
outTyp solltyp out: Typ_CVBSP (10) | Typ_CVPOL (8)
RetCod:
>0 max nr of solutions
-1 Err