WriteDatabase
[Database IO]

Collaboration diagram for WriteDatabase:


Files

file  wdb.h
file  wdb.c
file  wdb_comb_std.c
file  wdb_obj.c

Data Structures

struct  wmember
struct  wdb_pipept
struct  wdb_metaballpt
struct  tokens

Defines

#define WDB_H   seen
#define WDB_EXPORT
#define WDB_EXTERN(type_and_name, args)   extern type_and_name()
#define WDB_ARGS(args)   ()
#define WMEMBER_NULL   ((struct wmember *)0)
#define WMEMBER_MAGIC   0x43128912
#define WDB_CK_WMEMBER(_p)   BU_CKMAG(_p, WMEMBER_MAGIC, "wmember" );
#define WDB_PIPESEG_NULL   ((struct wdb_pipeseg *)0)
#define WDB_PIPESEG_MAGIC   0x9723ffef
#define WDB_METABALLPT_NULL   ((struct wdb_metaballpt *)0)
#define WDB_METABALLPT_MAGIC   0x6D627074
 mbpt
#define mk_trc(wrong)   +++error_obsolete_libwdb_routine+++
#define mk_bsolid(fp, name, nsurf, res)   +++error_obsolete_libwdb_routine+++
#define mk_bsurf(fp, srf)   +++error_obsolete_libwdb_routine+++
#define write_shell_as_polysolid(ofp, name, s)   mk_bot_from_nmg(ofp,name,s)
#define mk_strsol(fp, name, solid, arg)   +++error_obsolete_libwdb_routine+++
#define mk_polysolid(fp, name)   +++error_obsolete_libwdb_routine+++
#define mk_poly(fp, npts, verts, norms)   +++error_obsolete_libwdb_routine+++
#define mk_fpoly(fp, npts, verts)   +++error_obsolete_libwdb_routine+++
#define mk_rcomb(fp, name, len, reg, shadername, mparam, rgb, id, air, mater, los, flag)   +++error_obsolete_libwdb_routine+++
#define mk_fcomb(fp, name, len, reg)   +++error_obsolete_libwdb_routine+++
#define mk_memb(fp, name, map, op)   +++error_obsolete_libwdb_routine+++
#define mk_lcomb(_fp, _name, _headp, _rf, _shadername, _shaderargs, _rgb, _inh)
#define mk_lrcomb(fp, name, _headp, region_flag, shadername, shaderargs, rgb, id, air, material, los, inherit_flag)
#define mk_fastgen_region(fp, name, headp, mode, shadername, shaderargs, rgb, id, air, material, los, inherit)
#define WMOP_INTERSECT   '+'
#define WMOP_SUBTRACT   '-'
#define WMOP_UNION   'u'
#define mk_lfcomb(fp, name, headp, region)
#define mk_fwrite_internal(fp, name, ip)   +++error_obsolete_libwdb_routine+++
#define mk_export_fwrite(wdbp, name, gp, id)   wdb_export(wdbp,name,gp,id,mk_conv2mm)
#define PRINT_USAGE
#define WDB_TOK_NULL   0
#define WDB_TOK_LPAREN   1
#define WDB_TOK_RPAREN   2
#define WDB_TOK_UNION   3
#define WDB_TOK_INTER   4
#define WDB_TOK_SUBTR   5
#define WDB_TOK_TREE   6

Enumerations

enum  wdb_binunif {
  WDB_BINUNIF_FLOAT, WDB_BINUNIF_DOUBLE, WDB_BINUNIF_CHAR, WDB_BINUNIF_UCHAR,
  WDB_BINUNIF_SHORT, WDB_BINUNIF_USHORT, WDB_BINUNIF_INT, WDB_BINUNIF_UINT,
  WDB_BINUNIF_LONG, WDB_BINUNIF_ULONG, WDB_BINUNIF_LONGLONG, WDB_BINUNIF_ULONGLONG,
  WDB_BINUNIF_INT8, WDB_BINUNIF_UINT8, WDB_BINUNIF_INT16, WDB_BINUNIF_UINT16,
  WDB_BINUNIF_INT32, WDB_BINUNIF_UINT32, WDB_BINUNIF_INT64, WDB_BINUNIF_UINT64,
  WDB_BINUNIF_FILE_FLOAT, WDB_BINUNIF_FILE_DOUBLE, WDB_BINUNIF_FILE_CHAR, WDB_BINUNIF_FILE_UCHAR,
  WDB_BINUNIF_FILE_SHORT, WDB_BINUNIF_FILE_USHORT, WDB_BINUNIF_FILE_INT, WDB_BINUNIF_FILE_UINT,
  WDB_BINUNIF_FILE_LONG, WDB_BINUNIF_FILE_ULONG, WDB_BINUNIF_FILE_LONGLONG, WDB_BINUNIF_FILE_ULONGLONG,
  WDB_BINUNIF_FILE_INT8, WDB_BINUNIF_FILE_UINT8, WDB_BINUNIF_FILE_INT16, WDB_BINUNIF_FILE_UINT16,
  WDB_BINUNIF_FILE_INT32, WDB_BINUNIF_FILE_UINT32, WDB_BINUNIF_FILE_INT64, WDB_BINUNIF_FILE_UINT64
}

Functions

