Skip to content

Commit

Permalink
sync with r32275 changes on trunk. after some discussions on the chan…
Browse files Browse the repository at this point in the history
…nel, rename the 'binary' command in mge to the 'bo' command (for binary object). this was done due to the fact that Tcl already has a 'binary' command and ours ends up masking it - a cnflict that mysteriously didn't surface during early 8.5 testing but is still there. this relates to tom browders sf bug 1532699 that prompted th initial change. other options considered: import/export, data, blob, borg, dbblob, adddata, ...

svn:revision:32277
svn:branch:pre-7-12-6
svn:account:brlcad
  • Loading branch information
brlcad committed Aug 6, 2008
2 parents 4eeeae6 + d0ff797 commit 0afa6a2
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 23 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ performance problems during raytracing, due to unnecessary memory
allocations, are now fixed. The extrude primitive's handling of
invalid geometry is now more robust.

* renamed mged binary command to bo for binary objects - Sean Morrison
* fixed error in parsing remotefb location specification - S. Morrison
* add w option to tire to allow disabling wheel generation - C. Yapp
* tweak tread 2 in tire tool; avoid artifacts on tread wall - C. Yapp
Expand Down
9 changes: 9 additions & 0 deletions doc/deprecation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ new names should be listed for reference.
**************
* DEPRECATED *
**************

7.12
----
include/raytrace.h
Expand All @@ -56,6 +57,7 @@ include/vmath.h
HVECT_LEN -> ELEMENTS_PER_HVECT
HPT_LEN -> ELEMENTS_PER_HPOINT
M_SQRT2_DIV2 -> M_SQRT1_2
PI -> M_PI
srt/librt/cmd.c
rt_split_cmd() -> bu_argv_from_string() [deprecated 7.12]
src/rt/viewarea.c
Expand Down Expand Up @@ -88,6 +90,11 @@ include/raytrace.h
* OBSOLETE *
************

7.12.6
------
mged
binary -> bo [rename]

7.12.4
------
include/raytrace.h
Expand Down Expand Up @@ -131,6 +138,8 @@ include/noalias.h
removed [non-stdc]
src/librt/wdb_obj.c -> src/librt/db_obj.c
removed wdb_tree_cmd(), added dgo_tree_cmd() [rename]
mged
dbbinary -> binary [rename]


7.10.4
Expand Down
10 changes: 5 additions & 5 deletions doc/html/manuals/mged/mged_cmd_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<TD WIDTH="22%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#bev"><FONT SIZE=2>bev</FONT></A></TD>
<TD WIDTH="21%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#binary"><FONT SIZE=2>binary</FONT></A></TD>
<FONT SIZE=2><P></FONT><A HREF="#bo"><FONT SIZE=2>bo</FONT></A></TD>
</TR>
<TR><TD WIDTH="18%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#bot_condense"><FONT SIZE=2>bot_condense</FONT></A></TD>
Expand Down Expand Up @@ -890,8 +890,8 @@
</FONT>

<DL>
<B><A NAME="binary"></A>binary </B><I>[-o|-i pattern type] dest source</I> </DT>
<DD>The &quot;binary&quot; command is used to create or retrieve binary opaque objects. One of <I>-i</I> or <I>-o</I> must be specified.</DD>
<B><A NAME="bo"></A>bo </B><I>[-o|-i pattern type] dest source</I> </DT>
<DD>The &quot;bo&quot; command is used to create or retrieve binary opaque objects. One of <I>-i</I> or <I>-o</I> must be specified.</DD>
<dd>The <i>-o</i> option &quot;outputs&quot; or extracts a binary object from the database object <i>source</i> to a file called <i>dest</i>.</dd>
<dd>The <i>-i</i> option &quot;inputs&quot; or imports a file called <i>source</i> into a binary object called <i>dest</i> in the database. There are two additional arguments that must be specified with the <i>-i</i> option: pattern and type. Currently, only uniform binary objects (arrays of values) are supported. As a result, the <i>pattern</i> is always <i>u</i> for &quot;uniform&quot; pattern. The <i>type</i> can be one of the following:
<DD><i>f </I>-&gt; float</DD>
Expand All @@ -906,10 +906,10 @@
<DD><I>L </I>-&gt; unsigned long (64 bit)</DD>
<DD> </DD>
<DT><FONT SIZE=4>Examples: </DT></FONT>
<DD> <TT>mged&gt;</TT> <B>binary -i -u c cmds /usr/brlcad/html/manuals/mged/mged_cmds.html</B></DD>
<DD> <TT>mged&gt;</TT> <B>bo -i -u c cmds /usr/brlcad/html/manuals/mged/mged_cmds.html</B></DD>
<DD>-- Create an opaque uniform binary object of characters with the name <I>cmds</I> that contains the contents of the file <I>/usr/brlcad/html/manuals/mged/mged_cmds.html.</I></DD>
<DD></DD>
<DD><TT>mged&gt;</TT> <B>binary -o /home/jim/cmds.html cmds</B></DD>
<DD><TT>mged&gt;</TT> <B>bo -o /home/jim/cmds.html cmds</B></DD>
<DD>-- Copy the contents of the binary object named <I>cmds</I> into the file named <i>/home/jim/cmds.html.</i></DD>
</dl>
<DT><HR ALIGN="RIGHT"></DT>
Expand Down
2 changes: 1 addition & 1 deletion regress/gqa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ echo "2 1 gas" >> density_table.txt

cat > gqa.mged <<EOF
units m
binary -i u c _DENSITIES density_table.txt
bo -i u c _DENSITIES density_table.txt
in box1.s rpp 0 10 0 10 0 10
in box2.s rpp 1 9 1 9 1 9
Expand Down
2 changes: 1 addition & 1 deletion src/gtools/g_qa.1
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Once the table has been verified as correct and complete, it is imported to the
To import the text file into the database, the following comand is used:
.IP
mged>
.B binary \-i u c _DENSITIES
.B bo \-i u c _DENSITIES
.I filename

.SH GEOMETRY ERROR DETECTION
Expand Down
22 changes: 11 additions & 11 deletions src/libged/wdb_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static int wdb_summary_tcl(ClientData clientData, Tcl_Interp *interp, int argc,
static int wdb_pathlist_tcl(ClientData clientData, Tcl_Interp *interp, int argc, char **argv);
static int wdb_lt_tcl(ClientData clientData, Tcl_Interp *interp, int argc, char **argv);
static int wdb_version_tcl(ClientData clientData, Tcl_Interp *interp, int argc, char **argv);
static int wdb_binary_tcl(ClientData clientData, Tcl_Interp *interp, int argc, char **argv);
static int wdb_bo_tcl(ClientData clientData, Tcl_Interp *interp, int argc, char **argv);
static int wdb_bot_face_sort_tcl(ClientData clientData, Tcl_Interp *interp, int argc, char **argv);
static int wdb_bot_decimate_tcl(ClientData clientData, Tcl_Interp *interp, int argc, char **argv);
static int wdb_move_arb_edge_tcl(ClientData clientData, Tcl_Interp *interp, int argc, char **argv);
Expand Down Expand Up @@ -339,7 +339,7 @@ static struct bu_cmdtab wdb_cmds[] = {
{"adjust", wdb_adjust_tcl},
{"arced", wdb_newcmds_tcl},
{"attr", wdb_attr_tcl},
{"binary", wdb_binary_tcl},
{"bo", wdb_bo_tcl},
{"bot_face_sort", wdb_bot_face_sort_tcl},
{"bot_decimate", wdb_bot_decimate_tcl},
{"c", wdb_comb_std_tcl},
Expand Down Expand Up @@ -9092,7 +9092,7 @@ wdb_bot_smooth_tcl(ClientData clientData,
*
*/
int
wdb_binary_cmd(struct rt_wdb *wdbp,
wdb_bo_cmd(struct rt_wdb *wdbp,
Tcl_Interp *interp,
int argc,
char **argv)
Expand Down Expand Up @@ -9142,7 +9142,7 @@ wdb_binary_cmd(struct rt_wdb *wdbp,

if ( input_mode + output_mode != 1 ) {
bu_vls_init(&vls);
bu_vls_printf(&vls, "helplib_alias binary %s", cname);
bu_vls_printf(&vls, "helplib_alias bo %s", cname);
Tcl_Eval(interp, bu_vls_addr(&vls));
bu_vls_free(&vls);
return TCL_ERROR;
Expand All @@ -9153,7 +9153,7 @@ wdb_binary_cmd(struct rt_wdb *wdbp,

if ( (input_mode && argc != 4) || (output_mode && argc != 2) ) {
bu_vls_init(&vls);
bu_vls_printf(&vls, "helplib_alias binary %s", cname);
bu_vls_printf(&vls, "helplib_alias bo %s", cname);
Tcl_Eval(interp, bu_vls_addr(&vls));
bu_vls_free(&vls);
return TCL_ERROR;
Expand Down Expand Up @@ -9223,7 +9223,7 @@ wdb_binary_cmd(struct rt_wdb *wdbp,

if ( minor_type == 0 ) {
bu_vls_init(&vls);
bu_vls_printf(&vls, "helplib_alias binary %s", cname);
bu_vls_printf(&vls, "helplib_alias bo %s", cname);
Tcl_Eval(interp, bu_vls_addr(&vls));
bu_vls_free(&vls);
return TCL_ERROR;
Expand Down Expand Up @@ -9315,7 +9315,7 @@ wdb_binary_cmd(struct rt_wdb *wdbp,
return TCL_OK;
} else {
bu_vls_init(&vls);
bu_vls_printf(&vls, "helplib_alias binary %s", cname);
bu_vls_printf(&vls, "helplib_alias bo %s", cname);
Tcl_Eval(interp, bu_vls_addr(&vls));
bu_vls_free(&vls);
return TCL_ERROR;
Expand All @@ -9327,17 +9327,17 @@ wdb_binary_cmd(struct rt_wdb *wdbp,

/**
* Usage:
* procname binary args
* procname bo args
*/
static int
wdb_binary_tcl(ClientData clientData,
wdb_bo_tcl(ClientData clientData,
Tcl_Interp *interp,
int argc,
char **argv)
{
struct rt_wdb *wdbp = (struct rt_wdb *)clientData;

return wdb_binary_cmd(wdbp, interp, argc-1, argv+1);
return wdb_bo_cmd(wdbp, interp, argc-1, argv+1);
}

/**
Expand Down Expand Up @@ -9754,7 +9754,7 @@ wdb_vls_long_dpp(struct bu_vls *vls,
len = 6;
break;
case DB5_MAJORTYPE_BINARY_MIME:
len = strlen( "binary (mime)" );
len = strlen( "binary(mime)" );
break;
case DB5_MAJORTYPE_BINARY_UNIF:
len = strlen( binu_types[list_of_names[i]->d_minor_type] );
Expand Down
4 changes: 2 additions & 2 deletions src/mged/chgmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,14 +1168,14 @@ set_localunit_TclVar(void)


int
f_binary(ClientData clientData,
f_bo(ClientData clientData,
Tcl_Interp *interp,
int argc,
char **argv)
{
CHECK_DBI_NULL;

return wdb_binary_cmd(wdbp, interp, argc, argv);
return wdb_bo_cmd(wdbp, interp, argc, argv);
}

int cmd_bot_smooth( ClientData clientData,
Expand Down
2 changes: 1 addition & 1 deletion src/mged/cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ MGED_EXTERN(int f_arced, (ClientData clientData, Tcl_Interp *interp, int argc, c
MGED_EXTERN(int f_area, (ClientData clientData, Tcl_Interp *interp, int argc, char **argv));
MGED_EXTERN(int f_attach, (ClientData clientData, Tcl_Interp *interp, int argc, char **argv));
MGED_EXTERN(int f_bev, (ClientData clientData, Tcl_Interp *interp, int argc, char **argv));
MGED_EXTERN(int f_binary, (ClientData clientData, Tcl_Interp *interp, int argc, char **argv));
MGED_EXTERN(int f_bo, (ClientData clientData, Tcl_Interp *interp, int argc, char **argv));
MGED_EXTERN(int f_bomb, (ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[]));
MGED_EXTERN(int f_bot_condense, (ClientData clientData, Tcl_Interp *interp, int argc, char **argv));
MGED_EXTERN(int f_bot_face_fuse, (ClientData clientData, Tcl_Interp *interp, int argc, char **argv));
Expand Down
2 changes: 1 addition & 1 deletion src/mged/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static struct cmdtab cmdtab[] = {
{"attr", cmd_attr},
{"autoview", cmd_autoview},
{"bev", f_bev},
{"binary", f_binary},
{"bo", f_bo},
#if 0
{"import_body", cmd_import_body},
{"export_body", cmd_export_body},
Expand Down
2 changes: 1 addition & 1 deletion src/tclscripts/mged/make_solid.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ proc make_binunif { id w } {
return
}

if { [catch {binary -i u $binunif_types($type) $name $fileName} ret] != 0 } {
if { [catch {bo -i u $binunif_types($type) $name $fileName} ret] != 0 } {
cad_dialog $::tk::Priv(cad_dialog) $mged_gui($id,screen) "ERROR creating BINUNIF" $ret "" 0 OK
return
}
Expand Down

0 comments on commit 0afa6a2

Please sign in to comment.