gCAD3D 2.35
ubscrv.c File Reference

b spline curve functions More...

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_math.h"
#include "../ut/ut_TX.h"
#include "../ut/ubs.h"
#include "../ut/ubscrv.h"

Functions

int UCBS_NxtPtBspCrv (Point *Pn, double *tn, CurvBSpl *cv, Point *P, Memspc *workSeg)
 
int UCBS_EvPtBspCrv (Point *pt, CurvBSpl *bspl, double u, Memspc *workSeg)
 
int UCBS_CrssParVecBspCrvs (double **pvTab, Memspc *memSeg, int ncv, CurvBSpl *bspTab)
 
int UCBS_PrepCoons3BspCrvs (CurvBSpl *bspTU, CurvBSpl *bspTV, Memspc *memSeg, CurvBSpl **bspT)
 
int UCBS_TypCon2BspCrvs (CurvBSpl *bsp1, CurvBSpl *bsp2, Memspc *workSeg)
 
int UCBS_RevBspCrv (CurvBSpl *bspr, Memspc *memSeg, CurvBSpl *bsp)
 
int UCBS_XPtsBspCrvNet (Point **xpTab, double **pvTU, double **pvTV, Memspc *memSeg, int cvNrU, CurvBSpl *bspTU, int cvNrV, CurvBSpl *bspTV, Memspc *workSeg)
 
int UCBS_BspCrvPts (CurvBSpl *bsp, Memspc *memSeg, int np, Point *pTab, int deg, int pvType, Memspc *workSeg)
 
int UCBS_CtrlPtsIntpol (Point *cpTab, int np, Point *pTab, int deg, double *kvTab, double *pvTab, Memspc *workSeg)
 
int UCBS_CpyBspCrv (CurvBSpl *bspo, Memspc *memSeg, CurvBSpl *bspi)
 
int UCBS_DifKntsKntVecBspCrv (int *nk, double **nkTab, Memspc *memSeg, int mk, double *mkTab, CurvBSpl *bsp)
 
int UCBS_MrgKntVecBspCrvs (int *mk, double **mkTab, Memspc *memSeg, int nbs, CurvBSpl *bspTab, Memspc *workSeg)
 
int UCBS_RefKntVecBspCrv (CurvBSpl *bspo, Memspc *memSeg, CurvBSpl *bspi, int nk, double *nkTab)
 
int UCBS_NrmKntVecBspCrv (CurvBSpl *bspo, Memspc *memSeg, CurvBSpl *bspi)
 
int UCBS_DegElevBspCrv (CurvBSpl *bspo, Memspc *memSeg, CurvBSpl *bspi, int dup)
 
int UCBS_DirIndIsoBspSur (CurvBSpl *crv, Memspc *memSeg, int degC, int ptNrC, double *kvTabC, int deg2, int ptNr2, double *kvTab2, Point *cpTab, double t, int uv)
 
int UCBS_IsoBspCrvBspSur (CurvBSpl *crv, Memspc *memSeg, SurBSpl *sur, double t, int uv)
 
int UCBS_PtUBspCrv (Point *pt, CurvBSpl *bspl, double u, Memspc *workSeg)
 
int UCBS_OffSurBspCrv (CurvBSpl *offbspl, Memspc *memSeg1, CurvBSpl *bspl, SurBSpl *sur, double offd, Memspc *memSegT[4], Memspc *workSeg)
 
int UCBS_SubDivBspCrv (CurvBSpl *bspl1, Memspc *memSeg1, CurvBSpl *bspl2, Memspc *memSeg2, CurvBSpl *bspl, double t)
 
int UCBS_3BspCrvsBspCrv (CurvBSpl *bsplTab[3], Memspc *memSeg1, CurvBSpl *bspl, Memspc *workSeg)
 
int UCBS_Comp2BspCrvs (CurvBSpl *cvo, Memspc *memSeg, CurvBSpl *cv1, CurvBSpl *cv2, double smf, Memspc *workSeg)
 
int UCBS_MkeCmpBspCrvs (CurvBSpl *bspTab, Memspc *memSeg, int cvNr, CurvBSpl **cvTab, int deg, Memspc *workSeg)
 
int UCBS_TrfKntVecBspCrv (CurvBSpl *bspo, Memspc *memSeg, CurvBSpl *bspi, double scf, double trv)
 

Detailed Description

b spline curve functions