WDB_EXPORT WDB_EXTERN (int mk_id,(struct rt_wdb *fp, const char *title))
WDB_EXPORT WDB_EXTERN (int mk_id_units,(struct rt_wdb *fp, const char *title, const char *units))
WDB_EXPORT int mk_id_editunits (struct rt_wdb *fp, const char *title, double local2mm)
WDB_EXPORT WDB_EXTERN (int mk_half,(struct rt_wdb *fp, const char *name, const vect_t norm, double d))
WDB_EXPORT int mk_grip (struct rt_wdb *wdbp, const char *name, const point_t center, const vect_t normal, const fastf_t magnitude)
WDB_EXPORT WDB_EXTERN (int mk_rpp,(struct rt_wdb *fp, const char *name, const point_t min, const point_t max))
WDB_EXPORT WDB_EXTERN (int mk_wedge,(struct rt_wdb *fp, const char *name, const point_t vert, const vect_t xdirv, const vect_t zdirv, fastf_t xlen, fastf_t ylen, fastf_t zlen, fastf_t x_top_len))
WDB_EXPORT WDB_EXTERN (int mk_arb4,(struct rt_wdb *fp, const char *name, const fastf_t *pts4))
WDB_EXPORT WDB_EXTERN (int mk_arb8,(struct rt_wdb *fp, const char *name, const fastf_t *pts8))
WDB_EXPORT WDB_EXTERN (int mk_sph,(struct rt_wdb *fp, const char *name, const point_t center, fastf_t radius))
WDB_EXPORT WDB_EXTERN (int mk_ell,(struct rt_wdb *fp, const char *name, const point_t center, const vect_t a, const vect_t b, const vect_t c))
WDB_EXPORT WDB_EXTERN (int mk_tor,(struct rt_wdb *fp, const char *name, const point_t center, const vect_t inorm, double r1, double r2))
WDB_EXPORT WDB_EXTERN (int mk_rcc,(struct rt_wdb *fp, const char *name, const point_t base, const vect_t height, fastf_t radius))
WDB_EXPORT WDB_EXTERN (int mk_tgc,(struct rt_wdb *fp, const char *name, const point_t base, const vect_t height, const vect_t a, const vect_t b, const vect_t c, const vect_t d))
WDB_EXPORT WDB_EXTERN (int mk_cone,(struct rt_wdb *fp, const char *name, const point_t base, const vect_t dirv, fastf_t height, fastf_t rad1, fastf_t rad2))
WDB_EXPORT WDB_EXTERN (int mk_trc_h,(struct rt_wdb *fp, const char *name, const point_t base, const vect_t height, fastf_t radbase, fastf_t radtop))
WDB_EXPORT WDB_EXTERN (int mk_trc_top,(struct rt_wdb *fp, const char *name, const point_t ibase, const point_t itop, fastf_t radbase, fastf_t radtop))
WDB_EXPORT int mk_rpc (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t height, const vect_t breadth, double half_w)
WDB_EXPORT int mk_rhc (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t height, const vect_t breadth, fastf_t half_w, fastf_t asymp)
WDB_EXPORT int mk_epa (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t height, const vect_t breadth, fastf_t r1, fastf_t r2)
WDB_EXPORT int mk_ehy (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t height, const vect_t breadth, fastf_t r1, fastf_t r2, fastf_t c)
WDB_EXPORT int mk_eto (struct rt_wdb *wdbp, const char *name, const point_t vert, const vect_t norm, const vect_t smajor, fastf_t rrot, fastf_t sminor)
WDB_EXPORT WDB_EXTERN (int mk_arbn,(struct rt_wdb *fp, const char *name, int neqn, plane_t eqn[]))
WDB_EXPORT WDB_EXTERN (int mk_ars,(struct rt_wdb *fp, const char *name, int ncurves, int pts_per_curve, fastf_t *curves[]))
WDB_EXPORT WDB_EXTERN (int mk_binunif,(struct rt_wdb *fp, const char *name, const genptr_t data, wdb_binunif data_type, long count))
WDB_EXPORT int mk_bot (struct rt_wdb *fp, const char *name, unsigned char mode, unsigned char orientation, unsigned char error_mode, int num_vertices, int num_faces, fastf_t *vertices, int *faces, fastf_t *thickness, struct bu_bitv *face_mode)
WDB_EXPORT int mk_bot_w_normals (struct rt_wdb *fp, const char *name, unsigned char mode, unsigned char orientation, unsigned char flags, int num_vertices, int num_faces, fastf_t *vertices, int *faces, fastf_t *thickness, struct bu_bitv *face_mode, int num_normals, fastf_t *normals, int *face_normals)
WDB_EXPORT int mk_bspline (struct rt_wdb *wdbp, const char *name, struct face_g_snurb **surfs)
WDB_EXPORT int mk_nmg (struct rt_wdb *filep, const char *name, struct model *m)
WDB_EXPORT int mk_bot_from_nmg (struct rt_wdb *ofp, const char *name, struct shell *s)
WDB_EXPORT int mk_sketch (struct rt_wdb *fp, const char *name, struct rt_sketch_internal *skt)
WDB_EXPORT int mk_extrusion (struct rt_wdb *fp, const char *name, const char *sketch_name, const point_t V, const vect_t h, const vect_t u_vec, const vect_t v_vec, int keypoint)
WDB_EXPORT int mk_cline (struct rt_wdb *fp, const char *name, const point_t V, const vect_t height, fastf_t radius, fastf_t thickness)
WDB_EXPORT WDB_EXTERN (int mk_particle,(struct rt_wdb *fp, const char *name, point_t vertex, vect_t height, double vradius, double hradius))
WDB_EXPORT WDB_EXTERN (int mk_pipe,(struct rt_wdb *fp, const char *name, struct bu_list *headp))
WDB_EXPORT void mk_pipe_free (struct bu_list *headp)
WDB_EXPORT void mk_add_pipe_pt (struct bu_list *headp, const point_t coord, double od, double id, double bendradius)
WDB_EXPORT void mk_pipe_init (struct bu_list *headp)
WDB_EXPORT WDB_EXTERN (int mk_dsp,(struct rt_wdb *fp, const char *name, const char *file, int xdim, int ydim, const matp_t mat))
WDB_EXPORT WDB_EXTERN (int mk_ebm,(struct rt_wdb *fp, const char *name, const char *file, int xdim, int ydim, fastf_t tallness, const matp_t mat))
WDB_EXPORT WDB_EXTERN (int mk_vol,(struct rt_wdb *fp, const char *name, const char *file, int xdim, int ydim, int zdim, int lo, int hi, const vect_t cellsize, const matp_t mat))
WDB_EXPORT WDB_EXTERN (int mk_submodel,(struct rt_wdb *fp, const char *name, const char *file, const char *treetop, int meth))
WDB_EXPORT int mk_write_color_table (struct rt_wdb *ofp)
WDB_EXPORT WDB_EXTERN (struct wmember *mk_addmember,(const char *name, struct bu_list *headp, mat_tmat, intop))
WDB_EXPORT int mk_comb (struct rt_wdb *wdbp, const char *combname, struct bu_list *headp, int region_kind, const char *shadername, const char *shaderargs, const unsigned char *rgb, int id, int air, int material, int los, int inherit, int append_ok, int gift_semantics)
WDB_EXPORT int mk_comb1 (struct rt_wdb *fp, const char *combname, const char *membname, int regflag)
WDB_EXPORT int mk_region1 (struct rt_wdb *fp, const char *combname, const char *membname, const char *shadername, const char *shaderargs, const unsigned char *rgb)
WDB_EXPORT WDB_EXTERN (int mk_conversion,(char *units_string))
WDB_EXPORT WDB_EXTERN (int mk_set_conversion,(double val))
WDB_EXPORT void mk_freemembers (struct bu_list *headp)
WDB_EXPORT WDB_EXTERN (int make_hole,(struct rt_wdb *wdbp, point_t hole_start, vect_t hole_depth, fastf_t hole_radius, int num_objs, struct directory **dp))
WDB_EXPORT WDB_EXTERN (int make_hole_in_prepped_regions,(struct rt_wdb *wdbp, struct rt_i *rtip, point_t hole_start, vect_t hole_depth, fastf_t radius, struct bu_ptbl *regions))
HIDDEN void wdb_free_tokens (struct bu_list *hp)
HIDDEN void wdb_append_union (struct bu_list *hp)
HIDDEN void wdb_append_inter (struct bu_list *hp)
HIDDEN void wdb_append_subtr (struct bu_list *hp)
HIDDEN void wdb_append_lparen (struct bu_list *hp)
HIDDEN void wdb_append_rparen (struct bu_list *hp)
HIDDEN int wdb_add_operator (Tcl_Interp *interp, struct bu_list *hp, char ch, short int *last_tok)
HIDDEN int wdb_add_operand (Tcl_Interp *interp, struct bu_list *hp, char *name)
HIDDEN void wdb_do_inter (struct bu_list *hp)
HIDDEN void wdb_do_union_subtr (struct bu_list *hp)
HIDDEN int wdb_do_paren (struct bu_list *hp)
HIDDEN union treewdb_eval_bool (struct bu_list *hp)
HIDDEN int wdb_check_syntax (Tcl_Interp *interp, struct db_i *dbip, struct bu_list *hp, char *comb_name, struct directory *dp)
int wdb_comb_std_cmd (struct rt_wdb *wdbp, Tcl_Interp *interp, int argc, char **argv)
int wdb_comb_std_tcl (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)

