gCAD3D 2.35
xa_src.c File Reference

check, modify, convert source-objects (text) (SRC_) More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_elli.h"
#include "../db/ut_DB.h"
#include "../xa/xa_sele.h"
#include "../xa/xa_mem.h"
#include "../xa/xa_ato.h"
#include "../xa/xa_obj_txt.h"

Functions

int SRC_src_ato (char *os, int oSiz, int impTyp, ObjAto *ato)
 
int SRC_src_dbo (char *so, int sMax, int outTyp, int inTyp, long dbi)
 
int SRC_fmt_tab (char *s1, int i0,...)
 
int SRC_fmt__ (char *outBuf, int outTyp, int aNr, int *atyp, double *atab)
 
int SRC_src_isol_ato1 (char *outBuf, int typ, double *val)
 
int SRC_src_pt_dbo (char *so, int sSiz, int oTyp, Point *pti, int iTyp, long iDbi)
 

Variables

int WC_sur_ind
 Der Index auf die ActiveConstrPlane. More...
 
Mat_4x3 WC_sur_imat
 inverse TrMat of ActiveConstrPlane More...
 

Detailed Description

check, modify, convert source-objects (text) (SRC_)

=====================================================
List_functions_start:
SRC_src_ato sourceObj (text) from atomicObjs
SRC_src_dbo create sourceCode of requested type from Database-object
SRC_src_isol_ato1 convert DB-obj (typ, DB-index) into isolated sourceCode (text)
AP_src_sel_fmt create sourceText from Format
SRC_src_pt_dbo create obj (src) from point and DB-obj (curve, surface)
AP_src_parPt_selSur create sourceCode for paramteric-point from surface
SRC_parPt_ptDbo create parametric_point (sourceCode) from point and Db-obj
SRC_vc_ptDbo create vector (sourceCode) from point and Database-object
SRC_LnAc_ptDbo create L() or C() from obj dbTyp,dbi at position pti
SRC_fmt__ write sourceCode formatted for depending obj; eg "D(P1 P2)"
SRC_fmt_tab write sourceCode formatted for depending obj; eg "D(P1 P2)"
SRC_fmt_sub format sourceObj (text) for compound-DB-obj
List_functions_end:
=====================================================
see also:
APED_oid_dbo__ make name from typ and DB-index

Function Documentation

int SRC_src_ato ( char *  os,
int  oSiz,
int  impTyp,
ObjAto ato 
)
SRC_src_ato sourceObj (text) from atomicObjs
replaces SRC_fmt__
Input:
oSiz size of os (nr of chars)
impTyp typ of srcObj
Example:
impTyp=Typ_PT; types: Typ_PT,Typ_modif,Typ_Val; "P(S# MOD(#) #.)"
impTyp=Typ_LN; types: Typ_LN,Typ_modif,Typ_Val; "L(S# MOD(#))"
impTyp=0; types: Typ_Val,Typ_Val,Typ_Val; "#. #. #."
int SRC_src_dbo ( char *  so,
int  sMax,
int  outTyp,
int  inTyp,
long  dbi 
)

create sourceCode of requested type from Database-object

int SRC_fmt_tab ( char *  s1,
int  i0,
  ... 
)
int SRC_fmt__ ( char *  outBuf,
int  outTyp,
int  aNr,
int *  atyp,
double *  atab 
)
DO NOT USE; use new func SRC_src_ato
write sourceCode formatted for depending obj; eg "D(P1 P2)"
Input:
outTyp primary typ; Typ_Txt: none.
aNr nr of records in atyp/atab
atyp secondary object-types (in bracket)
atab db-indices of secondary objects
see also SRC_src_ato
int SRC_src_isol_ato1 ( char *  outBuf,
int  typ,
double *  val 
)
convert DB-obj (typ, DB-index) into isolated sourceCode (text)
"P-9" -> "P(0 0 0)"
"D19" -> "D(0 1 0)"
"V1" -> "12.3"
Typ_Val|Typ_XVal|Typ_YVal|Typ_ZVal: "12.3"
int SRC_src_pt_dbo ( char *  so,
int  sSiz,
int  oTyp,
Point pti,
int  iTyp,
long  iDbi 
)
SRC_src_pt_dbo create obj (src) from point and DB-obj (curve, surface)
Input:
oTyp type of outputobj; Typ_PT|Typ_VC|Typ_LN|Typ_CI
Typ_goGeo1 - get L|C|S according to selected obj
pti point on obj; get last mousepoint if NULL.
iTyp,iDbi object (Ln,Ac,Curv,Surf)
sSiz size of so (nr of chars)
Output:
so output-object (sourceCode of point on obj)
RetCod:
>0 typ of created object (if oTyp=Typ_goGeo1)
TODO: typ of basic-curve for trimmed-curve sele_ck_subCurv
0 output of nearest selected point; not parametric ..
-1 Error
-2 cannot create oTyp from iTyp,iDbi
Examples:
outBuf outTyp inTyp
P(<x> <y> <z>) Typ_PT Typ_TmpPT
P(<dbo> MOD(#) <par1>) // from point on CCV
see IE_cad_sel1 if(typSel == Typ_VAR) { :3527
see SRC_dbo
see AP_src_parPt_selSur
see AP_src_sel_fmt
see AP_stru_2_txt (creates definition-line)

Variable Documentation

int WC_sur_ind

Der Index auf die ActiveConstrPlane.

Mat_4x3 WC_sur_imat

inverse TrMat of ActiveConstrPlane