=====================================================
List_functions_start:
UCBS_BspCrvPts Bspline curve <-- points
UCBS_CpyBspCrv Copy <-- bspline curve
UCBS_CrssParVecBspCrvs Cross parametervector <-- bspline curves
UCBS_CtrlPtsIntpol Controlpoints of interpolating bsp.crv. <-- points
UCBS_DegElevBspCrv Degree elevate <-- bspline curve
UCBS_DifKntsKntVecBspCrv Difference knots <-- knotvector, bspline curve
UCBS_DirIndIsoBspSur Dir. indep. isopar. bspline curve <-- bspline surface
UCBS_EvPtBspCrv Evaluate point <-- bspline curve
UCBS_IsoBspCrvBspSur Isoparametric bspline curve <-- bspline surface
UCBS_MkeCmpBspCrvs Compatible bspline curves <-- bspline curves
UCBS_MrgKntVecBspCrvs Merge knotvectors <-- bspline curves
UCBS_NrmKntVecBspCrv Normalize knotvector <-- bspline curve
UCBS_NxtPtBspCrv Next point <-- bspline curve & point
UCBS_OffSurBspCrv Offset surface bspline curve <-- bspline curve
UCBS_PrepCoons3BspCrvs Prepare Coonspatch <-- 3 bspline curves
UCBS_PtUBspCrv Point <-- U-parameter bspline curve
UCBS_RefKntVecBspCrv Refine knotvector <-- bspline curve
UCBS_RevBspCrv Reverse <-- bspline curve
UCBS_SubDivBspCrv Subdivision <-- bspline curve
UCBS_TypCon2BspCrvs Type of connection <-- 2 bspline curves
UCBS_XPtsBspCrvNet Intersection points <-- bspline curve net
UCBS_3BspCrvsBspCrv 3 bspline curves <-- bspline curve
List_functions_end:
=====================================================
- test functions:
UCBS_TestBezBspCrv Test Bezier curves <-- bspline curve
UCBS_TestSegsBspCrv Test segments <-- bspline curve
UCBS_TestSegsRBspCrv Test segments <-- rational bspline curve

Function Documentation

int UCBS_NxtPtBspCrv ( Point Pn,
double *  tn,
CurvBSpl cv,
Point P,
Memspc workSeg 
)
int UCBS_EvPtBspCrv ( Point pt,
CurvBSpl bspl,
double  u,
Memspc workSeg 
)
int UCBS_CrssParVecBspCrvs ( double **  pvTab,
Memspc memSeg,
int  ncv,
CurvBSpl bspTab 
)
int UCBS_PrepCoons3BspCrvs ( CurvBSpl bspTU,
CurvBSpl bspTV,
Memspc memSeg,
CurvBSpl **  bspT 
)
int UCBS_TypCon2BspCrvs ( CurvBSpl bsp1,
CurvBSpl bsp2,
Memspc workSeg 
)
int UCBS_RevBspCrv ( CurvBSpl bspr,
Memspc memSeg,
CurvBSpl bsp 
)
int UCBS_XPtsBspCrvNet ( Point **  xpTab,
double **  pvTU,
double **  pvTV,
Memspc memSeg,
int  cvNrU,
CurvBSpl bspTU,
int  cvNrV,
CurvBSpl bspTV,
Memspc workSeg 
)
int UCBS_BspCrvPts ( CurvBSpl bsp,
Memspc memSeg,
int  np,
Point pTab,
int  deg,
int  pvType,
Memspc workSeg 
)
int UCBS_CtrlPtsIntpol ( Point cpTab,
int  np,
Point pTab,
int  deg,
double *  kvTab,
double *  pvTab,
Memspc workSeg 
)
int UCBS_CpyBspCrv ( CurvBSpl bspo,
Memspc memSeg,
CurvBSpl bspi 
)
int UCBS_DifKntsKntVecBspCrv ( int *  nk,
double **  nkTab,
Memspc memSeg,
int  mk,
double *  mkTab,
CurvBSpl bsp 
)
int UCBS_MrgKntVecBspCrvs ( int *  mk,
double **  mkTab,
Memspc memSeg,
int  nbs,
CurvBSpl bspTab,
Memspc workSeg 
)
int UCBS_RefKntVecBspCrv ( CurvBSpl bspo,
Memspc memSeg,
CurvBSpl bspi,
int  nk,
double *  nkTab 
)
int UCBS_NrmKntVecBspCrv ( CurvBSpl bspo,
Memspc memSeg,
CurvBSpl bspi 
)
int UCBS_DegElevBspCrv ( CurvBSpl bspo,
Memspc memSeg,
CurvBSpl bspi,
int  dup 
)
int UCBS_DirIndIsoBspSur ( CurvBSpl crv,
Memspc memSeg,
int  degC,
int  ptNrC,
double *  kvTabC,
int  deg2,
int  ptNr2,
double *  kvTab2,
Point cpTab,
double  t,
int  uv 
)
int UCBS_IsoBspCrvBspSur ( CurvBSpl crv,
Memspc memSeg,
SurBSpl sur,
double  t,
int  uv 
)
int UCBS_PtUBspCrv ( Point pt,
CurvBSpl bspl,
double  u,
Memspc workSeg 
)
int UCBS_OffSurBspCrv ( CurvBSpl offbspl,
Memspc memSeg1,
CurvBSpl bspl,
SurBSpl sur,
double  offd,
Memspc memSegT[4],
Memspc workSeg 
)
int UCBS_SubDivBspCrv ( CurvBSpl bspl1,
Memspc memSeg1,
CurvBSpl bspl2,
Memspc memSeg2,
CurvBSpl bspl,
double  t 
)
int UCBS_3BspCrvsBspCrv ( CurvBSpl bsplTab[3],
Memspc memSeg1,
CurvBSpl bspl,
Memspc workSeg 
)
int UCBS_Comp2BspCrvs ( CurvBSpl cvo,
Memspc memSeg,
CurvBSpl cv1,
CurvBSpl cv2,
double  smf,
Memspc workSeg 
)
int UCBS_MkeCmpBspCrvs ( CurvBSpl bspTab,
Memspc memSeg,
int  cvNr,
CurvBSpl **  cvTab,
int  deg,
Memspc workSeg 
)
int UCBS_TrfKntVecBspCrv ( CurvBSpl bspo,
Memspc memSeg,
CurvBSpl bspi,
double  scf,
double  trv 
)