Variables

WDB_EXPORT double mk_conv2mm
 Conversion factor to mm.
WDB_EXPORT int mk_version
 Which version database to write.

Define Documentation

#define WDB_H   seen
 

Definition at line 74 of file wdb.h.

#define WDB_EXPORT
 

Definition at line 86 of file wdb.h.

#define WDB_EXTERN type_and_name,
args   )     extern type_and_name()
 

Definition at line 100 of file wdb.h.

#define WDB_ARGS args   )     ()
 

Definition at line 101 of file wdb.h.

#define WMEMBER_NULL   ((struct wmember *)0)
 

Definition at line 113 of file wdb.h.

#define WMEMBER_MAGIC   0x43128912
 

Definition at line 114 of file wdb.h.

Referenced by bu_identify_magic().

#define WDB_CK_WMEMBER _p   )     BU_CKMAG(_p, WMEMBER_MAGIC, "wmember" );
 

Definition at line 115 of file wdb.h.

#define WDB_PIPESEG_NULL   ((struct wdb_pipeseg *)0)
 

Definition at line 130 of file wdb.h.

#define WDB_PIPESEG_MAGIC   0x9723ffef
 

Definition at line 131 of file wdb.h.

Referenced by bu_identify_magic(), rt_pipe_import(), and rt_pipe_import5().

