gCAD3D 2.40
ut_npt.c File Reference

polygons from curves, surfaces ... More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_cast.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_itmsh.h"
#include "../ut/ut_ox_base.h"
#include "../ut/func_types.h"
#include "../db/ut_DB.h"
#include "../xa/xa_mem.h"

Functions

int UT3D_npt_tria (Point *pa, Triangle *tria1)
 
int UT3D_npt_fac (Point *pa, Fac3 *fac1, Point *pTab)
 
int UT3D_npt_trmCv (int *ptNr, Point *pTab, int ptSiz, CurvCCV *cvt, double tol, int mode)
 
int UT3D_ptNr_obj (int typ, void *data, double tol)
 
int UT3D_pta_sus (int *ptNr, Point *pTab, SurStd *sus, double tol)
 
int UT3D_npt_ox__ (int *ptNr, Point *pTab, ObjGX *oxi, double tol)
 
int UT3D_npt_obj (int *ptNr, Point *pTab, int ptSiz, int typ, void *data, int siz, double tol, int mode)
 
int UT3D_pta_plg (int *ptNr, Point *pTab, CurvPoly *plg)
 
int UT3D_pta_bsp (int *ptNr, Point *pTab, CurvBSpl *cvi, int ptMax, double tol)
 
int UT3D_grd_pta (MemTab(Point)*pmt, GridBox *gb)
 
int UT3D_grd_ptya (MemTab(Point)*pmt, GridBox *gb, double *da)
 
int UT3D_pta_ox_lim (int *ptn, Point *pta, ObjGX *oxi, int iLim, int *limTab, double tol, int mode)
 

Detailed Description

polygons from curves, surfaces ...

=====================================================
List_functions_start:
UT3D_ptNr_obj get nr of points for polygon from obj (cv)
UT3D_pta_ox_lim polygon and segNr from complex-obj (eg CCV)
UT3D_npt_ox__ polygon from complex-obj (eg CCV)
UT3D_npt_obj Polygon from bin-obj (typ,struct)
UT3D_npt_trmCv polygon from trimmed-curve
UT3D_pta_plg Polygon from PolygonCurve
UT3D_pta_bsp Polygon from bSpline
UT3D_npt_fac closed polygon (4 points) from indexed-triangle (Fac3)
UT3D_npt_tria closed polygon (4 points) from Triangle
UT3D_pta_sus SurStd-Boundary -> Polygon umwandeln
UT3D_grd_pta add gridbox-points to MemTab(Point)
UT3D_grd_ptya add gridbox-points with y-valTab to MemTab(Point)
List_functions_end:
=====================================================
see also:
UT3D_npt_clot polygon from planar curve (clotoid)
UT3D_pta_plg polygon from CurvPoly (polygon)
UT3D_cv_sru_ INTERNAL
UT3D_cv_ci polygon from circle
UT3D_npt_ci circular polygon

Function Documentation

int UT3D_npt_tria ( Point pa,
Triangle tria1 
)
int UT3D_npt_fac ( Point pa,
Fac3 fac1,
Point pTab 
)
int UT3D_npt_trmCv ( int *  ptNr,
Point pTab,
int  ptSiz,
CurvCCV cvt,
double  tol,
int  mode 
)
* UT3D_npt_trmCv polygon from trimmed-curve
* mode 0=perm, fix PRCV; 1=temp, do not use PRCV; 2=unknown
* RetCod: 0=OK; -1=Error; -2=pTab_overflow;
*
int UT3D_ptNr_obj ( int  typ,
void *  data,
double  tol 
)
* UT3D_ptNr_obj get nr of points for polygon from obj (cv)
* RetCode: >0 nr of points;
*
int UT3D_pta_sus ( int *  ptNr,
Point pTab,
SurStd sus,
double  tol 
)
int UT3D_npt_ox__ ( int *  ptNr,
Point pTab,
ObjGX oxi,
double  tol 
)
* UT3D_npt_ox__ polygon from complex-obj (eg CCV)
* Input:
* ptNr max Nr of points !
* oxi curve
* Output:
* ptNr Nr of points
* pTab[ptNr] polygon
* RetCod: 0=OK; -1=Error; -2=pTab_overflow;
*
int UT3D_npt_obj ( int *  ptNr,
Point pTab,
int  ptSiz,
int  typ,
void *  data,
int  siz,
double  tol,
int  mode 
)
* UT3D_npt_obj Polygon from bin-obj (typ,struct)
* Input:
* ptNr nr of output-points already in pTab (index of 1. unused point)
* ptSiz size of pTab
* typ type of struct in data
* data curve
* siz nr of objects of type 'typ' in 'data'
* mode 0=perm, fix PRCV; 1=temp, do not use PRCV; 2=unknown
* Output:
* ptNr nr of output-points in pTab
* pTab[ptNr] polygon
* RetCod: 0=OK; -1=Error; -2=pTab_overflow;
*
int UT3D_pta_plg ( int *  ptNr,
Point pTab,
CurvPoly plg 
)
int UT3D_pta_bsp ( int *  ptNr,
Point pTab,
CurvBSpl cvi,
int  ptMax,
double  tol 
)
int UT3D_grd_pta ( MemTab(Point)*  pmt,
GridBox gb 
)
* UT3D_grd_pta add gridbox-points to MemTab(Point)
* Input:
* gb->p1 must be set to startPoint of grid
* gb ix,iy number of rows/columns
* gb dx,dy offset rows/columns
* Output:
* pmt all gridPoints are added; x1y1z1 x2y1z1 x3y1z1 x1y2z1 ..
* RetCod: total nr of points
*
int UT3D_grd_ptya ( MemTab(Point)*  pmt,
GridBox gb,
double *  da 
)
* UT3D_grd_ptya add gridbox-points with y-valTab to MemTab(Point)
* Input:
* da y-values
* RetCod: total nr of points
* Output: Points x1y1z1 x2y1z1 x3y1z1 x1y2z1 ..
*
int UT3D_pta_ox_lim ( int *  ptn,
Point pta,
ObjGX oxi,
int  iLim,
int *  limTab,
double  tol,
int  mode 
)
* UT3D_pta_ox_lim get polygon and segNr from complex-obj (eg CCV)
* Input:
* ptn max Nr of points !
* iLim 0 do not fill limTab;
* >0 fill limTab; iLim == size of limTab.
* mode 0=perm, fix PRCV; 1=temp, do not use PRCV; 2=unknown
* OutPut:
* limTab points to startIndices of the segnments into pta; terminated by -1.
* can be NULL
* pta[limTab[1]] = startPoint of 2. segment;
* pta[limTab[2]] = startPoint of 3. segment ..
* size must be (oxi->segNr + 1)
* retCod 0=OK; -1=Err.
*
*