gCAD3D 2.35
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_ox_base.h"
#include "../ut/func_types.h"
#include "../db/ut_DB.h"
#include "../xa/xa_mem.h"

Functions

 typedef_MemTab (Point)
 
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 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, GridBoxH *gb)
 
int UT3D_grd_ptya (MemTab(Point)*pmt, GridBoxH *gb, double *da)
 
int UT3D_pta_ox_lim (int *ptn, Point *pta, ObjGX *oxi, int iLim, int *limTab, double tol)
 

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_pta_plg Polygon from PolygonCurve
UT3D_pta_bsp Polygon from bSpline
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

typedef_MemTab ( Point  )
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 
)
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'
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,
GridBoxH gb 
)
UT3D_grd_pta add gridbox-points to MemTab(Point)
RetCod: total nr of points
Output: Points x1y1z1 x2y1z1 x3y1z1 x1y2z1 ..
int UT3D_grd_ptya ( MemTab(Point)*  pmt,
GridBoxH 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 
)
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.
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.