check, modify, convert source-objects (text) (SRC_)
===================================================== Liste_Funktionen_Beginn: AP_name_typInd make name from typ and DB-index SRC_dbo create sourceCode from Database-object SRC_fmt write sourceCode formatted for dynamic obj; eg "D(P1 P2)" SRC_isol_dbo convert DB-obj (typ, DB-index) into isolated sourceCode (text) AP_src_sel_fmt create sourceText from Format AP_src_selObj create sourceObj (text) for selected obj AP_src_parPt_selSur create sourceCode for paramteric-point from surface Liste_Funktionen_Ende: ===================================================== -see also: AP_obj_2_txt AP_stru_2_txt
#include "MS_Def0.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../ut/ut_geo.h"
#include "../db/ut_DB.h"
Functions | |
int | SRC_dbo (char *outBuf, int outTyp, int inTyp, long dbi) |
int | SRC_fmt (char *outBuf, int outTyp, int aNr, int *atyp, double *atab) |
int | SRC_isol_dbo (char *outBuf, int typ, long dbi) |
int | SRC_fmt_sub (char *outBuf, int outTyp, int inTyp, long dbi) |
int | AP_src_sel_fmt (char *outBuf, int sSel, int typSel, long indSel, int subtypSel, int ccvtypSel, int iSeg, int iSubSeg, double lpar, char *fmt) |
int | AP_src_selObj (char *outBuf, int typReq, int sTyp, long sInd) |
int | AP_src_parPt_selSur (char *cBuf, long iSur) |
int | AP_name_typInd (char *buf, int typ, long ind) |
int SRC_dbo | ( | char * | outBuf, | |
int | outTyp, | |||
int | inTyp, | |||
long | dbi | |||
) |
create sourceCode from Database-object RetCod: 0 output complete 1 output not yet complete -1 Error see AP_src_selObj see IE_cad_sel1 if(typSel == Typ_VAR) { :3527 see AP_src_sel_fmt see AP_stru_2_txt (creates definition-line)
int SRC_fmt | ( | char * | outBuf, | |
int | outTyp, | |||
int | aNr, | |||
int * | atyp, | |||
double * | atab | |||
) |
write sourceCode formatted for dynamic obj; eg "D(P1 P2)" Input: outTyp primary typ aNr nr of records in atyp/atab atyp secondary object-types (in bracket) atab db-indices of secondary objects
int SRC_isol_dbo | ( | char * | outBuf, | |
int | typ, | |||
long | dbi | |||
) |
convert DB-obj (typ, DB-index) into isolated sourceCode (text) eg: "P-9" -> "P(0 0 0)"
int SRC_fmt_sub | ( | char * | outBuf, | |
int | outTyp, | |||
int | inTyp, | |||
long | dbi | |||
) |
format sourceObj (text) for compound-DB-obj
int AP_src_sel_fmt | ( | char * | outBuf, | |
int | sSel, | |||
int | typSel, | |||
long | indSel, | |||
int | subtypSel, | |||
int | ccvtypSel, | |||
int | iSeg, | |||
int | iSubSeg, | |||
double | lpar, | |||
char * | fmt | |||
) |
format sourceObj (text) for selected compound-obj Output: outBuf sourceText Input: sSel -1 no limitPoint (Startpt|Endpt|plgPoint) selected >=0 Startpt|Endpt|plgPoint selected; typSel typ of selected obj indSel DB-ind of selected obj subtypSel type of curve if typSel=Typ_CV ccvtypSel typ of selected obj inside CCV if typSel=Typ_CCV iSeg segmentNr in Polygon or in CCV iSubSeg segmentNr of Polygon inside CCV lpar Curveparameter 0-1 if sSel<0 fmt outputformat: zB "poPox" f PT from LN 0.char - unused 1.char - unused Characters 2-6 beschreiben das OutputFormat: 2.char 'P|L|D|' P = P() L = L() D = D() (Vector) c = typ of ccvtypSel (ccvtypSel replaces this char) 3.char 'o' = Obj (cbuf) zB "S20" 4.char 'x' = prepare Format 4/5/6.char 'i' = iSeg als MOD(<iSeg>) od 'I' = iSubSeg als MOD(<iSubSeg>) od 'p' = lpar
int AP_src_selObj | ( | char * | outBuf, | |
int | typReq, | |||
int | sTyp, | |||
long | sInd | |||
) |
AP_src_selObj create sourceObj (text) for selected DB-obj Input: sTyp inputtyp: Typ_LN|Typ_AC|Typ_CV(Elli,Bspl)|Typ_CVCCV sInd DB-index Output: outBuf resulting modelcode Retod 0=OK; -1=Error see also IE_cad_sel1 :3438 DO NOT USE: use new SRC_dbo
int AP_src_parPt_selSur | ( | char * | cBuf, | |
long | iSur | |||
) |
AP_src_parPt_selSur create sourceCode for parametric-point from surface Input: iSur DB-index of sur Output: cBuf eg "P(A# <uPar> <vPar>)" see UT3D_segpar_dboSel AP_src_sel_fmt
int AP_name_typInd | ( | char * | buf, | |
int | typ, | |||
long | ind | |||
) |