Bsoft 2.1.4
Bernard's software package
tcltk_bmodel.cpp File Reference

A shared object to load Bsoft model files in TCL/Tk. More...

#include <tk.h>
#include "tcltk_bmodel.h"
#include "rwmodel.h"
#include "rwimg.h"
#include "model_create.h"
#include "model_map.h"
#include "model_select.h"
#include "model_mask.h"
#include "model_color.h"
#include "model_views.h"
#include "mg_processing.h"
#include "Vector3.h"
#include "linked_list.h"
#include "Color.h"
#include "utilities.h"

Functions

Tcl_Obj * do_find (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * do_get (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
int do_set (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
int do_delete (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
int do_delete_non_selected (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
int do_components_to_particles (Bmodel *model, Bproject *project, int objc, Tcl_Obj *CONST objv[])
 
int do_extract_segments (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
int do_create_shell (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * do_component_type (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * do_component (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * do_link (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * comptype_count (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * comptype_count_selected (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * comptype_ids (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * comptype_list (Bmodel *model)
 
Tcl_Obj * comptype_create_update (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * comptype_select (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * comptype_deselect (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * comptype_first_selected (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_count (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_count_selected (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_ids (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_location (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_distance (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_img_coords (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_fom (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_radius (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_select (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_move (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_create (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_delete (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * component_color (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * link_count (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * link_count_selected (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * link_ids (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * link_img_coords (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * link_select (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * link_create (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
Tcl_Obj * link_delete (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 
int model_processing (Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
 Implements the "Bmodel" command in Tcl/Tk to access model parameter files through Bsoft. More...
 
int set_component_radius (Bmodel *model, float radius)
 
int set_link_radius (Bmodel *model, float radius)
 
Tcl_Obj * draw_components (Bmodel *model, int objc, Tcl_Obj *CONST objv[])
 

Variables

int verbose
 
Bimageimglist
 
Bmodelmodel
 
Bprojectproject
 

Detailed Description

A shared object to load Bsoft model files in TCL/Tk.

Author
Bernard Heymann
Date
Created: 20071002
Modified: 20191010

Function Documentation

◆ component_color()

Tcl_Obj * component_color ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_count()

Tcl_Obj * component_count ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_count_selected()

Tcl_Obj * component_count_selected ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_create()

Tcl_Obj * component_create ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_delete()

Tcl_Obj * component_delete ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_distance()

Tcl_Obj * component_distance ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_fom()

Tcl_Obj * component_fom ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_ids()

Tcl_Obj * component_ids ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_img_coords()

Tcl_Obj * component_img_coords ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_location()

Tcl_Obj * component_location ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_move()

Tcl_Obj * component_move ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_radius()

Tcl_Obj * component_radius ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ component_select()

Tcl_Obj * component_select ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ comptype_count()

Tcl_Obj * comptype_count ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ comptype_count_selected()

Tcl_Obj * comptype_count_selected ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ comptype_create_update()

Tcl_Obj * comptype_create_update ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ comptype_deselect()

Tcl_Obj * comptype_deselect ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ comptype_first_selected()

Tcl_Obj * comptype_first_selected ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ comptype_ids()

Tcl_Obj * comptype_ids ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ comptype_list()

Tcl_Obj * comptype_list ( Bmodel model)

◆ comptype_select()

Tcl_Obj * comptype_select ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_component()

Tcl_Obj * do_component ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_component_type()

Tcl_Obj * do_component_type ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_components_to_particles()

int do_components_to_particles ( Bmodel model,
Bproject project,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_create_shell()

int do_create_shell ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_delete()

int do_delete ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_delete_non_selected()

int do_delete_non_selected ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_extract_segments()

int do_extract_segments ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_find()

Tcl_Obj * do_find ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_get()

Tcl_Obj * do_get ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_link()

Tcl_Obj * do_link ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ do_set()

int do_set ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ draw_components()

Tcl_Obj * draw_components ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ link_count()

Tcl_Obj * link_count ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ link_count_selected()

Tcl_Obj * link_count_selected ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ link_create()

Tcl_Obj * link_create ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ link_delete()

Tcl_Obj * link_delete ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ link_ids()

Tcl_Obj * link_ids ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ link_img_coords()

Tcl_Obj * link_img_coords ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ link_select()

Tcl_Obj * link_select ( Bmodel model,
int  objc,
Tcl_Obj *CONST  objv[] 
)

◆ model_processing()

int model_processing ( Tcl_Interp *  interp,
int  objc,
Tcl_Obj *CONST  objv[] 
)

Implements the "Bmodel" command in Tcl/Tk to access model parameter files through Bsoft.

Parameters
*interpa Tcl interpreter within Tcl.
objcnumber of arguments passed (+1).
*objv[]arguments passed as Tcl objects.
Returns
int Tcl result.
Bmodel command syntax:
    Bmodel <action> <arguments>.
    where:
        action          "create", "exists", "read", "write", "kill", "get", "set", "delete"
                        "delete_non_selected", "components_to_particles", "extract_segments",
                        "comptype", "component", "link"
        arguments           action-specific arguments:
            "create"        <id>
            "read"          <filename>
            "write"         <filename>
            "get"           <property> [arguments]
            "set"           <property> <value>
            "delete"        <property>
            "delete_non_selected"   <property> <selection>
            "components_to_particles"
            "extract_segments"  <filename> [multilevel]
            "comptype"      [arguments]
            "component"     [arguments]
            "link"          [arguments]
            where:
                property    "id <string>"
                            "map <string> <value>"
                            "number <value>"
                            "radius <value>"
                            "linkradius <value>"
Return values:
    Each action may have a return value:
        "create"    (none)
        "exists"    0=no, 1=yes
        "read"      model id
        "write"     (none)
        "kill"      (none)
        "get"       return value based on property
        "set"       modify model property

◆ set_component_radius()

int set_component_radius ( Bmodel model,
float  radius 
)

◆ set_link_radius()

int set_link_radius ( Bmodel model,
float  radius 
)

Variable Documentation

◆ imglist

Bimage* imglist
extern

◆ model

Bmodel* model
extern

◆ project

Bproject* project
extern

◆ verbose

int verbose
extern