gCAD3D 2.35
ut_prcv.c File Reference

polygonal_representation_of_curve (struct CurvPrcv) More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_geo_const.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_os.h"
#include "../db/ut_DB.h"
#include "../xa/xa_mem.h"


#define PRCV0_INC_PTNR   256


int PRCV_free__ ()
int PRCV_npt_dbo__ (Point **pta, int *ptNr, int typ, long dbi, int mdli)
int PRCV_get_dbo__ (CurvPrcv *prc1)
int PRCV_get_tc_add_pa (CurvPrcv *prc1, Point *pta, int ptNr)
int PRCV_get_dbo_add_ln (CurvPrcv *prc1, CurvCCV *cvi)
int PRCV_get_dbo_add_tc (CurvPrcv *prc1, CurvCCV *cvi)
int PRCV_get_tc_add_prc (CurvPrcv *prc1, CurvPrcv *prc2, int ptNr, int ips, int idir)
int PRCV_get_tc_find (double vx, long ipdb, CurvPrcv *prc)
int PRCV_set_dbo__ (int typ, long dbi)
int PRCV_set_obj_dbi (int form, void *obj, int oNr, int typ, long dbi)
int PRCV_set_copy (CurvPrcv *prc2, CurvPrcv *prc1, int ips, int ipe)
int PRCV_set_seg (CurvPrcv *prc, int form, void *cvBas, double vs, double ve, long ipdbs, long ipdbe)
int PRCV_set_find (long *ipdbs, long *ips, double *vs, long *ipdbe, long *ipe, double *ve, CurvPrcv *prc1, double *vx)
int PRCV_set_basCv (int form, void *cvBas, long dbi)
int PRCV_memspc_ini (CurvPrcv *prc, int ptNr, char *mSpc, int mSiz)
int PRCV_memspc_add (CurvPrcv *prc, int ptNr)
int PRCV_wrf__ (CurvPrcv *prc)
int PRCV_rdf__ (CurvPrcv *prc)
int PRCV_rdf_free (CurvPrcv *prc)
int PRCV_dump_dbo (int mode, int dbTyp, long dbi)
int PRCV_dump_1 (int ii, CurvPrcv *prc)
int PRCV_dump__ (int mode, CurvPrcv *prc, char *txt)


int WC_modact_ind
static CurvPrcv PRCV0 = _PRCV_NUL

Detailed Description

polygonal_representation_of_curve (struct CurvPrcv)

PRCV_set_dbo__ create PRCV from bin.obj
PRCV_set_obj_dbi create PRCV for bin.obj (must have DB-index)
PRCV_set_basCv create PRCV for basicCurve
PRCV_set_seg add curve from vs to ve to PRCV
PRCV_set_find get previous-parameter and next-parameter
PRCV_npt_dbo__ get polygon for DB-obj
PRCV_get_dbo__ get PRCV for DB-obj (typ/dbi)
PRCV_get_dbo_add_tc add trimmed-curve ccv1 to prc1
PRCV_get_tc_add_pa add point to prc1
PRCV_get_tc_add_prc add <ptNr> points from prc2 starting at point <ips> to prc1
PRCV_get_tc_find find index in from parameter or dbi in PRCV
PRCV_memspc_ini init memspc for CurvPrcv
PRCV_memspc_add add space
PRCV_free__ free PRCV0 (new-model)
PRCV_wrf__ write cvp into file "[M<subModelNr>]S<surf#>.odat"
PRCV_rdf__ read PRCV from file "[M<subModelNr>]S<surf#>.odat"
PRCV_test_get test get PRCV for dbo
// PRCV_insert_par
// PRCV_insert__ Create PRC, add 1 or 2 intermediate points
// PRCV_ccv__ get PRCV from trimmed-curve

Macro Definition Documentation

#define PRCV0_INC_PTNR   256

Function Documentation

int PRCV_free__ ( )
free PRCV0
used only when new model is activated
int PRCV_npt_dbo__ ( Point **  pta,
int *  ptNr,
int  typ,
long  dbi,
int  mdli 
PRCV_npt_dbo__ get polygon for DB-obj
pta returns a pointer to <ptNr> points; do not free.
int PRCV_get_dbo__ ( CurvPrcv prc1)
get PRCV for DB-obj (typ/dbi)
Memspc for point, parameters must have been provided with PRCV_memspc_ini
MUST free prc1 with PRCV_rdf_free !
prc1 typ,dbi,mdli must be set;
prc1 ptNr,npt,npar,nipt
int PRCV_get_tc_add_pa ( CurvPrcv prc1,
Point pta,
int  ptNr 
int PRCV_get_dbo_add_ln ( CurvPrcv prc1,
CurvCCV cvi 
int PRCV_get_dbo_add_tc ( CurvPrcv prc1,
CurvCCV cvi 
int PRCV_get_tc_add_prc ( CurvPrcv prc1,
CurvPrcv prc2,
int  ptNr,
int  ips,
int  idir 
int PRCV_get_tc_find ( double  vx,
long  ipdb,
CurvPrcv prc 
PRCV_get_tc_find find index from parameter or dbi in PRCV
vx parameter
ipdb dbi
retCod index of point with parameter=vx or dbi=ipdb in prc
-1 not-found
int PRCV_set_dbo__ ( int  typ,
long  dbi 
int PRCV_set_obj_dbi ( int  form,
void *  obj,
int  oNr,
int  typ,
long  dbi 
PRCV_set_obj_dbi create PRCV for bin.obj (must have DB-index)
using memspc501
typ,dbi dbo baseCurve
form,obj bin.obj
int PRCV_set_copy ( CurvPrcv prc2,
CurvPrcv prc1,
int  ips,
int  ipe 
int PRCV_set_seg ( CurvPrcv prc,
int  form,
void *  cvBas,
double  vs,
double  ve,
long  ipdbs,
long  ipdbe 
int PRCV_set_find ( long *  ipdbs,
long *  ips,
double *  vs,
long *  ipdbe,
long *  ipe,
double *  ve,
CurvPrcv prc1,
double *  vx 
get previous-parameter and next-parameter
vx value to test
vs previous value, vs < vx
ve next value, ve > vx
retCod 0 previous and next value found
1 value already exists
int PRCV_set_basCv ( int  form,
void *  cvBas,
long  dbi 
int PRCV_memspc_ini ( CurvPrcv prc,
int  ptNr,
char *  mSpc,
int  mSiz 
int PRCV_memspc_add ( CurvPrcv prc,
int  ptNr 
PRCV_memspc_add add space for <ptNr> points
not enough memspc. malloc-realloc; heap-Error; empty-malloc.
ptNr total size in nr of points
Retcodes: 0=OK, -1=Error-heap; -2=EOM
int PRCV_wrf__ ( CurvPrcv prc)
int PRCV_rdf__ ( CurvPrcv prc)
read PRCV from file "[M<subModelNr>]S<surf#>.odat"
Memspace for points, params is mallocd, if not provided with PRCV_memspc_ini
If Malloced: MUST BE FREED WITH PRCV_rdf_free !
retCod 0 OK; MUST PRCV_rdf_free()
-1 file not found
ofid (objectfile-id) subModelNr [M<subModelNr>]S<surf#>.odat
see APED_oid_dbo__
int PRCV_rdf_free ( CurvPrcv prc)
int PRCV_dump_dbo ( int  mode,
int  dbTyp,
long  dbi 
int PRCV_dump_1 ( int  ii,
CurvPrcv prc 
int PRCV_dump__ ( int  mode,
CurvPrcv prc,
char *  txt 

Variable Documentation

int WC_modact_ind
CurvPrcv PRCV0 = _PRCV_NUL