gCAD3D 2.40
ut_cvtrm.c File Reference

CVTRM = trimmed-curve functions. More...

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

Functions

int CVTRM__rev (CurvCCV *cvtrm)
 
int CVTRM__obj (CurvCCV *cvtrm, int form, void *data, long dbi)
 
int CVTRM__plg_2par (CurvCCV *cvo, double *kv0, double *kv1, long dbi, CurvPoly *plg)
 
int CVTRM_basCv_trmCv (int *pTyp, long *pDbi, void **basCv, CurvCCV *tcv)
 
int CVTRM_ck_cyc (CurvCCV *cvt)
 
int UT3D_obj_ccv_segnr (int *typ, void *obj, int is, ObjGX *cv1)
 
int UT3D_pt_ccv_segnr_par1 (Point *po, int is, double ps, ObjGX *cv1)
 
int UT3D_vcn_cvtrm (Vector *vco, Point *pto, ObjGX *oi, Memspc *wrkSpc)
 
int CVTRM_basCv_trmCv_con (CurvCCV *cv2, CurvCCV *cv1, int form, void *cvBas)
 
int CVTRM__basCv__ (CurvCCV *cv2, void **data, CurvCCV *cv1)
 
int CVTRM_par1_con (double *ov0, double *ov1, double *iv0, double *iv1, int idir, int icyc)
 
int CVTRM__dbo (CurvCCV *cvtrm, int typ, long dbi)
 
int CVTRM__plg_iseg (CurvCCV *cvo, int iseg, long dbi, CurvPoly *plgi)
 

Detailed Description

CVTRM = trimmed-curve functions.

=====================================================
List_functions_start:
CVTRM_ck_cyc check if trimmed-curve passes tru end-startpoint
CVTRM__rev reverse trimmed-curve (same curve, different direction)
CVTRM__dbo create trimmedCurve from DB-lFig
CVTRM__obj create trimmed-curve from obj (form,struct,dbi)
CVTRM__plg_2par create trimmed-curve from polygon and parameters
CVTRM__plg_iseg get trimmed-curve from segment of polygon
UT3D_obj_ccv_segnr get obj (typ,data) from segment of CCV.
CVTRM_basCv_trmCv get basic-curve of trimmed-curve (typ,dbi,obj)
CVTRM__basCv__ get updated trimmedCurve (direct ref to basic-curve)
CVTRM_basCv_trmCv_con get trimmedCurve of parent-trimmedCurve
CVTRM_par1_con translate parameters from child-curve to parent-curve
CVTRM_parent_ccv DO NOT USE get parent of a trimmedCurve
// UT3D_seg_objSel Segmentnummer am Polygon liefern
// UT3D_seg_dboSel Segmentnummer am Polygon liefern
// UT3D_segpar_dboSel den selektieren Punkt am obj feststellen
// UT3D_segpar_ccvSel give segmentnr & parameter for point on ccv
// UT3D_ccv_contour create Obj CCV from contours
// UT3D_ln_ccv_pt make line from trimmed-curve and previous curve
// UT3D_pt_segparccv Punkt <-- segNr und Paramter auf CCV
// UT3D_obj_segccv get ObjGX from segNr in CCV
// UT3D_crv_segccv get ObjGX + data from segment in CCV
// UT3D_stru_segccv copy struct(LN/AC) <-- segNr in CCV
List_functions_end:
=====================================================
- see also:
UT3D_pt_ccv_segnr_par1 get point from segment-nr and parameter on CCV
UT3D_vcn_cvtrm Normalvector for trimmed-curve
UTO_cv_cvtrm change trimmedCurve into standardCurve

Function Documentation

int CVTRM__rev ( CurvCCV cvtrm)
int CVTRM__obj ( CurvCCV cvtrm,
int  form,
void *  data,
long  dbi 
)
int CVTRM__plg_2par ( CurvCCV cvo,
double *  kv0,
double *  kv1,
long  dbi,
CurvPoly plg 
)
* CVTRM__plg_2par get trimmed-curve from polygon and parameters
* Input:
* kv0,kv1 knotvalues v0,v1
* dbi DB-index of plgi
* plgi polygon | NULL
* Output:
* cvo single trimmed-curve
*
int CVTRM_basCv_trmCv ( int *  pTyp,
long *  pDbi,
void **  basCv,
CurvCCV tcv 
)
int CVTRM_ck_cyc ( CurvCCV cvt)
* CVTRM_ck_cyc check if trimmed-curve passes tru end-startpoint
*
* retCod: 0 = yes,cyclic; curve is passing tru endpoint/startpoint
* 1 = no, curve does not pass tru endpoint/startpoint
* (but can start at startpoint or end at endpoint)
*
int UT3D_obj_ccv_segnr ( int *  typ,
void *  obj,
int  is,
ObjGX cv1 
)
* UT3D_obj_ccv_segnr get obj (typ,data) from segment of CCV.
* Returns only curves; points are returned as lines.
* Input:
* cv1 ObjGX with typ=Typ_CVTRM
* is subCurve-nr; 0=first.
* Output:
* typ
* obj struct is typ; size must be OBJ_SIZ_MAX
*
int UT3D_pt_ccv_segnr_par1 ( Point po,
int  is,
double  ps,
ObjGX cv1 
)
* UT3D_pt_ccv_segnr_par1 get point from segment-nr and parameter on CCV
* is segmentNr; 0=first
*
int UT3D_vcn_cvtrm ( Vector vco,
Point pto,
ObjGX oi,
Memspc wrkSpc 
)
int CVTRM_basCv_trmCv_con ( CurvCCV cv2,
CurvCCV cv1,
int  form,
void *  cvBas 
)
* make cv2 = combined curve of cv2 on cv1 on basicCurve
* Input:
* form,cvBas
* cv1 v0,v1 of cv1 refers to cvBas
* cv2 v0,v1 of cv2 refers to cv1
* Output:
* cv2 v0,v1 of cv2 refers to cvBas
*
int CVTRM__basCv__ ( CurvCCV cv2,
void **  data,
CurvCCV cv1 
)
int CVTRM_par1_con ( double *  ov0,
double *  ov1,
double *  iv0,
double *  iv1,
int  idir,
int  icyc 
)
* CVTRM_par1_con translate parameters from child-curve to parent-curve
* Input:
* ov0, ov1 parameters of child-curve; curve is part of parent-curve iv0-iv1
* iv0, iv1 parameters of parent-curve
* idir 0=qqsame dir as parent-curve; 1=not,revers
* icyc 0=child-curve_is_cyclic (passes tru start-endPoint); 1=not
* Output:
* ov0, ov1 = parameters of child-curve on parent-curve iv0-iv1
*
int CVTRM__dbo ( CurvCCV cvtrm,
int  typ,
long  dbi 
)

create trimmedCurve from DB-lFig (copy curve -> trimmedCurve)

int CVTRM__plg_iseg ( CurvCCV cvo,
int  iseg,
long  dbi,
CurvPoly plgi 
)
* CVTRM__plg_iseg get segment of polygon
* Input:
* dbi DB-index of plgi
* plgi polygon | NULL
* iseg index of segment to extract; 0=first.
* Output:
* cvo single trimmed-curve
*