#define WDB_METABALLPT_NULL   ((struct wdb_metaballpt *)0)
 

Definition at line 138 of file wdb.h.

#define WDB_METABALLPT_MAGIC   0x6D627074
 

mbpt

Definition at line 139 of file wdb.h.

Referenced by rt_metaball_import5().

#define mk_trc wrong   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 182 of file wdb.h.

#define mk_bsolid fp,
name,
nsurf,
res   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 276 of file wdb.h.

#define mk_bsurf fp,
srf   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 277 of file wdb.h.

#define write_shell_as_polysolid ofp,
name,
 )     mk_bot_from_nmg(ofp,name,s)
 

Definition at line 326 of file wdb.h.

#define mk_strsol fp,
name,
solid,
arg   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 377 of file wdb.h.

#define mk_polysolid fp,
name   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 383 of file wdb.h.

#define mk_poly fp,
npts,
verts,
norms   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 384 of file wdb.h.

#define mk_fpoly fp,
npts,
verts   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 385 of file wdb.h.

#define mk_rcomb fp,
name,
len,
reg,
shadername,
mparam,
rgb,
id,
air,
mater,
los,
flag   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 392 of file wdb.h.

#define mk_fcomb fp,
name,
len,
reg   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 393 of file wdb.h.

#define mk_memb fp,
name,
map,
op   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 394 of file wdb.h.

#define mk_lcomb _fp,
_name,
_headp,
_rf,
_shadername,
_shaderargs,
_rgb,
_inh   ) 
 

Value:

mk_comb(_fp,_name,&((_headp)->l),_rf,_shadername,_shaderargs,\
                _rgb,0,0,0,0,_inh,0,0)

Definition at line 408 of file wdb.h.

#define mk_lrcomb fp,
name,
_headp,
region_flag,
shadername,
shaderargs,
rgb,
id,
air,
material,
los,
inherit_flag   ) 
 

Value:

mk_comb( fp, name, &((_headp)->l), region_flag, shadername, shaderargs, \
                rgb, id, air, material, los, inherit_flag, 0, 0 )

Definition at line 414 of file wdb.h.

#define mk_fastgen_region fp,
name,
headp,
mode,
shadername,
shaderargs,
rgb,
id,
air,
material,
los,
inherit   ) 
 

Value:

mk_comb(fp,name,headp,mode,shadername,shaderargs,rgb,id,air,\
                material,los,inherit,0,0)

Definition at line 448 of file wdb.h.

#define WMOP_INTERSECT   '+'
 

Definition at line 454 of file wdb.h.

Referenced by wdb_instance_cmd(), and wdb_track_cmd().

#define WMOP_SUBTRACT   '-'
 

Definition at line 455 of file wdb.h.

Referenced by wdb_instance_cmd(), and wdb_track_cmd().

#define WMOP_UNION   'u'
 

Definition at line 456 of file wdb.h.

Referenced by wdb_group_cmd(), and wdb_instance_cmd().

#define mk_lfcomb fp,
name,
headp,
region   ) 
 

Value:

mk_lcomb( fp, name, headp, \
        region, (char *)0, (char *)0, (unsigned char *)0, 0 );

Definition at line 459 of file wdb.h.

#define mk_fwrite_internal fp,
name,
ip   )     +++error_obsolete_libwdb_routine+++
 

Definition at line 485 of file wdb.h.

#define mk_export_fwrite wdbp,
name,
gp,
id   )     wdb_export(wdbp,name,gp,id,mk_conv2mm)
 

Definition at line 486 of file wdb.h.

#define PRINT_USAGE
 

Value:

Tcl_AppendResult(interp, "c: usage 'c [-cr] comb_name [bool_expr]'\n",\
                                     (char *)NULL)

Definition at line 56 of file wdb_comb_std.c.

Referenced by wdb_comb_std_cmd().

#define WDB_TOK_NULL   0
 

Definition at line 66 of file wdb_comb_std.c.

Referenced by wdb_check_syntax(), and wdb_comb_std_cmd().

#define WDB_TOK_LPAREN   1
 

Definition at line 67 of file wdb_comb_std.c.

Referenced by wdb_append_lparen(), wdb_check_syntax(), wdb_comb_std_cmd(), and wdb_do_paren().

#define WDB_TOK_RPAREN   2
 

Definition at line 68 of file wdb_comb_std.c.

Referenced by wdb_append_rparen(), wdb_check_syntax(), wdb_comb_std_cmd(), and wdb_do_paren().

#define WDB_TOK_UNION   3
 

Definition at line 69 of file wdb_comb_std.c.

Referenced by wdb_add_operator(), wdb_append_union(), wdb_check_syntax(), and wdb_do_union_subtr().

#define WDB_TOK_INTER   4
 

Definition at line 70 of file wdb_comb_std.c.

Referenced by wdb_add_operator(), wdb_append_inter(), wdb_check_syntax(), and wdb_do_inter().

#define WDB_TOK_SUBTR   5
 

Definition at line 71 of file wdb_comb_std.c.

Referenced by wdb_add_operator(), wdb_append_subtr(), wdb_check_syntax(), and wdb_do_union_subtr().

#define WDB_TOK_TREE   6
 

Definition at line 72 of file wdb_comb_std.c.

