BRL-CAD
|
Files | |
file | defines.h |
Definitions header file for the BRL-CAD TclCAD Library, LIBTCLCAD. | |
file | draw.h |
Drawing header file for the BRL-CAD TclCAD Library, LIBTCLCAD. | |
file | misc.h |
Miscellaneous header file for the BRL-CAD TclCAD Library, LIBTCLCAD. | |
file | setup.h |
Setup header file for the BRL-CAD TclCAD Library, LIBTCLCAD. | |
file | tclcad.h |
Header file for the BRL-CAD TclCAD Library, LIBTCLCAD. | |
Data Structures | |
struct | tclcad_view_data |
struct | tclcad_ged_data |
struct | tclcad_obj |
struct | tclcad_io_data |
Functions | |
void | go_refresh (struct ged *gedp, struct bview *gdvp) |
void | go_refresh_draw (struct ged *gedp, struct bview *gdvp, int restore_zbuffer) |
int | go_view_axes (struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_data_labels (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_data_arrows (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_data_pick (struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_data_axes (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_data_lines (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_data_move (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_data_move_object_mode (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_data_move_point_mode (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_data_polygons (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_mouse_poly_circ (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_mouse_poly_cont (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_mouse_poly_ell (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_mouse_poly_rect (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_poly_circ_mode (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_poly_ell_mode (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_poly_rect_mode (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_run_tclscript (Tcl_Interp *interp, const char *tclscript, struct bu_vls *result_str) |
int | go_poly_cont_build (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
int | go_poly_cont_build_end (Tcl_Interp *interp, struct ged *gedp, struct bview *gdvp, int argc, const char *argv[], const char *usage) |
void | fb_tcl_setup (void) |
void | tclcad_bn_mat_print (Tcl_Interp *interp, const char *title, const mat_t m) |
int | tclcad_rt_parse_ray (Tcl_Interp *interp, struct xray *rp, const char *const *argv) |
void | tclcad_rt_pr_cutter (Tcl_Interp *interp, const union cutter *cutp) |
int | tclcad_rt_cutter (ClientData clientData, Tcl_Interp *interp, int argc, const char *const *argv) |
void | tclcad_rt_pr_hit (Tcl_Interp *interp, struct hit *hitp, const struct seg *segp, int flipflag) |
int | tclcad_rt (ClientData clientData, Tcl_Interp *interp, int argc, const char **argv) |
int | tclcad_rt_import_from_path (Tcl_Interp *interp, struct rt_db_internal *ip, const char *path, struct rt_wdb *wdb) |
void | db_full_path_appendresult (Tcl_Interp *interp, const struct db_full_path *pp) |
int | tcl_obj_to_int_array (Tcl_Interp *interp, Tcl_Obj *list, int **array, int *array_len) |
int | tcl_obj_to_fastf_array (Tcl_Interp *interp, Tcl_Obj *list, fastf_t **array, int *array_len) |
int | tcl_list_to_int_array (Tcl_Interp *interp, char *char_list, int **array, int *array_len) |
int | tcl_list_to_fastf_array (Tcl_Interp *interp, const char *char_list, fastf_t **array, int *array_len) |
int | to_open_tcl (ClientData clientData, Tcl_Interp *interp, int argc, const char **argv) |
struct application * | to_rt_gettrees_application (struct ged *gedp, int argc, const char *argv[]) |
struct tclcad_io_data * | tclcad_create_io_data (void) |
void | tclcad_destroy_io_data (struct tclcad_io_data *d) |
void | tclcad_create_io_handler (struct ged_subprocess *p, bu_process_io_t d, ged_io_func_t callback, void *data) |
void | tclcad_delete_io_handler (struct ged_subprocess *p, bu_process_io_t d) |
int | tclcad_tk_setup (Tcl_Interp *interp) |
void | tclcad_auto_path (Tcl_Interp *interp) |
void | tclcad_tcl_library (Tcl_Interp *interp) |
void | tclcad_bn_setup (Tcl_Interp *interp) |
void | tclcad_rt_setup (Tcl_Interp *interp) |
int | Rt_Init (Tcl_Interp *interp) |
int | Cho_Init (Tcl_Interp *interp) |
int | cho_open_tcl (ClientData clientData, Tcl_Interp *interp, int argc, const char **argv) |
void | tclcad_register_cmds (Tcl_Interp *interp, struct bu_cmdtab *cmds) |
void | tclcad_set_argv (Tcl_Interp *interp, int argc, const char **argv) |
int | tclcad_init (Tcl_Interp *interp, int init_gui, struct bu_vls *tlog) |
#define TCLCAD_OBJ_NULL (struct tclcad_obj *)0 |
int go_view_axes | ( | struct ged * | gedp, |
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_data_labels | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_data_arrows | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_data_pick | ( | struct ged * | gedp, |
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_data_axes | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_data_lines | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_data_move | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_data_move_object_mode | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_data_move_point_mode | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_data_polygons | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_mouse_poly_circ | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_mouse_poly_cont | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_mouse_poly_ell | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_mouse_poly_rect | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_poly_circ_mode | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_poly_ell_mode | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_poly_rect_mode | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_run_tclscript | ( | Tcl_Interp * | interp, |
const char * | tclscript, | ||
struct bu_vls * | result_str | ||
) |
int go_poly_cont_build | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
int go_poly_cont_build_end | ( | Tcl_Interp * | interp, |
struct ged * | gedp, | ||
struct bview * | gdvp, | ||
int | argc, | ||
const char * | argv[], | ||
const char * | usage | ||
) |
void fb_tcl_setup | ( | void | ) |
void tclcad_bn_mat_print | ( | Tcl_Interp * | interp, |
const char * | title, | ||
const mat_t | m | ||
) |
int tclcad_rt_parse_ray | ( | Tcl_Interp * | interp, |
struct xray * | rp, | ||
const char *const * | argv | ||
) |
Allow specification of a ray to trace, in two convenient formats.
Examples - {0 0 0} dir {0 0 -1} {20 -13.5 20} at {10 .5 3}
void tclcad_rt_pr_cutter | ( | Tcl_Interp * | interp, |
const union cutter * | cutp | ||
) |
Format a "union cutter" structure in a TCL-friendly format. Useful for debugging space partitioning
Examples - type cutnode type boxnode
int tclcad_rt_cutter | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | argc, | ||
const char *const * | argv | ||
) |
void tclcad_rt_pr_hit | ( | Tcl_Interp * | interp, |
struct hit * | hitp, | ||
const struct seg * | segp, | ||
int | flipflag | ||
) |
Format a hit in a TCL-friendly format.
It is possible that a solid may have been removed from the directory after this database was prepped, so check pointers carefully.
It might be beneficial to use some format other than g to give the user more precision.
int tclcad_rt | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | argc, | ||
const char ** | argv | ||
) |
Generic interface for the LIBRT_class manipulation routines.
Usage: procname dbCmdName ?args? Returns: result of cmdName LIBRT operation.
Objects of type 'procname' must have been previously created by the 'rt_gettrees' operation performed on a database object.
Example - .inmem rt_gettrees .rt all.g .rt shootray {0 0 0} dir {0 0 -1}
int tclcad_rt_import_from_path | ( | Tcl_Interp * | interp, |
struct rt_db_internal * | ip, | ||
const char * | path, | ||
struct rt_wdb * | wdb | ||
) |
Given the name of a database object or a full path to a leaf object, obtain the internal form of that leaf. Packaged separately mainly to make available nice Tcl error handling.
Returns - TCL_OK TCL_ERROR
void db_full_path_appendresult | ( | Tcl_Interp * | interp, |
const struct db_full_path * | pp | ||
) |
Take a db_full_path and append it to the TCL result string.
NOT moving to db_fullpath.h because it is evil Tcl_Interp api
int tcl_obj_to_int_array | ( | Tcl_Interp * | interp, |
Tcl_Obj * | list, | ||
int ** | array, | ||
int * | array_len | ||
) |
Expects the Tcl_obj argument (list) to be a Tcl list and extracts list elements, converts them to int, and stores them in the passed in array. If the array_len argument is zero, a new array of appropriate length is allocated. The return value is the number of elements converted.
int tcl_obj_to_fastf_array | ( | Tcl_Interp * | interp, |
Tcl_Obj * | list, | ||
fastf_t ** | array, | ||
int * | array_len | ||
) |
Expects the Tcl_obj argument (list) to be a Tcl list and extracts list elements, converts them to fastf_t, and stores them in the passed in array. If the array_len argument is zero, a new array of appropriate length is allocated. The return value is the number of elements converted.
int tcl_list_to_int_array | ( | Tcl_Interp * | interp, |
char * | char_list, | ||
int ** | array, | ||
int * | array_len | ||
) |
interface to above tcl_obj_to_int_array() routine. This routine expects a character string instead of a Tcl_Obj.
Returns the number of elements converted.
int tcl_list_to_fastf_array | ( | Tcl_Interp * | interp, |
const char * | char_list, | ||
fastf_t ** | array, | ||
int * | array_len | ||
) |
interface to above tcl_obj_to_fastf_array() routine. This routine expects a character string instead of a Tcl_Obj.
returns the number of elements converted.
int to_open_tcl | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | argc, | ||
const char ** | argv | ||
) |
struct application * to_rt_gettrees_application | ( | struct ged * | gedp, |
int | argc, | ||
const char * | argv[] | ||
) |
struct tclcad_io_data * tclcad_create_io_data | ( | void | ) |
void tclcad_destroy_io_data | ( | struct tclcad_io_data * | d | ) |
void tclcad_create_io_handler | ( | struct ged_subprocess * | p, |
bu_process_io_t | d, | ||
ged_io_func_t | callback, | ||
void * | data | ||
) |
void tclcad_delete_io_handler | ( | struct ged_subprocess * | p, |
bu_process_io_t | d | ||
) |
int tclcad_tk_setup | ( | Tcl_Interp * | interp | ) |
void tclcad_auto_path | ( | Tcl_Interp * | interp | ) |
void tclcad_tcl_library | ( | Tcl_Interp * | interp | ) |
void tclcad_bn_setup | ( | Tcl_Interp * | interp | ) |
void tclcad_rt_setup | ( | Tcl_Interp * | interp | ) |
Add all the supported Tcl interfaces to LIBRT routines to the list of commands known by the given interpreter.
wdb_open creates database "objects" which appear as Tcl procs, which respond to many operations.
The "db rt_gettrees" operation in turn creates a ray-traceable object as yet another Tcl proc, which responds to additional operations.
Note that the MGED mainline C code automatically runs "wdb_open db" and "wdb_open .inmem" on behalf of the MGED user, which exposes all of this power.
int Rt_Init | ( | Tcl_Interp * | interp | ) |
Allows LIBRT to be dynamically loaded to a vanilla tclsh/wish with "load /usr/brlcad/lib/libbu.so" "load /usr/brlcad/lib/libbn.so" "load /usr/brlcad/lib/librt.so"
int Cho_Init | ( | Tcl_Interp * | interp | ) |
int cho_open_tcl | ( | ClientData | clientData, |
Tcl_Interp * | interp, | ||
int | argc, | ||
const char ** | argv | ||
) |
Open a command history object.
USAGE: ch_open name
void tclcad_register_cmds | ( | Tcl_Interp * | interp, |
struct bu_cmdtab * | cmds | ||
) |
This is a convenience routine for registering an array of commands with a Tcl interpreter. Note - this is not intended for use by commands with associated state (i.e. ClientData). The interp is passed to the bu_cmdtab function as clientdata instead of the bu_cmdtab entry.
interp | - Tcl interpreter wherein to register the commands |
cmds | - commands and related function pointers |
void tclcad_set_argv | ( | Tcl_Interp * | interp, |
int | argc, | ||
const char ** | argv | ||
) |
Set the variables "argc" and "argv" in interp.
int tclcad_init | ( | Tcl_Interp * | interp, |
int | init_gui, | ||
struct bu_vls * | tlog | ||
) |
This is the "all-in-one" initialization intended for use by applications that are providing a Tcl_Interp and want to initialize all of the BRL-CAD Tcl/Tk interfaces.
libbu, libbn, librt, libged, and Itcl are always initialized.
To initialize graphical elements (Tk/Itk), set init_gui to 1.