gCAD3D 2.35
catalog.c File Reference

CATALOG-UtilityProgs. More...

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

Functions

int CTLG_fnWrite_modelnam (char *fnam, char *modelnam)
 ================================================================ More...
 
int CTLG_mnam_modelnam (char *mnam, char *modelnam)
 ================================================================ More...
 
int CTLG_PartID_mnam (char *PartID, char *mNam)
 
int CTLG_mnam_PartID (char *mNam, char *catPart)
 
int CTLG_Part_Ref1 (char *mNam, char *catPart)
 ================================================================ More...
 
int CTLG_getCatDir (char *catDir)
 ================================================================ More...
 
int CTLG_Sel_wPartLst (char *partFilNam, char *actCatNam)
 ================================================================ More...
 
int CTLG_dat_del ()
 
int CTLG_Lst_write ()
 ================================================================ More...
 

Variables

static const char * CATLG_DATFIL_TYP = "ctlg_dat"
 

Detailed Description

CATALOG-UtilityProgs.

=====================================================
List_functions_start:
CTLG_fnWrite_modelnam get filename for parameters to modify
CTLG_mnam_modelnam find symDir/Modelname from partName
CTLG_mnam_PartID returns internal Modelname
CTLG_PartID_mnam returns PartID from internal Modelname
CTLG_Part_Ref1 create file tmp/<catalog>_<part>.write (modif. params)
CTLG_dat_del delete all parameter-files
CTLG_getCatDir return symbol "CATALOG" (directory for .ctlg-files)
CTLG_Sel_wPartLst create new childList in file tmp/catParts.lst
CTLG_Lst_write create tmp/Catalog.lst
List_functions_end:
=====================================================

Function Documentation

int CTLG_fnWrite_modelnam ( char *  fnam,
char *  modelnam 
)

================================================================

================================================================ catalog-Model: den zugehoerigen filename fuer das .write-File machen (aus dem write-File, zeile 1 lesen) Input: modelnam; zB |Schrauben_SKS_6x30| oder |Schrauben/SKS_6x30| Output: fnam |/mnt/serv1/Devel/dev/gCAD3D/tmp/Schrauben_SKS_6x30.write|

int CTLG_mnam_modelnam ( char *  mnam,
char *  modelnam 
)

================================================================

================================================================

catalog-Model: get directory/basicModelname from <catalog>_<part>
(read 1. line of file tmp/<catalog>_<part>.write)
Input:
modelnam; zB |Schrauben_SKS_6x30|
Output:
mnam |Schrauben/SKS.gcad| (symDir/Modelname)
int CTLG_PartID_mnam ( char *  PartID,
char *  mNam 
)

returns PartID from internal Modelname

Input: mNam eg "Profile_4x4_80" Output: PartID eg "Profile/4x4_80" Retcod: -1 = success ( = type: internal models) -2 = Error

int CTLG_mnam_PartID ( char *  mNam,
char *  catPart 
)

returns internal Modelname from PartID (PartID = catalogName+PartName)

Input: catPart the decalaration Line Output: mNam = name of internal Model; size=128 Retcod: -1 = success ( = type: internal models) -2 = Error

int CTLG_Part_Ref1 ( char *  mNam,
char *  catPart 
)

================================================================

================================================================

Prepare creation of catalogPart.
Create file tmp/<catalog>_<part>.write (with parameters different to basModel)
return internal Modelname.
Input:
catPart the declaration without CTLG | "Schrauben/SKS_10x45" P(0 0 0)|
Output:
mNam = name of internal Model; size=128
Retcod:
0 = success ( = type: catalogModel)
-1 = Error: cannot find part in catalog
-3 = Error 4 = error open catalogFile
int CTLG_getCatDir ( char *  catDir)

================================================================

================================================================

return symbol "CATALOG" (directory for .ctlg-files)
Output:
catDir size >= 256
int CTLG_Sel_wPartLst ( char *  partFilNam,
char *  actCatNam 
)

================================================================

================================================================

callback parent-sel (catalog selected)(); create childs-file (parts)
create new childList <tmp>/catParts.lst
save active catalog-name in file tmp/catParts.act
for catalog actCatNam
int CTLG_dat_del ( )

CTLG_dat_del delete all parameter-files

int CTLG_Lst_write ( )

================================================================

================================================================ create tmp/Catalog.lst

Variable Documentation

const char* CATLG_DATFIL_TYP = "ctlg_dat"
static