Referenced by wdb_add_operand(), wdb_check_syntax(), wdb_do_inter(), wdb_do_paren(), wdb_do_union_subtr(), and wdb_free_tokens().


Enumeration Type Documentation

enum wdb_binunif
 

Enumerator:
WDB_BINUNIF_FLOAT 
WDB_BINUNIF_DOUBLE 
WDB_BINUNIF_CHAR 
WDB_BINUNIF_UCHAR 
WDB_BINUNIF_SHORT 
WDB_BINUNIF_USHORT 
WDB_BINUNIF_INT 
WDB_BINUNIF_UINT 
WDB_BINUNIF_LONG 
WDB_BINUNIF_ULONG 
WDB_BINUNIF_LONGLONG 
WDB_BINUNIF_ULONGLONG 
WDB_BINUNIF_INT8 
WDB_BINUNIF_UINT8 
WDB_BINUNIF_INT16 
WDB_BINUNIF_UINT16 
WDB_BINUNIF_INT32 
WDB_BINUNIF_UINT32 
WDB_BINUNIF_INT64 
WDB_BINUNIF_UINT64 
WDB_BINUNIF_FILE_FLOAT 
WDB_BINUNIF_FILE_DOUBLE 
WDB_BINUNIF_FILE_CHAR 
WDB_BINUNIF_FILE_UCHAR 
WDB_BINUNIF_FILE_SHORT 
WDB_BINUNIF_FILE_USHORT 
WDB_BINUNIF_FILE_INT 
WDB_BINUNIF_FILE_UINT 
WDB_BINUNIF_FILE_LONG 
WDB_BINUNIF_FILE_ULONG 
WDB_BINUNIF_FILE_LONGLONG 
WDB_BINUNIF_FILE_ULONGLONG 
WDB_BINUNIF_FILE_INT8 
WDB_BINUNIF_FILE_UINT8 
WDB_BINUNIF_FILE_INT16 
WDB_BINUNIF_FILE_UINT16 
WDB_BINUNIF_FILE_INT32 
WDB_BINUNIF_FILE_UINT32 
WDB_BINUNIF_FILE_INT64 
WDB_BINUNIF_FILE_UINT64 

Definition at line 232 of file wdb.h.


Function Documentation

WDB_EXPORT WDB_EXTERN int  mk_id,
(struct rt_wdb *fp, const char *title) 
 

WDB_EXPORT WDB_EXTERN int  mk_id_units,
(struct rt_wdb *fp, const char *title, const char *units
 

WDB_EXPORT int mk_id_editunits struct rt_wdb fp,
const char *  title,
double  local2mm
 

WDB_EXPORT WDB_EXTERN int  mk_half,
(struct rt_wdb *fp, const char *name, const vect_t norm, double d
 

WDB_EXPORT int mk_grip struct rt_wdb wdbp,
const char *  name,
const point_t  center,
const vect_t  normal,
const fastf_t  magnitude
 

WDB_EXPORT WDB_EXTERN int  mk_rpp,
(struct rt_wdb *fp, const char *name, const point_t min, const point_t max) 
 

WDB_EXPORT WDB_EXTERN int  mk_wedge,
(struct rt_wdb *fp, const char *name, const point_t vert, const vect_t xdirv, const vect_t zdirv, fastf_t xlen, fastf_t ylen, fastf_t zlen, fastf_t x_top_len) 
 

WDB_EXPORT WDB_EXTERN int  mk_arb4,
(struct rt_wdb *fp, const char *name, const fastf_t *pts4) 
 

WDB_EXPORT WDB_EXTERN int  mk_arb8,
(struct rt_wdb *fp, const char *name, const fastf_t *pts8) 
 

WDB_EXPORT WDB_EXTERN int  mk_sph,
(struct rt_wdb *fp, const char *name, const point_t center, fastf_t radius) 
 

WDB_EXPORT WDB_EXTERN int  mk_ell,
(struct rt_wdb *fp, const char *name, const point_t center, const vect_t a, const vect_t b, const vect_t c) 
 

WDB_EXPORT WDB_EXTERN int  mk_tor,
(struct rt_wdb *fp, const char *name, const point_t center, const vect_t inorm, double r1, double r2) 
 

WDB_EXPORT WDB_EXTERN int  mk_rcc,
(struct rt_wdb *fp, const char *name, const point_t base, const vect_t height, fastf_t radius) 
 

WDB_EXPORT WDB_EXTERN int  mk_tgc,
(struct rt_wdb *fp, const char *name, const point_t base, const vect_t height, const vect_t a, const vect_t b, const vect_t c, const vect_t d
 

WDB_EXPORT WDB_EXTERN int  mk_cone,
(struct rt_wdb *fp, const char *name, const point_t base, const vect_t dirv, fastf_t height, fastf_t rad1, fastf_t rad2) 
 

WDB_EXPORT WDB_EXTERN int  mk_trc_h,
(struct rt_wdb *fp, const char *name, const point_t base, const vect_t height, fastf_t radbase, fastf_t radtop) 
 

WDB_EXPORT WDB_EXTERN int  mk_trc_top,
(struct rt_wdb *fp, const char *name, const point_t ibase, const point_t itop, fastf_t radbase, fastf_t radtop) 
 

WDB_EXPORT int mk_rpc struct rt_wdb wdbp,
const char *  name,
const point_t  vert,
const vect_t  height,
const vect_t  breadth,
double  half_w
 

WDB_EXPORT int mk_rhc struct rt_wdb wdbp,
const char *  name,
const point_t  vert,
const vect_t  height,
const vect_t  breadth,
fastf_t  half_w,
fastf_t  asymp
 

WDB_EXPORT int mk_epa struct rt_wdb wdbp,
const char *  name,
const point_t  vert,
const vect_t  height,
const vect_t  breadth,
fastf_t  r1,
fastf_t  r2
 

WDB_EXPORT int mk_ehy struct rt_wdb wdbp,
const char *  name,
const point_t  vert,
const vect_t  height,
const vect_t  breadth,
fastf_t  r1,
fastf_t  r2,
fastf_t  c
 

WDB_EXPORT int mk_eto struct rt_wdb wdbp,
const char *  name,
const point_t  vert,
const vect_t  norm,
const vect_t  smajor,
fastf_t  rrot,
fastf_t  sminor
 

WDB_EXPORT WDB_EXTERN int  mk_arbn,
(struct rt_wdb *fp, const char *name, int neqn, plane_t eqn[]) 
 

WDB_EXPORT WDB_EXTERN int  mk_ars,
(struct rt_wdb *fp, const char *name, int ncurves, int pts_per_curve, fastf_t *curves[]) 
 

WDB_EXPORT WDB_EXTERN int  mk_binunif,
(struct rt_wdb *fp, const char *name, const genptr_t data, wdb_binunif data_type, long count) 
 

WDB_EXPORT int mk_bot struct rt_wdb fp,
const char *  name,
unsigned char  mode,
unsigned char  orientation,
unsigned char  error_mode,
int  num_vertices,
int  num_faces,
fastf_t vertices,
int *  faces,
fastf_t thickness,
struct bu_bitv face_mode
 

a flag for each face indicating thickness is appended to hit point, otherwise thickness is centered about hit point

Parameters:
error_mode  may be used to indicate error handling (ignored for now)
vertices  array of floats for vertices [num_vertices*3]
faces  array of ints for faces [num_faces*3]
thickness  array of plate mode thicknesses (corresponds to array of faces) NULL for modes RT_BOT_SURFACE and RT_BOT_SOLID.

WDB_EXPORT int mk_bot_w_normals struct rt_wdb fp,
const char *  name,
unsigned char  mode,
unsigned char  orientation,
unsigned char  flags,
int  num_vertices,
int  num_faces,
fastf_t vertices,
int *  faces,
fastf_t thickness,
struct bu_bitv face_mode,
int  num_normals,
fastf_t normals,
int *  face_normals
 

array of ints (indices into normals array), must have 3*num_faces entries

Parameters:
vertices  array of floats for vertices [num_vertices*3]
faces  array of ints for faces [num_faces*3]
thickness  array of plate mode thicknesses (corresponds to array of faces) NULL for modes RT_BOT_SURFACE and RT_BOT_SOLID.
face_mode  a flag for each face indicating thickness is appended to hit point, otherwise thickness is centered about hit point
num_normals  number of unit normals in normals array
normals  array of floats for normals [num_normals*3]

WDB_EXPORT int mk_bspline struct rt_wdb wdbp,
const char *  name,
struct face_g_snurb **  surfs
 

WDB_EXPORT int mk_nmg struct rt_wdb filep,
const char *  name,
struct model m
 

WDB_EXPORT int mk_bot_from_nmg struct rt_wdb ofp,
const char *  name,
struct shell s
 

WDB_EXPORT int mk_sketch struct rt_wdb fp,
const char *  name,
struct rt_sketch_internal skt
 

WDB_EXPORT int mk_extrusion struct rt_wdb fp,
const char *  name,
const char *  sketch_name,
const point_t  V,
const vect_t  h,
const vect_t  u_vec,
const vect_t  v_vec,
int  keypoint
 

WDB_EXPORT int mk_cline struct rt_wdb fp,
const char *  name,
const point_t  V,
const vect_t  height,
fastf_t  radius,
fastf_t  thickness
 

WDB_EXPORT WDB_EXTERN int  mk_particle,
(struct rt_wdb *fp, const char *name, point_t vertex, vect_t height, double vradius, double hradius) 
 

WDB_EXPORT WDB_EXTERN int  mk_pipe,
(struct rt_wdb *fp, const char *name, struct bu_list *headp) 
 

WDB_EXPORT void mk_pipe_free struct bu_list headp  ) 
 

WDB_EXPORT void mk_add_pipe_pt struct bu_list headp,
const point_t  coord,
double  od,
double  id,
double  bendradius
 

WDB_EXPORT void mk_pipe_init struct bu_list headp  ) 
 

WDB_EXPORT WDB_EXTERN int  mk_dsp,
(struct rt_wdb *fp, const char *name, const char *file, int xdim, int ydim, const matp_t mat) 
 

WDB_EXPORT WDB_EXTERN int  mk_ebm,
(struct rt_wdb *fp, const char *name, const char *file, int xdim, int ydim, fastf_t tallness, const matp_t mat) 
 

WDB_EXPORT WDB_EXTERN int  mk_vol,
(struct rt_wdb *fp, const char *name, const char *file, int xdim, int ydim, int zdim, int lo, int hi, const vect_t cellsize, const matp_t mat) 
 

WDB_EXPORT WDB_EXTERN int  mk_submodel,
(struct rt_wdb *fp, const char *name, const char *file, const char *treetop, int meth) 
 

WDB_EXPORT int mk_write_color_table struct rt_wdb ofp  ) 
 

WDB_EXPORT WDB_EXTERN struct wmember mk_addmember,
(const char *name, struct bu_list *headp, mat_tmat, intop) 
 

WDB_EXPORT int mk_comb struct rt_wdb wdbp,
const char *  combname,
struct bu_list headp,
int  region_kind,
const char *  shadername,
const char *  shaderargs,
const unsigned char *  rgb,
int  id,
int  air,
int  material,
int  los,
int  inherit,
int  append_ok,
int  gift_semantics
 

0 = pure, 1 = gift

Parameters:
headp  Made by mk_addmember()
region_kind  1 => region. 'P' and 'V' for FASTGEN
shadername  shader name, or NULL
shaderargs  shader args, or NULL
rgb  NULL => no color
id  region_id
air  aircode
material  GIFTmater
append_ok  0 = obj must not exit

WDB_EXPORT int mk_comb1 struct rt_wdb fp,
const char *  combname,
const char *  membname,
int  regflag
 

Convenience routines for quickly making combinations

WDB_EXPORT int mk_region1 struct rt_wdb fp,
const char *  combname,
const char *  membname,
const char *  shadername,
const char *  shaderargs,
const unsigned char *  rgb
 

WDB_EXPORT WDB_EXTERN int  mk_conversion,
(char *units_string) 
 

WDB_EXPORT WDB_EXTERN int  mk_set_conversion,
(double val
 

WDB_EXPORT void mk_freemembers struct bu_list headp  ) 
 

WDB_EXPORT WDB_EXTERN int  make_hole,
(struct rt_wdb *wdbp, point_t hole_start, vect_t hole_depth, fastf_t hole_radius, int num_objs, struct directory **dp) 
 

WDB_EXPORT WDB_EXTERN int  make_hole_in_prepped_regions,
(struct rt_wdb *wdbp, struct rt_i *rtip, point_t hole_start, vect_t hole_depth, fastf_t radius, struct bu_ptbl *regions) 
 

HIDDEN void wdb_free_tokens struct bu_list hp  ) 
 

Definition at line 75 of file wdb_comb_std.c.

References BU_CK_LIST_HEAD, BU_LIST_DEQUEUE, BU_LIST_WHILE, db_free_tree(), tokens::l, rt_uniresource, tokens::tp, tokens::type, and WDB_TOK_TREE.

Referenced by wdb_add_operator().

Here is the call graph for this function:

HIDDEN void wdb_append_union struct bu_list hp  ) 
 

Definition at line 91 of file wdb_comb_std.c.

References BU_CK_LIST_HEAD, BU_LIST_INSERT, bu_malloc(), tokens::l, NULL, tokens::tp, tokens::type, and WDB_TOK_UNION.

Referenced by wdb_add_operator().

Here is the call graph for this function:

HIDDEN void wdb_append_inter struct bu_list hp  ) 
 

Definition at line 104 of file wdb_comb_std.c.

References BU_CK_LIST_HEAD, BU_LIST_INSERT, bu_malloc(), tokens::l, NULL, tokens::tp, tokens::type, and WDB_TOK_INTER.

Referenced by wdb_add_operator().

Here is the call graph for this function:

HIDDEN void wdb_append_subtr struct bu_list hp  ) 
 

Definition at line 117 of file wdb_comb_std.c.

References BU_CK_LIST_HEAD, BU_LIST_INSERT, bu_malloc(), tokens::l, NULL, tokens::tp, tokens::type, and WDB_TOK_SUBTR.

Referenced by wdb_add_operator().

Here is the call graph for this function:

HIDDEN void wdb_append_lparen struct bu_list hp  ) 
 

Definition at line 130 of file wdb_comb_std.c.

References BU_CK_LIST_HEAD, BU_LIST_INSERT, bu_malloc(), tokens::l, NULL, tokens::tp, tokens::type, and WDB_TOK_LPAREN.

Referenced by wdb_comb_std_cmd().

Here is the call graph for this function:

HIDDEN void wdb_append_rparen struct bu_list hp  ) 
 

Definition at line 143 of file wdb_comb_std.c.

References BU_CK_LIST_HEAD, BU_LIST_INSERT, bu_malloc(), tokens::l, NULL, tokens::tp, tokens::type, and WDB_TOK_RPAREN.

Referenced by wdb_comb_std_cmd().

Here is the call graph for this function:

HIDDEN int wdb_add_operator Tcl_Interp interp,
struct bu_list hp,
char  ch,
short int *  last_tok
 

Definition at line 156 of file wdb_comb_std.c.

References BU_CK_LIST_HEAD, interp, NULL, TCL_ERROR, TCL_OK, wdb_append_inter(), wdb_append_subtr(), wdb_append_union(), wdb_free_tokens(), WDB_TOK_INTER, WDB_TOK_SUBTR, and WDB_TOK_UNION.

Here is the call graph for this function:

HIDDEN int wdb_add_operand Tcl_Interp interp,
struct bu_list hp,
char *  name
 

Definition at line 188 of file wdb_comb_std.c.

References BU_CK_LIST_HEAD, BU_LIST_INSERT, bu_malloc(), interp, tokens::l, tree::magic, NULL, OP_DB_LEAF, RT_GET_TREE, RT_TREE_MAGIC, rt_uniresource, tree::tree_db_leaf::tl_mat, tree::tree_db_leaf::tl_name, tokens::tp, tree::tr_l, tokens::type, and WDB_TOK_TREE.

