Revision: 45081 http://brlcad.svn.sourceforge.net/brlcad/?rev=45081&view=rev Author: bhinesley Date: 2011-06-16 23:04:32 +0000 (Thu, 16 Jun 2011)
Log Message: ----------- In the process of adding the translate command to libged. In MGED, it is under translate2 for now. Archer throws a segmentation fault when I try to run it. Modified Paths: -------------- brlcad/trunk/include/ged.h brlcad/trunk/src/libged/CMakeLists.txt brlcad/trunk/src/libged/Makefile.am brlcad/trunk/src/libtclcad/tclcad_obj.c brlcad/trunk/src/mged/setup.c brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl brlcad/trunk/src/tclscripts/archer/tclIndex brlcad/trunk/src/tclscripts/lib/Ged.tcl brlcad/trunk/src/tclscripts/lib/Mged.tcl brlcad/trunk/src/tclscripts/lib/tclIndex Modified: brlcad/trunk/include/ged.h =================================================================== --- brlcad/trunk/include/ged.h 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/include/ged.h 2011-06-16 23:04:32 UTC (rev 45081) @@ -2191,6 +2191,11 @@ */ GED_EXPORT extern int ged_track(struct ged *gedp, int argc, const char *argv[]); +/** + * Translate object(s) + */ +GED_EXPORT extern int ged_translate(struct ged *gedp, int argc, const char *argv[]); + #if 0 /** * Modified: brlcad/trunk/src/libged/CMakeLists.txt =================================================================== --- brlcad/trunk/src/libged/CMakeLists.txt 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/src/libged/CMakeLists.txt 2011-06-16 23:04:32 UTC (rev 45081) @@ -222,6 +222,7 @@ tra.c trace.c track.c + translate.c translate_extrude.c translate_tgc.c tree.c Modified: brlcad/trunk/src/libged/Makefile.am =================================================================== --- brlcad/trunk/src/libged/Makefile.am 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/src/libged/Makefile.am 2011-06-16 23:04:32 UTC (rev 45081) @@ -226,6 +226,7 @@ tra.c \ trace.c \ track.c \ + translate.c \ translate_extrude.c \ translate_tgc.c \ tree.c \ Modified: brlcad/trunk/src/libtclcad/tclcad_obj.c =================================================================== --- brlcad/trunk/src/libtclcad/tclcad_obj.c 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/src/libtclcad/tclcad_obj.c 2011-06-16 23:04:32 UTC (rev 45081) @@ -941,6 +941,7 @@ {"tops", (char *)0, TO_UNLIMITED, to_pass_through_func, ged_tops}, {"tra", "[-m|-v] x y z", 6, to_view_func_plus, ged_tra}, {"track", (char *)0, TO_UNLIMITED, to_pass_through_func, ged_track}, + {"translate", (char *)0, TO_UNLIMITED, to_pass_through_func, GED_FUNC_PTR_NULL}, {"translate_mode", "x y", TO_UNLIMITED, to_translate_mode, GED_FUNC_PTR_NULL}, {"transparency", "[val]", TO_UNLIMITED, to_transparency, GED_FUNC_PTR_NULL}, {"tree", (char *)0, TO_UNLIMITED, to_pass_through_func, ged_tree}, Modified: brlcad/trunk/src/mged/setup.c =================================================================== --- brlcad/trunk/src/mged/setup.c 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/src/mged/setup.c 2011-06-16 23:04:32 UTC (rev 45081) @@ -341,6 +341,7 @@ {"track", f_amtrack, GED_FUNC_PTR_NULL}, {"tracker", f_tracker, GED_FUNC_PTR_NULL}, {"translate", f_tr_obj, GED_FUNC_PTR_NULL}, + {"translate2", cmd_ged_plain_wrapper, ged_translate}, {"tree", cmd_ged_plain_wrapper, ged_tree}, {"unhide", cmd_ged_plain_wrapper, ged_unhide}, {"units", cmd_units, GED_FUNC_PTR_NULL}, Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl 2011-06-16 23:04:32 UTC (rev 45081) @@ -234,6 +234,7 @@ method tire {args} method title {args} method track {args} + method translate {args} method unhide {args} method units {args} method vmake {args} @@ -451,7 +452,8 @@ ocenter opendb orotate oscale otranslate p q quit packTree prefix \ protate pscale ptranslate push put put_comb putmat pwd r rcodes \ red rfarb rm rmater rotate_arb_face search sed shader shells tire \ - title track unhide units unpackTree vmake wmater xpush Z zap + title track translate unhide units unpackTree vmake wmater xpush \ + Z zap } # Commands in this list get passed directly to the Ged object @@ -5516,6 +5518,11 @@ eval gedWrapper track 0 0 1 1 $args } +::itcl::body ArcherCore::translate {args} { + #eval gedWrapper translate 1 0 1 0 $args + gedCmd translate +} + ::itcl::body ArcherCore::unhide {args} { eval gedWrapper unhide 0 0 1 1 $args } Modified: brlcad/trunk/src/tclscripts/archer/tclIndex =================================================================== --- brlcad/trunk/src/tclscripts/archer/tclIndex 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/src/tclscripts/archer/tclIndex 2011-06-16 23:04:32 UTC (rev 45081) @@ -601,6 +601,7 @@ set auto_index(::ArcherCore::title) [list source [file join $dir ArcherCore.tcl]] set auto_index(::ArcherCore::toggleTreeView) [list source [file join $dir ArcherCore.tcl]] set auto_index(::ArcherCore::track) [list source [file join $dir ArcherCore.tcl]] +set auto_index(::ArcherCore::translate) [list source [file join $dir ArcherCore.tcl]] set auto_index(::ArcherCore::transparencyMenuStatusCB) [list source [file join $dir ArcherCore.tcl]] set auto_index(::ArcherCore::treeNodeHasBeenOpened) [list source [file join $dir ArcherCore.tcl]] set auto_index(::ArcherCore::treeNodeIsOpen) [list source [file join $dir ArcherCore.tcl]] Modified: brlcad/trunk/src/tclscripts/lib/Ged.tcl =================================================================== --- brlcad/trunk/src/tclscripts/lib/Ged.tcl 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/src/tclscripts/lib/Ged.tcl 2011-06-16 23:04:32 UTC (rev 45081) @@ -475,6 +475,7 @@ method tops {args} method tra {args} method track {args} + method translate {args} method translate_mode {args} method transparency {args} method transparency_all {args} @@ -2507,6 +2508,10 @@ eval $mGed track $args } +::itcl::body cadwidgets::Ged::translate {args} { + eval $mGed translate $args +} + ::itcl::body cadwidgets::Ged::translate_mode {args} { eval $mGed translate_mode $itk_component($itk_option(-pane)) $args } @@ -4236,6 +4241,7 @@ $help add tops {{} {find all top level objects}} $help add tra {{[-v|-m] "x y z"} {translate the view}} $help add track {{args} {create a track}} + $help add translate {{x [y [z]] object(s)} {translate object(s)}} $help add tree {{[-c] [-i n] [-d n] [-o outfile] object(s)} {print out a tree of all members of an object, or all members to depth n in the tree if n -d option is supplied}} $help add unhide {{[objects]} {unset the "hidden" flag for the specified objects so they will appear in a "t" or "ls" command output}} $help add units {{[mm|cm|m|in|ft|...]} {change units}} Modified: brlcad/trunk/src/tclscripts/lib/Mged.tcl =================================================================== --- brlcad/trunk/src/tclscripts/lib/Mged.tcl 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/src/tclscripts/lib/Mged.tcl 2011-06-16 23:04:32 UTC (rev 45081) @@ -131,6 +131,7 @@ method tol {args} method tops {args} method track {args} + method translate {args} method tree {args} method unhide {args} method units {args} @@ -431,6 +432,10 @@ eval $db track $args } +::itcl::body Mged::translate {args} { + eval $db translate $args +} + ::itcl::body Mged::tree {args} { eval $db tree $args } Modified: brlcad/trunk/src/tclscripts/lib/tclIndex =================================================================== --- brlcad/trunk/src/tclscripts/lib/tclIndex 2011-06-16 21:40:58 UTC (rev 45080) +++ brlcad/trunk/src/tclscripts/lib/tclIndex 2011-06-16 23:04:32 UTC (rev 45081) @@ -484,6 +484,7 @@ set auto_index(::Mged::tol) [list source [file join $dir Mged.tcl]] set auto_index(::Mged::tops) [list source [file join $dir Mged.tcl]] set auto_index(::Mged::track) [list source [file join $dir Mged.tcl]] +set auto_index(::Mged::translate) [list source [file join $dir Mged.tcl]] set auto_index(::Mged::tree) [list source [file join $dir Mged.tcl]] set auto_index(::Mged::unhide) [list source [file join $dir Mged.tcl]] set auto_index(::Mged::units) [list source [file join $dir Mged.tcl]] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits