Skip to content

Commit

Permalink
Fix Archer Center View button (vslew GED cmd)
Browse files Browse the repository at this point in the history
Got a user report that the Archer Center View button was broken as of
BRL-CAD release 7.34.2.  Looking into it, the vslew command it is using
was looking for a GED command that wasn't known by that name.  We want
to call the libged slew plugin with that command, so we just have the
plugin define "vslew" as one of the acceptable strings to run it.

Looks like this probably got broken with 5f8aa32 changing the ged_slew
call out for a ged_exec.  In this particular case the command argv[0]
didn't end up corresponding to the ged_* function signature it was
replacing, since the libtclcad command was "vslew" rather than "slew".

Looking through the Tcl code for $mGed commands, it looks like there may
be others that don't have active libged definitions.  Need to
investigate.  This is a textbook illustration of why interpreted
languages are fragile for this sort of work...
  • Loading branch information
starseeker committed Nov 21, 2024
1 parent 4070bee commit e9d926a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ changes made. See document footer for additional details.
--- 2024-XX-XX Release X.XX.X ---
----------------------------------------------------------------------

* fixed Archer Center View button - Cliff Yapp
* added bb '-m' option for outputting midpoint - Chris McGregor
* fixed primitive & matrix edit GUIs in MGED ("x -1") - Sean Morrison
* added (align, dir and print) subcommands to 'view' - Chris McGregor
Expand Down
7 changes: 5 additions & 2 deletions src/libged/slew/slew.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ const struct ged_cmd slew_cmd = { &slew_cmd_impl };
struct ged_cmd_impl sv_cmd_impl = {"sv", ged_slew_core, GED_CMD_DEFAULT};
const struct ged_cmd sv_cmd = { &sv_cmd_impl };

const struct ged_cmd *slew_cmds[] = { &slew_cmd, &sv_cmd, NULL };
struct ged_cmd_impl vslew_cmd_impl = {"vslew", ged_slew_core, GED_CMD_DEFAULT};
const struct ged_cmd vslew_cmd = { &vslew_cmd_impl };

static const struct ged_plugin pinfo = { GED_API, slew_cmds, 2 };
const struct ged_cmd *slew_cmds[] = { &slew_cmd, &sv_cmd, &vslew_cmd, NULL };

static const struct ged_plugin pinfo = { GED_API, slew_cmds, 3 };

COMPILER_DLLEXPORT const struct ged_plugin *ged_plugin_info(void)
{
Expand Down

0 comments on commit e9d926a

Please sign in to comment.