Here is the call graph for this function:

HIDDEN void wdb_do_inter struct bu_list hp  ) 
 

Definition at line 246 of file wdb_comb_std.c.

References bu_free(), BU_LIST_DEQUEUE, BU_LIST_FOR, BU_LIST_NEXT, BU_LIST_PREV, bu_malloc(), tokens::l, tree::magic, NULL, OP_INTERSECT, RT_TREE_MAGIC, tree::tree_node::tb_left, tree::tree_node::tb_op, tree::tree_node::tb_regionp, tree::tree_node::tb_right, tokens::tp, tree::tr_b, tokens::type, WDB_TOK_INTER, and WDB_TOK_TREE.

Referenced by wdb_eval_bool().

Here is the call graph for this function:

HIDDEN void wdb_do_union_subtr struct bu_list hp  ) 
 

Definition at line 280 of file wdb_comb_std.c.

References bu_free(), BU_LIST_DEQUEUE, BU_LIST_FOR, BU_LIST_NEXT, BU_LIST_PREV, bu_malloc(), tokens::l, tree::magic, NULL, OP_SUBTRACT, OP_UNION, RT_TREE_MAGIC, tree::tree_node::tb_left, tree::tree_node::tb_op, tree::tree_node::tb_regionp, tree::tree_node::tb_right, tokens::tp, tree::tr_b, tokens::type, WDB_TOK_SUBTR, WDB_TOK_TREE, and WDB_TOK_UNION.

Referenced by wdb_eval_bool().

Here is the call graph for this function:

HIDDEN int wdb_do_paren struct bu_list hp  ) 
 

Definition at line 317 of file wdb_comb_std.c.

References bu_list::back, bu_free(), BU_LIST_DEQUEUE, BU_LIST_FOR, BU_LIST_IS_EMPTY, BU_LIST_NEXT, BU_LIST_PREV, bu_list::forw, tokens::l, tokens::type, WDB_TOK_LPAREN, WDB_TOK_RPAREN, and WDB_TOK_TREE.

Referenced by wdb_eval_bool().

Here is the call graph for this function:

HIDDEN union tree* wdb_eval_bool struct bu_list hp  ) 
 

Definition at line 350 of file wdb_comb_std.c.

References bu_free(), BU_LIST_DEQUEUE, BU_LIST_NEXT, tokens::l, NULL, tokens::tp, wdb_do_inter(), wdb_do_paren(), and wdb_do_union_subtr().

Here is the call graph for this function:

HIDDEN int wdb_check_syntax Tcl_Interp interp,
struct db_i dbip,
struct bu_list hp,
char *  comb_name,
struct directory dp
 

Definition at line 374 of file wdb_comb_std.c.

References BU_LIST_FOR, db_lookup(), DBI_NULL, DIR_NULL, interp, LOOKUP_QUIET, NULL, tree::tree_db_leaf::tl_name, tokens::tp, tree::tr_l, tokens::type, WDB_TOK_INTER, WDB_TOK_LPAREN, WDB_TOK_NULL, WDB_TOK_RPAREN, WDB_TOK_SUBTR, WDB_TOK_TREE, and WDB_TOK_UNION.

Here is the call graph for this function:

int wdb_comb_std_cmd struct rt_wdb wdbp,
Tcl_Interp interp,
int  argc,
char **  argv
 

Definition at line 464 of file wdb_comb_std.c.

References rt_comb_internal::aircode, bu_getopt(), BU_LIST_INIT, bu_optind, bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), directory::d_flags, db_lookup(), db_i::dbi_read_only, rt_wdb::dbip, DIR_COMB, DIR_NULL, rt_comb_internal::GIFTmater, rt_db_internal::idb_ptr, interp, tokens::l, LOOKUP_NOISY, LOOKUP_QUIET, rt_comb_internal::los, NULL, PRINT_USAGE, ptr, rt_comb_internal::region_flag, rt_comb_internal::region_id, RT_CK_COMB, rt_db_free_internal(), rt_db_get_internal(), rt_db_put_internal(), RT_MAXARGS, rt_uniresource, TCL_ERROR, TCL_OK, tokens::type, rt_wdb::wdb_air_default, wdb_append_lparen(), wdb_append_rparen(), rt_wdb::wdb_item_default, rt_wdb::wdb_los_default, rt_wdb::wdb_mat_default, WDB_TOK_LPAREN, WDB_TOK_NULL, and WDB_TOK_RPAREN.

Referenced by wdb_comb_std_tcl().

Here is the call graph for this function:

int wdb_comb_std_tcl ClientData  clientData,
Tcl_Interp interp,
int  argc,
char **  argv
 

Definition at line 774 of file wdb_comb_std.c.

References interp, and wdb_comb_std_cmd().

Here is the call graph for this function:


Variable Documentation

WDB_EXPORT double mk_conv2mm
 

Conversion factor to mm.

This internal variable should not be directly modified; call mk_conversion() or mk_set_conversion() instead.

WDB_EXPORT int mk_version
 

Which version database to write.

Set this variable to either 4 or 5, depending on which version of the database you wish to write.


Generated on Mon Sep 18 01:25:46 2006 for BRL-CAD by  doxygen 1.4.6