Thread: [brlcad-commits] SF.net SVN: brlcad:[40339] brlcad/trunk/src/tclscripts/archer/Archer.tcl (Page 3)
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <bo...@us...> - 2010-08-26 21:13:12
|
Revision: 40339 http://brlcad.svn.sourceforge.net/brlcad/?rev=40339&view=rev Author: bob1961 Date: 2010-08-26 21:13:03 +0000 (Thu, 26 Aug 2010) Log Message: ----------- Added updateCombEditView. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-08-26 21:12:17 UTC (rev 40338) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-08-26 21:13:03 UTC (rev 40339) @@ -414,6 +414,7 @@ method initTgcEditView {_odata} method initTorusEditView {_odata} + method updateCombEditView {} method updateObjEdit {_updateObj _needInit _needSave} method updateObjEditView {} @@ -2356,19 +2357,6 @@ catch {eval gedCmd $cmd $options $expandedArgs} ret SetNormalCursor $this - switch -- $tflag { - 0 { - # Do nothing - } - 1 { - catch {updateTree} - } - default { - catch {syncTree} -# catch {refreshTree} - } - } - return $ret } @@ -6800,7 +6788,7 @@ ::itcl::body Archer::initCombEditView {odata} { $itk_component(combView) configure \ -geometryObject $mSelectedObj \ - -geometryChangedCallback [::itcl::code $this updateObjEditView] \ + -geometryChangedCallback [::itcl::code $this updateCombEditView] \ -mged $itk_component(ged) \ -labelFont $mFontText \ -boldLabelFont $mFontTextBold \ @@ -7319,7 +7307,13 @@ redrawObj $mSelectedObjPath } +::itcl::body Archer::updateCombEditView {} { + updateObjEditView + syncTree + initEdit +} + ################################### Plugins Section ################################### ::itcl::body Archer::buildUtilityMenu {} { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2010-08-27 17:55:47
|
Revision: 40349 http://brlcad.svn.sourceforge.net/brlcad/?rev=40349&view=rev Author: bob1961 Date: 2010-08-27 17:55:41 +0000 (Fri, 27 Aug 2010) Log Message: ----------- Added buildInvalidObjEditView and initInvalidObjEditView. Arrange to call initInvalidObjEditView from initEdit if the object in question does not exist. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-08-27 17:53:36 UTC (rev 40348) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-08-27 17:55:41 UTC (rev 40349) @@ -383,6 +383,7 @@ method buildSuperellEditView {} method buildTgcEditView {} method buildTorusEditView {} + method buildInvalidObjEditView {} method initArb4EditView {_odata} method initArb5EditView {_odata} @@ -413,6 +414,7 @@ method initSuperellEditView {_odata} method initTgcEditView {_odata} method initTorusEditView {_odata} + method initInvalidObjEditView {_oname} method updateCombEditView {} method updateObjEdit {_updateObj _needInit _needSave} @@ -2594,13 +2596,15 @@ if {$old_name == $mSelectedObj} { set mSelectedObj $new_name + checkpoint $mSelectedObj $LEDGER_MODIFY regsub {([^/]+)$} $mSelectedObjPath $new_name mSelectedObjPath - initEdit 0 - checkpoint $mSelectedObj $LEDGER_MODIFY } elseif {[lsearch $mlist $mSelectedObj] != -1} { checkpoint $mSelectedObj $LEDGER_MODIFY } + initEdit 0 + selectTreePath $mSelectedObjPath + updateUndoState SetNormalCursor $this } @@ -5991,8 +5995,15 @@ ::itcl::body Archer::initEdit {{_initEditMode 1}} { - set mSelectedObjType [gedCmd get_type $mSelectedObj] + if {[catch {gedCmd get_type $mSelectedObj} mSelectedObjType]} { + if {![info exists itk_component(invalidView)]} { + buildInvalidObjEditView + } + initInvalidObjEditView $mSelectedObj + return + } + if {$mSelectedObjType != "bot"} { set odata [lrange [gedCmd get $mSelectedObj] 1 end] } else { @@ -6671,6 +6682,14 @@ } {} } +::itcl::body Archer::buildInvalidObjEditView {} { + set parent $itk_component(objEditView) + itk_component add invalidView { + ::ttk::label $parent.invalidview \ + -anchor center + } {} +} + ::itcl::body Archer::initArb4EditView {odata} { $itk_component(arb4View) configure \ -geometryObject $mSelectedObj \ @@ -7262,6 +7281,14 @@ -fill both } +::itcl::body Archer::initInvalidObjEditView {_oname} { + $itk_component(invalidView) configure \ + -text "$_oname does not exist" + pack $itk_component(invalidView) \ + -expand yes \ + -fill both +} + ::itcl::body Archer::updateObjEdit {updateObj needInit needSave} { set renderData [gedCmd how -b $mSelectedObjPath] set renderMode [lindex $renderData 0] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2010-08-27 21:25:52
|
Revision: 40356 http://brlcad.svn.sourceforge.net/brlcad/?rev=40356&view=rev Author: bob1961 Date: 2010-08-27 21:25:45 +0000 (Fri, 27 Aug 2010) Log Message: ----------- A few tweaks to get the global_undo to work better when moving/renaming objects. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-08-27 20:06:47 UTC (rev 40355) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-08-27 21:25:45 UTC (rev 40356) @@ -2589,6 +2589,9 @@ # Checkpoint the renamed object set lnew_name [checkpoint $new_name $LEDGER_RENAME] + # Flag the renamed object as having mods + $mLedger attr set $lnew_name $LEDGER_ENTRY_OUT_OF_SYNC_ATTR 1 + # Save the command for moving things back $mLedger attr set $lnew_name $LEDGER_ENTRY_MOVE_COMMAND "$_cmd $new_name $old_name" @@ -8915,6 +8918,14 @@ updateUndoMode $oflag + if {$gid < $mLedgerGID} { + incr mLedgerGID + set lname $mLedgerGID\_$oid\_$_obj + $mLedger mv $le $lname + $mLedger attr set $lname $LEDGER_ENTRY_TYPE_ATTR $_type + return $lname + } + return $le } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2010-09-20 21:34:09
|
Revision: 40624 http://brlcad.svn.sourceforge.net/brlcad/?rev=40624&view=rev Author: bob1961 Date: 2010-09-20 21:34:03 +0000 (Mon, 20 Sep 2010) Log Message: ----------- Minor tweak to Archer::saveDB Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-09-20 21:32:35 UTC (rev 40623) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-09-20 21:34:03 UTC (rev 40624) @@ -1620,8 +1620,8 @@ ::itcl::body Archer::saveDb {} { ArcherCore::saveDb - clearTargetLedger -# createTargetLedger +# clearTargetLedger + createTargetLedger set mNeedCheckpoint 0 updateCheckpointMode This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2010-09-23 15:29:21
|
Revision: 40664 http://brlcad.svn.sourceforge.net/brlcad/?rev=40664&view=rev Author: bob1961 Date: 2010-09-23 15:29:15 +0000 (Thu, 23 Sep 2010) Log Message: ----------- Minor tweaks to Archer. Added the buildOtherGeneralPreferences method as a placeholder for classes inheriting from Archer to add their own general preferences. Capitalized color names passed to backgroundColor for consistency. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-09-23 15:26:06 UTC (rev 40663) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-09-23 15:29:15 UTC (rev 40664) @@ -297,6 +297,7 @@ method buildModelAxesPosition {_parent} method buildModelAxesPreferences {} method buildMouseOverridesDialog {} + method buildOtherGeneralPreferences {_i} method buildPreferencesDialog {} method buildRevertDialog {} method buildToplevelMenubar {_parent {_prefix ""}} @@ -3398,6 +3399,7 @@ grid $itk_component(treeAttrsL) -column 0 -row $i -sticky e grid $itk_component(treeAttrsE) -column 1 -row $i -sticky ew incr i + set i [buildOtherGeneralPreferences $i] grid $itk_component(affectedTreeNodesModeCB) \ -columnspan 2 \ -column 0 \ @@ -4038,6 +4040,10 @@ wm geometry $itk_component(mouseOverridesDialog) "370x190" } +::itcl::body Archer::buildOtherGeneralPreferences {_i} { + return $_i +} + ::itcl::body Archer::buildPreferencesDialog {} { itk_component add preferencesDialog { ::iwidgets::dialog $itk_interior.preferencesDialog \ @@ -4182,22 +4188,22 @@ } $itk_component(${_prefix}backgroundmenu) add command \ -label "Black" \ - -command [::itcl::code $this backgroundColor black] + -command [::itcl::code $this backgroundColor Black] $itk_component(${_prefix}backgroundmenu) add command \ -label "Grey" \ - -command [::itcl::code $this backgroundColor grey] + -command [::itcl::code $this backgroundColor Grey] $itk_component(${_prefix}backgroundmenu) add command \ -label "White" \ - -command [::itcl::code $this backgroundColor white] + -command [::itcl::code $this backgroundColor White] $itk_component(${_prefix}backgroundmenu) add command \ -label "Cyan" \ - -command [::itcl::code $this backgroundColor cyan] + -command [::itcl::code $this backgroundColor Cyan] $itk_component(${_prefix}backgroundmenu) add command \ -label "Blue" \ - -command [::itcl::code $this backgroundColor blue] + -command [::itcl::code $this backgroundColor Blue] $itk_component(${_prefix}backgroundmenu) add command \ -label "Navy" \ - -command [::itcl::code $this backgroundColor navy] + -command [::itcl::code $this backgroundColor Navy] $itk_component(${_prefix}displaymenu) add cascade \ -label "Background Color" \ -menu $itk_component(${_prefix}backgroundmenu) \ @@ -5450,17 +5456,17 @@ cascade background -label "Background Color" -menu { command black -label "Black" \ - -helpstr "Set display background to black" + -helpstr "Set display background to Black" command grey -label "Grey" \ - -helpstr "Set display background to grey" + -helpstr "Set display background to Grey" command white -label "White" \ - -helpstr "Set display background to white" + -helpstr "Set display background to White" command cyan -label "Cyan" \ - -helpstr "Set display background to cyan" + -helpstr "Set display background to Cyan" command blue -label "Blue" \ - -helpstr "Set display background to blue" + -helpstr "Set display background to Blue" command navy -label "Navy" \ - -helpstr "Set display background to navy" + -helpstr "Set display background to Navy" } cascade standard -label "Standard Views" -menu { @@ -7762,9 +7768,6 @@ if {$mBackgroundColor != $mBackgroundColorPref} { set mBackgroundColor $mBackgroundColorPref backgroundColor $mBackgroundColor -# set mBackground [getRgbColor $mBackgroundColor] -# eval backgroundColor $mBackground -# eval backgroundColor [getRgbColor $mBackgroundColor] } if {$mPrimitiveLabelColor != $mPrimitiveLabelColorPref} { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2010-10-13 13:34:47
|
Revision: 40970 http://brlcad.svn.sourceforge.net/brlcad/?rev=40970&view=rev Author: bob1961 Date: 2010-10-13 13:34:40 +0000 (Wed, 13 Oct 2010) Log Message: ----------- Minor tweak. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-10-12 17:06:40 UTC (rev 40969) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2010-10-13 13:34:40 UTC (rev 40970) @@ -9242,7 +9242,7 @@ } ::itcl::body Archer::global_undo_callback {_gname} { - gedCmd refresh + gedCmd refresh_all } ::itcl::body Archer::ledger_cleanup {} { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-01-13 01:54:43
|
Revision: 42194 http://brlcad.svn.sourceforge.net/brlcad/?rev=42194&view=rev Author: brlcad Date: 2011-01-13 01:54:35 +0000 (Thu, 13 Jan 2011) Log Message: ----------- search harder here too for aboutArcher.png and mike-tux.png Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-01-13 01:43:13 UTC (rev 42193) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-01-13 01:54:35 UTC (rev 42194) @@ -96,7 +96,7 @@ LoadArcherLibs package require ArcherCore 1.0 -package require Tktable 2.10 +catch {package require Tktable 2.10} tktable package provide Archer 1.0 ::itcl::class Archer { @@ -2860,7 +2860,11 @@ } {} # About Info - set aboutImg [image create photo -file [file join $brlcadDataPath tclscripts archer images aboutArcher.png]] + set imgfile [file join $brlcadDataPath tclscripts archer images aboutArcher.png] + if { ![file exists $imgfile] } { + set imgfile [file join [bu_brlcad_data "src"] tclscripts archer images aboutArcher.png] + } + set aboutImg [image create photo -file $imgfile] itk_component add aboutInfo { ::ttk::label $itk_component(aboutDialogTabs).aboutInfo \ -image $aboutImg @@ -2908,7 +2912,17 @@ ::frame $itk_component(aboutDialogTabs).mikeInfo } {} - set mikeImg [image create photo -file [file join $brlcadDataPath tclscripts mged mike-tux.png]] + # try installed, uninstalled + set imgfile [file join $brlcadDataPath tclscripts mged mike-tux.png] + if { ![file exists $imgfile] } { + # try src tree + set imgfile [file join [bu_brlcad_data "src"] tclscripts mged mike-tux.png] + if { ![file exists $imgfile] } { + # try local relative + set imgfile [file join tclscripts mged mike-tux.png] + } + } + set mikeImg [image create photo -file $imgfile] itk_component add mikePic { ::label $itk_component(mikeF).pic \ -image $mikeImg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-01-13 01:59:55
|
Revision: 42196 http://brlcad.svn.sourceforge.net/brlcad/?rev=42196&view=rev Author: brlcad Date: 2011-01-13 01:59:47 +0000 (Thu, 13 Jan 2011) Log Message: ----------- hopefully not lost in the indentation cleanup, make bu_brlcad_data only check for one subdir, then use [file join] on the rest Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-01-13 01:54:48 UTC (rev 42195) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-01-13 01:59:47 UTC (rev 42196) @@ -94,6 +94,7 @@ } } + LoadArcherLibs package require ArcherCore 1.0 catch {package require Tktable 2.10} tktable @@ -562,7 +563,6 @@ } - ################################### Public Section ################################### ################################### Plugins Section ################################### @@ -573,6 +573,7 @@ } } + ::itcl::body Archer::pluginDialog {w} { set dialog [::iwidgets::dialog .\#auto \ -modality application \ @@ -677,15 +678,16 @@ wm geometry $dialog 400x400 # Event bindings -# bind $dialog <Enter> "raise $dialog" -# bind $dialog <Configure> "raise $dialog" -# bind $dialog <FocusOut> "raise $dialog" + # bind $dialog <Enter> "raise $dialog" + # bind $dialog <Configure> "raise $dialog" + # bind $dialog <FocusOut> "raise $dialog" $dialog center $w ::update $dialog activate } + ## - pluginLoadCWDFiles # # Load the current working directory's (CWD) files. @@ -711,6 +713,7 @@ } } + ::itcl::body Archer::pluginLoader {} { global env @@ -735,6 +738,7 @@ ::cd $pwd } + ::itcl::body Archer::pluginGed {_archer} { if {[catch {$_archer component ged} ged]} { return "" @@ -743,6 +747,7 @@ } } + ::itcl::body Archer::pluginQuery {name} { foreach plugin $::Archer::plugins { if {[$plugin get -class] == $name} { @@ -753,10 +758,12 @@ return "" } + ::itcl::body Archer::pluginRegister {majorType minorType name class file {description ""} {version ""} {developer ""} {icon ""} {tooltip ""} {action ""} {xmlAction ""}} { lappend ::Archer::plugins [Plugin \#auto $majorType $minorType $name $class $file $description $version $developer $icon $tooltip $action $xmlAction] } + ::itcl::body Archer::pluginUnregister {name} { set plugin [plugin_query $name] @@ -770,7 +777,6 @@ } - ## - importFg4Sections # # @@ -861,7 +867,7 @@ } # Add gmember only if its not already there - regsub -all {(\{[ul] )|([{}]+)} $tree " " tmembers + regsub -all {(\{[ul])|([{}]+)} $tree " " tmembers if {[lsearch $tmembers $gmember] == -1} { $itk_component(ged) g $gname $gmember } @@ -926,10 +932,12 @@ } } + ::itcl::body Archer::3ptarb {args} { eval ArcherCore::gedWrapper 3ptarb 0 0 1 1 $args } + ::itcl::body Archer::attr {args} { set len [llength $args] @@ -975,52 +983,63 @@ } } + ::itcl::body Archer::bo {args} { eval ArcherCore::gedWrapper bo 0 0 1 1 $args } + ::itcl::body Archer::bot {args} { eval ArcherCore::gedWrapper bot 0 0 1 1 $args } + ::itcl::body Archer::bot_condense {args} { eval ArcherCore::gedWrapper bot_condense 0 0 1 1 $args } + ::itcl::body Archer::bot_decimate {args} { eval ArcherCore::gedWrapper bot_decimate 0 0 1 1 $args } + ::itcl::body Archer::bot_face_fuse {args} { eval ArcherCore::gedWrapper bot_face_fuse 0 0 1 1 $args } + ::itcl::body Archer::bot_merge {args} { eval ArcherCore::gedWrapper bot_merge 1 0 1 1 $args } + ::itcl::body Archer::bot_smooth {args} { eval ArcherCore::gedWrapper bot_smooth 0 0 1 1 $args } + ::itcl::body Archer::bot_split {args} { eval ArcherCore::gedWrapper bot_split 0 0 1 2 $args } + ::itcl::body Archer::bot_vertex_fuse {args} { eval ArcherCore::gedWrapper bot_vertex_fuse 0 0 1 1 $args } + # # Create a combination. # ::itcl::body Archer::c {args} { -# eval combWrapper c 2 $args + # eval combWrapper c 2 $args putString "Momentarily disabled. Fix me!" } + ::itcl::body Archer::clone {args} { -# eval createWrapper clone $args + # eval createWrapper clone $args # Returns a help message. if {[llength $args] == 0} { @@ -1049,10 +1068,12 @@ return $ret } + ::itcl::body Archer::color {args} { eval ArcherCore::gedWrapper color 0 0 1 1 $args } + # # Create a combination or modify an existing one. # @@ -1060,6 +1081,7 @@ eval combWrapper comb 3 $args } + ::itcl::body Archer::combmem {args} { SetWaitCursor $this @@ -1081,30 +1103,37 @@ return $ret } + ::itcl::body Archer::cp {args} { eval createWrapper cp $args } + ::itcl::body Archer::cpi {args} { eval createWrapper cpi $args } + ::itcl::body Archer::copyeval {args} { eval createWrapper copyeval $args } + ::itcl::body Archer::copymat {args} { eval gedWrapper2 copymat 1 0 0 0 1 1 $args } + ::itcl::body Archer::dbconcat {args} { eval ArcherCore::gedWrapper dbconcat 0 0 1 1 $args } + ::itcl::body Archer::decompose {args} { eval ArcherCore::gedWrapper decompose 0 0 1 1 $args } + ::itcl::body Archer::edcodes {args} { # Returns a help message if {[llength $args] == 0} { @@ -1225,26 +1254,31 @@ updateUndoState SetNormalCursor $this -# eval ArcherCore::gedWrapper edcodes 0 0 1 1 $args + # eval ArcherCore::gedWrapper edcodes 0 0 1 1 $args } + ::itcl::body Archer::edcolor {args} { return [eval globalWrapper edcolor $args] } + # Needs an edWrapper to create checkpoints for each object ::itcl::body Archer::edmater {args} { eval ArcherCore::gedWrapper edmater 0 0 1 1 $args } + ::itcl::body Archer::facetize {args} { eval createWrapper facetize $args } + ::itcl::body Archer::fracture {args} { eval ArcherCore::gedWrapper fracture 0 0 1 1 $args } + # # Create a group or modify an existing one. # @@ -1252,32 +1286,39 @@ eval combWrapper g 2 $args } + ::itcl::body Archer::human {args} { eval ArcherCore::gedWrapper human 0 0 1 1 $args } + ::itcl::body Archer::i {args} { eval gedWrapper2 i 1 0 0 0 1 1 $args } + ::itcl::body Archer::in {args} { eval createWrapper in $args } + ::itcl::body Archer::inside {args} { eval createWrapper inside $args } + ::itcl::body Archer::kill {args} { eval killWrapper kill $args } + ::itcl::body Archer::killall {args} { eval killWrapper killall $args } + ::itcl::body Archer::killrefs {args} { -# eval ArcherCore::gedWrapper killrefs 0 0 1 1 $args + # eval ArcherCore::gedWrapper killrefs 0 0 1 1 $args # Returns a help message if {[llength $args] == 0} { @@ -1326,42 +1367,52 @@ SetNormalCursor $this } + ::itcl::body Archer::killtree {args} { eval killWrapper killtree $args } + ::itcl::body Archer::make {args} { eval createWrapper make $args } + ::itcl::body Archer::make_bb {args} { eval ArcherCore::gedWrapper make_bb 0 0 1 1 $args } + ::itcl::body Archer::make_pnts {args} { eval ArcherCore::gedWrapper make_pnts 0 0 1 1 $args } + ::itcl::body Archer::mirror {args} { eval createWrapper mirror $args } + ::itcl::body Archer::mv {args} { eval moveWrapper mv $args } + ::itcl::body Archer::mvall {args} { eval moveWrapper mvall $args } + ::itcl::body Archer::nmg_collapse {args} { eval ArcherCore::gedWrapper nmg_collapse 0 0 1 1 $args } + ::itcl::body Archer::nmg_simplify {args} { eval ArcherCore::gedWrapper nmg_simplify 0 0 1 1 $args } + ::itcl::body Archer::p {args} { if {$mSelectedObj == ""} { return @@ -1429,52 +1480,63 @@ return $ret } + ::itcl::body Archer::p_protate {args} { catch {eval gedCmd protate $args} ret return $ret } + ::itcl::body Archer::p_pscale {args} { catch {eval gedCmd pscale $args} ret return $ret } + ::itcl::body Archer::p_ptranslate {args} { catch {eval gedCmd ptranslate $args} ret return $ret } + ::itcl::body Archer::p_move_arb_edge {args} { catch {eval gedCmd move_arb_edge $args} ret return $ret } + ::itcl::body Archer::p_move_arb_face {args} { catch {eval gedCmd move_arb_face $args} ret return $ret } + ::itcl::body Archer::p_rotate_arb_face {args} { catch {eval gedCmd rotate_arb_face $args} ret return $ret } + ::itcl::body Archer::prefix {args} { eval ArcherCore::gedWrapper prefix 0 0 1 1 $args } + ::itcl::body Archer::push {args} { eval ArcherCore::gedWrapper push 0 0 1 1 $args } + ::itcl::body Archer::put {args} { eval ArcherCore::gedWrapper put 0 0 1 1 $args } + ::itcl::body Archer::putmat {args} { eval gedWrapper2 putmat 0 0 0 0 1 1 $args } + ::itcl::body Archer::Load {_target} { SetWaitCursor $this if {$mNeedSave} { @@ -1558,10 +1620,10 @@ updateWizardMenu updateUtilityMenu deleteTargetOldCopy -# createTargetLedger + # createTargetLedger updateCreationButtons 1 -# updateRaytraceButtons 1 + # updateRaytraceButtons 1 buildGroundPlane showGroundPlane @@ -1572,7 +1634,7 @@ # update the units combobox in the General tab of the preferences panel set utypes {} - foreach utype [split [$itk_component(ged) units -t] ,] { + foreach utype [split [$itk_component(ged) units -t] , ] { lappend utypes [string trim $utype] } $itk_component(unitsCB) configure \ @@ -1591,6 +1653,7 @@ SetNormalCursor $this } + # # Create a region or modify an existing one. # @@ -1598,29 +1661,34 @@ eval combWrapper r 3 $args } + # XXX libged's rcodes needs to return the objects affected # The affected objects would be added to the ledger. ::itcl::body Archer::rcodes {args} { eval ArcherCore::gedWrapper rcodes 0 0 1 1 $args } + ::itcl::body Archer::rfarb {args} { eval ArcherCore::gedWrapper rfarb 0 0 1 1 $args } + ::itcl::body Archer::rm {args} { eval removeCombMemberWrapper rm $args } + # XXX libged's rmater needs to return the objects affected # The affected objects would be added to the ledger. ::itcl::body Archer::rmater {args} { eval ArcherCore::gedWrapper rmater 0 0 1 1 $args } + ::itcl::body Archer::saveDb {} { ArcherCore::saveDb -# clearTargetLedger + # clearTargetLedger createTargetLedger set mNeedCheckpoint 0 @@ -1634,24 +1702,29 @@ checkpoint $mSelectedObj $LEDGER_MODIFY } + ::itcl::body Archer::shells {args} { eval ArcherCore::gedWrapper shells 0 0 1 1 $args } + ::itcl::body Archer::tire {args} { eval ArcherCore::gedWrapper tire 0 0 1 1 $args } + ::itcl::body Archer::title {args} { return [eval globalWrapper title $args] } + # XXX libged's track needs to return the objects affected # The affected objects would be added to the ledger. ::itcl::body Archer::track {args} { eval ArcherCore::gedWrapper track 0 0 1 0 $args } + ::itcl::body Archer::units {args} { set b2l_1 [gedCmd base2local] set ret [eval globalWrapper units $args] @@ -1676,11 +1749,13 @@ return $ret } + ::itcl::body Archer::vmake {args} { eval createWrapper make $args -# eval ArcherCore::gedWrapper vmake 0 0 1 1 $args + # eval ArcherCore::gedWrapper vmake 0 0 1 1 $args } + ::itcl::body Archer::initImages {} { if {$mInstanceInit} { return @@ -1711,22 +1786,22 @@ $itk_component(primaryToolbar) itemconfigure comb \ -image [image create photo \ -file [file join $mImgDir combination.png]] -# $itk_component(primaryToolbar) itemconfigure arb6 \ + # $itk_component(primaryToolbar) itemconfigure arb6 \ -image [image create photo \ -file [file join $mImgDir primitive_arb6.png]] -# $itk_component(primaryToolbar) itemconfigure arb8 \ + # $itk_component(primaryToolbar) itemconfigure arb8 \ -image [image create photo \ -file [file join $mImgDir primitive_arb8.png]] -# $itk_component(primaryToolbar) itemconfigure cone \ + # $itk_component(primaryToolbar) itemconfigure cone \ -image [image create photo \ -file [file join $mImgDir primitive_cone.png]] -# $itk_component(primaryToolbar) itemconfigure pipe \ + # $itk_component(primaryToolbar) itemconfigure pipe \ -image [image create photo \ -file [file join $mImgDir primitive_pipe.png]] -# $itk_component(primaryToolbar) itemconfigure sphere \ + # $itk_component(primaryToolbar) itemconfigure sphere \ -image [image create photo \ -file [file join $mImgDir primitive_sph.png]] -# $itk_component(primaryToolbar) itemconfigure torus \ + # $itk_component(primaryToolbar) itemconfigure torus \ -image [image create photo \ -file [file join $mImgDir primitive_tor.png]] $itk_component(primaryToolbar) itemconfigure other \ @@ -1734,24 +1809,24 @@ -file [file join $mImgDir primitive_list.png]] # View Toolbar -# $itk_component(primaryToolbar) itemconfigure rotate \ -# -image [image create photo \ -# -file [file join $mImgDir view_rotate.png]] -# $itk_component(primaryToolbar) itemconfigure translate \ -# -image [image create photo \ -# -file [file join $mImgDir view_translate.png]] -# $itk_component(primaryToolbar) itemconfigure scale \ -# -image [image create photo \ -# -file [file join $mImgDir view_scale.png]] -# $itk_component(primaryToolbar) itemconfigure center \ -# -image [image create photo \ -# -file [file join $mImgDir view_select.png]] -# $itk_component(primaryToolbar) itemconfigure cpick \ -# -image [image create photo \ -# -file [file join $mImgDir compSelect.png]] -# $itk_component(primaryToolbar) itemconfigure measure \ -# -image [image create photo \ -# -file [file join $mImgDir measure.png]] + # $itk_component(primaryToolbar) itemconfigure rotate \ + # -image [image create photo \ + # -file [file join $mImgDir view_rotate.png]] + # $itk_component(primaryToolbar) itemconfigure translate \ + # -image [image create photo \ + # -file [file join $mImgDir view_translate.png]] + # $itk_component(primaryToolbar) itemconfigure scale \ + # -image [image create photo \ + # -file [file join $mImgDir view_scale.png]] + # $itk_component(primaryToolbar) itemconfigure center \ + # -image [image create photo \ + # -file [file join $mImgDir view_select.png]] + # $itk_component(primaryToolbar) itemconfigure cpick \ + # -image [image create photo \ + # -file [file join $mImgDir compSelect.png]] + # $itk_component(primaryToolbar) itemconfigure measure \ + # -image [image create photo \ + # -file [file join $mImgDir measure.png]] # We catch this because the item may not exist catch {$itk_component(primaryToolbar) itemconfigure wizards \ @@ -1831,6 +1906,7 @@ initFbImages } + ::itcl::body Archer::initFbImages {} { set mImage_fbOff [image create photo -file [file join $mImgDir framebuffer_off.png]] set mImage_fbOn [image create photo -file [file join $mImgDir framebuffer.png]] @@ -1851,6 +1927,7 @@ -file [file join $mImgDir framebuffer_clear.png]] } + ::itcl::body Archer::setDefaultBindingMode {_mode} { set saved_mode $mDefaultBindingMode @@ -1860,29 +1937,28 @@ switch -- $mDefaultBindingMode \ $OBJECT_ROTATE_MODE { \ - beginObjRotate + beginObjRotate } \ $OBJECT_TRANSLATE_MODE { \ - beginObjTranslate + beginObjTranslate } \ $OBJECT_SCALE_MODE { \ - beginObjScale + beginObjScale } \ $OBJECT_CENTER_MODE { \ - if {$saved_mode == $OBJECT_TRANSLATE_MODE} { \ - set mDefaultBindingMode $saved_mode - beginObjTranslate - } else { \ - beginObjCenter - } \ - } + if {$saved_mode == $OBJECT_TRANSLATE_MODE} { \ + set mDefaultBindingMode $saved_mode + beginObjTranslate + } else { \ + beginObjCenter + } \ + } } ################################### End Public Section ################################### - ################################### Protected Section ################################### ::itcl::body Archer::askToRevert {} { @@ -1900,12 +1976,14 @@ return 0 } + ################################### ArcherCore Override Section ################################### ::itcl::body Archer::buildCommandView {} { set mDelayCommandViewBuild 1 } + ::itcl::body Archer::buildCommandViewNew {_mflag} { ::ArcherCore::buildCommandView @@ -1944,6 +2022,7 @@ } } + ::itcl::body Archer::dblClick {tags} { return @@ -1982,6 +2061,7 @@ } } + ::itcl::body Archer::addCombMemberWrapper {_cmd _cflag args} { # Returns a help message. set alen [llength $args] @@ -2079,6 +2159,7 @@ SetNormalCursor $this } + ::itcl::body Archer::createCombWrapper {_cmd args} { eval addCombMemberWrapper $_cmd 1 $args @@ -2098,6 +2179,7 @@ SetNormalCursor $this } + ::itcl::body Archer::removeCombMemberWrapper {_cmd args} { # Returns a help message. set alen [llength $args] @@ -2196,6 +2278,7 @@ SetNormalCursor $this } + # # Create a combination or modify an existing one. # @@ -2217,6 +2300,7 @@ } } + ::itcl::body Archer::createWrapper {_cmd args} { # Set the list of created objects (i.e. clist) switch -- $_cmd { @@ -2251,9 +2335,9 @@ set old [lindex $expandedArgs 0] # Check for the existence of old -# if {[catch {gedCmd attr show $old} adata]} { -# return [eval gedCmd $_cmd $expandedArgs] -# } + # if {[catch {gedCmd attr show $old} adata]} { + # return [eval gedCmd $_cmd $expandedArgs] + # } set clist [lindex $expandedArgs 1] } @@ -2315,10 +2399,12 @@ return $ret } + ::itcl::body Archer::gedWrapper {cmd eflag hflag sflag tflag args} { eval gedWrapper2 $cmd 0 -1 $eflag $hflag $sflag $tflag $args } + ::itcl::body Archer::gedWrapper2 {cmd oindex pindex eflag hflag sflag tflag args} { SetWaitCursor $this @@ -2384,6 +2470,7 @@ return $ret } + ::itcl::body Archer::globalWrapper {_cmd args} { # Simply return the current value if {$_cmd != "edcolor" && $args == {}} { @@ -2434,6 +2521,7 @@ return $ret } + ::itcl::body Archer::killWrapper {_cmd args} { # Returns a help message. if {[llength $args] == 0} { @@ -2529,6 +2617,7 @@ return $ret } + ::itcl::body Archer::moveWrapper {_cmd args} { set alen [llength $args] @@ -2612,6 +2701,7 @@ SetNormalCursor $this } + ::itcl::body Archer::handleTreeSelect {} { ::ArcherCore::handleTreeSelect @@ -2624,22 +2714,23 @@ initObjEditView switch -- $mDefaultBindingMode \ $OBJECT_ROTATE_MODE { \ - beginObjRotate + beginObjRotate } \ $OBJECT_SCALE_MODE { \ - beginObjScale + beginObjScale } \ $OBJECT_TRANSLATE_MODE { \ - beginObjTranslate + beginObjTranslate } \ $OBJECT_CENTER_MODE { \ - beginObjCenter + beginObjCenter } } } } } + ::itcl::body Archer::initDefaultBindings {{_comp ""}} { if {$_comp == ""} { set _comp $itk_component(ged) @@ -2677,16 +2768,19 @@ $itk_component(primaryToolbar) itemconfigure edit_center -state normal } + ::itcl::body Archer::initGed {} { ArcherCore::initGed activateMenusEtc setActivePane ur } + ::itcl::body Archer::setActivePane {_pane} { $itk_component(rtcntrl) setActivePane $_pane } + ::itcl::body Archer::updateCheckpointMode {} { if {$mViewOnly} { return @@ -2701,6 +2795,7 @@ } } + ::itcl::body Archer::updateSaveMode {} { ArcherCore::updateSaveMode @@ -2755,6 +2850,7 @@ } } + ::itcl::body Archer::updateUndoMode {{_oflag 1}} { if {$mViewOnly} { return @@ -2784,6 +2880,7 @@ } } + ::itcl::body Archer::updateUndoState {} { if {$mViewOnly} { return @@ -2974,6 +3071,7 @@ wm geometry $itk_component(aboutDialog) "600x600" } + proc Archer::get_html_data {helpfile} { global archer_help_data @@ -2982,13 +3080,15 @@ close $help_fd } + proc Archer::get_html_man_data {cmdname} { global archer_help_data - set help_fd [open [bu_brlcad_data "html/mann/en/$cmdname.html"]] + set help_fd [open [file join [bu_brlcad_data "html"] mann en $cmdname.html]] set archer_help_data [read $help_fd] close $help_fd } + proc Archer::html_man_display {w} { global archer_help_data $w reset; @@ -2996,6 +3096,7 @@ $w parse $archer_help_data } + proc Archer::html_help_display {me} { global htmlviewer global archer_help_data @@ -3012,20 +3113,22 @@ $htmlviewer parse $archer_help_data } + proc Archer::mkHelpTkImage {file} { - set fullpath [file join $brlcadDataPath html manuals mged $file] - set name [image create photo -file $fullpath] - return [list $name [list image delete $name]] + set fullpath [file join $brlcadDataPath html manuals mged $file] + set name [image create photo -file $fullpath] + return [list $name [list image delete $name]] } + proc title_node_handler {node} { set titletext "" foreach child [$node children] { append titletext [$child text] } } - + ::itcl::body Archer::buildarcherHelp {} { global env global archer_help_data @@ -3056,63 +3159,64 @@ set tlparent [$itk_component(archerHelp) childsite] - if {[file exists [file join [bu_brlcad_data "html/books/en"] BRL-CAD_Tutorial_Series-VolumeI.html]]} { + if {[file exists [file join [bu_brlcad_data "html"] books en BRL-CAD_Tutorial_Series-VolumeI.html]]} { - # Table of Contents - itk_component add archerHelpToC { - ::tk::frame $tlparent.archerManToc - } {} - set docstoc $itk_component(archerHelpToC) - pack $docstoc -side left -expand yes -fill y - - # HTML widget - set docstoclist [::hv3::hv3 $docstoc.htmlview -width 250 -requestcmd Archer::html_help_display] - set docstochtml [$docstoclist html] - $docstochtml configure -parsemode html - set help_fd [lindex [list [file join [bu_brlcad_data "html"] toc.html]] 0] - get_html_data $help_fd - $docstochtml parse $archer_help_data + # Table of Contents + itk_component add archerHelpToC { + ::tk::frame $tlparent.archerManToc + } {} + set docstoc $itk_component(archerHelpToC) + pack $docstoc -side left -expand yes -fill y + + # HTML widget + set docstoclist [::hv3::hv3 $docstoc.htmlview -width 250 -requestcmd Archer::html_help_display] + set docstochtml [$docstoclist html] + $docstochtml configure -parsemode html + set help_fd [lindex [list [file join [bu_brlcad_data "html"] toc.html]] 0] + get_html_data $help_fd + $docstochtml parse $archer_help_data - grid $docstoclist -sticky nsew -in $docstoc + grid $docstoclist -sticky nsew -in $docstoc - grid columnconfigure $docstoc 0 -weight 1 - grid rowconfigure $docstoc 0 -weight 1 + grid columnconfigure $docstoc 0 -weight 1 + grid rowconfigure $docstoc 0 -weight 1 - pack $docstoc -side left -expand yes -fill both + pack $docstoc -side left -expand yes -fill both - pack $itk_component(archerHelpToC) -side left -expand no -fill y + pack $itk_component(archerHelpToC) -side left -expand no -fill y - # Main HTML window + # Main HTML window - itk_component add archerHelpF { - ::tk::frame $tlparent.archerHelpF - } {} + itk_component add archerHelpF { + ::tk::frame $tlparent.archerHelpF + } {} - set sfcs $itk_component(archerHelpF) - pack $sfcs -expand yes -fill both + set sfcs $itk_component(archerHelpF) + pack $sfcs -expand yes -fill both - # HTML widget - set hv3htmlviewer [::hv3::hv3 $sfcs.htmlview] - set htmlviewer [$hv3htmlviewer html] - $htmlviewer configure -parsemode html - $htmlviewer configure -imagecmd Archer::mkHelpTkImage - set help_fd [lindex [list [file join [bu_brlcad_data "html/books/en"] BRL-CAD_Tutorial_Series-VolumeI.html]] 0] - get_html_data $help_fd - $htmlviewer parse $archer_help_data + # HTML widget + set hv3htmlviewer [::hv3::hv3 $sfcs.htmlview] + set htmlviewer [$hv3htmlviewer html] + $htmlviewer configure -parsemode html + $htmlviewer configure -imagecmd Archer::mkHelpTkImage + set help_fd [lindex [list [file join [bu_brlcad_data "html"] books en BRL-CAD_Tutorial_Series-VolumeI.html]] 0] + get_html_data $help_fd + $htmlviewer parse $archer_help_data - grid $hv3htmlviewer -sticky nsew -in $sfcs + grid $hv3htmlviewer -sticky nsew -in $sfcs - grid columnconfigure $sfcs 0 -weight 1 - grid rowconfigure $sfcs 0 -weight 1 + grid columnconfigure $sfcs 0 -weight 1 + grid rowconfigure $sfcs 0 -weight 1 - pack $itk_component(archerHelpF) -side left -expand yes -fill both + pack $itk_component(archerHelpF) -side left -expand yes -fill both } wm geometry $itk_component(archerHelp) "1100x800" } + ::itcl::body Archer::buildarcherMan {} { global env global archer_help_data @@ -3152,7 +3256,7 @@ itk_component add archerManS { ::ttk::scrollbar $itk_component(archerManToC).archerManS \ - } {} + } {} itk_component add mantree { ::tk::listbox $itk_component(archerManToC).mantree -bd 2 -width 16 -exportselection false -yscroll "$itk_component(archerManS) set" @@ -3165,53 +3269,54 @@ grid columnconfigure $sfcstoc 0 -weight 1 grid rowconfigure $sfcstoc 0 -weight 1 - if {[file exists [file join [bu_brlcad_data "html/mann/en"] Introduction.html]]} { + if {[file exists [file join [bu_brlcad_data "html"] mann en Introduction.html]]} { - # List of available help documents - set cmdfiles [glob -directory [bu_brlcad_data "html/mann/en"] *.html ] - set cmds [list ] - foreach cmdfile $cmdfiles { - regexp {(.+/)(.+)(.html)} $cmdfile -> url cmdrootname htmlsuffix - if {[string compare $cmdrootname "Introduction"]} { - set cmds [concat $cmds [list $cmdrootname]] - } - } - set cmds [lsort $cmds] - foreach cmd $cmds { - $itk_component(mantree) insert end $cmd - } + # List of available help documents + set cmdfiles [glob -directory [bu_brlcad_data "html"] mann en *.html ] + set cmds [list ] + foreach cmdfile $cmdfiles { + regexp {(.+/)(.+)(.html)} $cmdfile -> url cmdrootname htmlsuffix + if {[string compare $cmdrootname "Introduction"]} { + set cmds [concat $cmds [list $cmdrootname]] + } + } + set cmds [lsort $cmds] + foreach cmd $cmds { + $itk_component(mantree) insert end $cmd + } - pack $itk_component(archerManToC) -side left -expand no -fill y + pack $itk_component(archerManToC) -side left -expand no -fill y - # Main HTML window + # Main HTML window - itk_component add archerManF { - ::tk::frame $tlparent.archerManF - } {} - set sfcsman $itk_component(archerManF) - pack $sfcsman -expand yes -fill both - - # HTML widget - set manhtmlviewer [::hv3::hv3 $sfcsman.htmlview] - set manhtml [$manhtmlviewer html] - $manhtml configure -parsemode html - set help_fd [lindex [list [file join [bu_brlcad_data "html/mann/en"] Introduction.html]] 0] - get_html_data $help_fd - $manhtml parse $archer_help_data + itk_component add archerManF { + ::tk::frame $tlparent.archerManF + } {} + set sfcsman $itk_component(archerManF) + pack $sfcsman -expand yes -fill both + + # HTML widget + set manhtmlviewer [::hv3::hv3 $sfcsman.htmlview] + set manhtml [$manhtmlviewer html] + $manhtml configure -parsemode html + set help_fd [lindex [list [file join [bu_brlcad_data "html"] mann en Introduction.html]] 0] + get_html_data $help_fd + $manhtml parse $archer_help_data - grid $manhtmlviewer -sticky nsew -in $sfcsman + grid $manhtmlviewer -sticky nsew -in $sfcsman - grid columnconfigure $sfcsman 0 -weight 1 - grid rowconfigure $sfcsman 0 -weight 1 + grid columnconfigure $sfcsman 0 -weight 1 + grid rowconfigure $sfcsman 0 -weight 1 - pack $itk_component(archerManF) -side left -expand yes -fill both + pack $itk_component(archerManF) -side left -expand yes -fill both } bind $itk_component(mantree) <Button-1> {handle_select %W %y; Archer::get_html_man_data [%W get [%W curselection]]; Archer::html_man_display $manhtml} wm geometry $itk_component(archerMan) "800x600" } + ::itcl::body Archer::buildDisplayPreferences {} { set oglParent $itk_component(preferenceTabs) itk_component add displayF { @@ -4053,10 +4158,12 @@ wm geometry $itk_component(mouseOverridesDialog) "370x190" } + ::itcl::body Archer::buildOtherGeneralPreferences {_i} { return $_i } + ::itcl::body Archer::buildPreferencesDialog {} { itk_component add preferencesDialog { ::iwidgets::dialog $itk_interior.preferencesDialog \ @@ -4108,6 +4215,7 @@ wm geometry $itk_component(preferencesDialog) 450x500 } + ::itcl::body Archer::buildRevertDialog {} { buildInfoDialog revertDialog \ "Revert Database?" \ @@ -4130,6 +4238,7 @@ -hscrollmode none } + ::itcl::body Archer::buildToplevelMenubar {_parent {_prefix ""}} { itk_component add ${_prefix}menubar { ::menu $_parent.${_prefix}menubar \ @@ -4248,10 +4357,10 @@ -command [::itcl::code $this doAe 0 -90] $itk_component(${_prefix}stdviewsmenu) add separator $itk_component(${_prefix}stdviewsmenu) add command \ - -label "35,25" \ + -label "35, 25" \ -command [::itcl::code $this doAe 35 25] $itk_component(${_prefix}stdviewsmenu) add command \ - -label "45,45" \ + -label "45, 45" \ -command [::itcl::code $this doAe 45 45] $itk_component(${_prefix}displaymenu) add cascade \ -label "Standard Views" \ @@ -4474,15 +4583,16 @@ ::itcl::body Archer::doAboutArcher {} { -# bind $itk_component(aboutDialog) <Enter> "raise $itk_component(aboutDialog)" -# bind $itk_component(aboutDialog) <Configure> "raise $itk_component(aboutDialog)" -# bind $itk_component(aboutDialog) <FocusOut> "raise $itk_component(aboutDialog)" + # bind $itk_component(aboutDialog) <Enter> "raise $itk_component(aboutDialog)" + # bind $itk_component(aboutDialog) <Configure> "raise $itk_component(aboutDialog)" + # bind $itk_component(aboutDialog) <FocusOut> "raise $itk_component(aboutDialog)" $itk_component(aboutDialog) center [namespace tail $this] ::update $itk_component(aboutDialog) activate } + ::itcl::body Archer::doarcherMan {} { global tcl_platform @@ -4509,14 +4619,17 @@ after idle [::itcl::code $this launchDisplayMenuEnd] } + ::itcl::body Archer::launchDisplayMenuEnd {} { -# set mCurrentPaneName "" + # set mCurrentPaneName "" } + ::itcl::body Archer::fbActivePaneCallback {_pane} { ArcherCore::setActivePane $_pane } + ::itcl::body Archer::fbEnabledCallback {_on} { if {$_on} { $itk_component(primaryToolbar) itemconfigure toggle_fb \ @@ -4527,6 +4640,7 @@ } } + ::itcl::body Archer::fbModeCallback {_mode} { switch -- $_mode { 1 { @@ -4547,20 +4661,24 @@ -image $img } + ::itcl::body Archer::fbModeToggle {} { $itk_component(rtcntrl) toggleFbMode } + ::itcl::body Archer::fbToggle {} { $itk_component(rtcntrl) toggleFB } + ::itcl::body Archer::rtEndCallback {_aborted} { $itk_component(primaryToolbar) itemconfigure raytrace \ -image $mImage_rt \ -command [::itcl::code $this raytracePlus] } + ::itcl::body Archer::raytracePlus {} { $itk_component(primaryToolbar) itemconfigure raytrace \ -image $mImage_rtAbort \ @@ -4568,6 +4686,7 @@ $itk_component(rtcntrl) raytracePlus } + ::itcl::body Archer::menuStatusCB {_w} { if {$mDoStatus} { # entry might not support -label (i.e. tearoffs) @@ -4628,10 +4747,10 @@ "Bottom" { set mStatusStr "Set view to bottom" } - "35,25" { + "35, 25" { set mStatusStr "Set view to az=35, el=25" } - "45,45" { + "45, 45" { set mStatusStr "Set view to az=45, el=45" } "Primary" { @@ -4712,6 +4831,7 @@ } } + ::itcl::body Archer::modesMenuStatusCB {_w} { if {$mDoStatus} { # entry might not support -label (i.e. tearoffs) @@ -4754,6 +4874,7 @@ } } + ::itcl::body Archer::rtCheckMenuStatusCB {_w} { if {$mDoStatus} { # entry might not support -label (i.e. tearoffs) @@ -4781,6 +4902,7 @@ } } + ::itcl::body Archer::rtEdgeMenuStatusCB {_w} { if {$mDoStatus} { # entry might not support -label (i.e. tearoffs) @@ -4805,6 +4927,7 @@ } } + ::itcl::body Archer::rtMenuStatusCB {_w} { if {$mDoStatus} { # entry might not support -label (i.e. tearoffs) @@ -4829,6 +4952,7 @@ } } + ::itcl::body Archer::updateCreationButtons {_on} { if {$_on} { $itk_component(primaryToolbar) itemconfigure other -state normal @@ -4839,6 +4963,7 @@ } } + ::itcl::body Archer::updateRaytraceButtons {_on} { if {$_on} { $itk_component(primaryToolbar) itemconfigure toggle_fb \ @@ -4867,6 +4992,7 @@ } } + ::itcl::body Archer::updatePrimaryToolbar {} { # Populate the primary toolbar $itk_component(primaryToolbar) insert 0 button new \ @@ -4923,7 +5049,7 @@ -command [::itcl::code $this askToRevert] - if {$::Archer::plugins != ""} { + if {$::Archer::plugins != ""} { $itk_component(primaryToolbar) insert rotate frame fill2 \ -relief flat \ -width 3 @@ -4947,42 +5073,42 @@ -relief flat \ -width 3 -# $itk_component(primaryToolbar) insert rotate button arb6 \ + # $itk_component(primaryToolbar) insert rotate button arb6 \ -balloonstr "Create an arb6" \ -helpstr "Create an arb6" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj arb6] -# $itk_component(primaryToolbar) insert rotate button arb8 \ + # $itk_component(primaryToolbar) insert rotate button arb8 \ -balloonstr "Create an arb8" \ -helpstr "Create an arb8" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj arb8] -# $itk_component(primaryToolbar) insert rotate button cone \ + # $itk_component(primaryToolbar) insert rotate button cone \ -balloonstr "Create a tgc" \ -helpstr "Create a tgc" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj tgc] -# $itk_component(primaryToolbar) insert rotate button sphere \ + # $itk_component(primaryToolbar) insert rotate button sphere \ -balloonstr "Create a sphere" \ -helpstr "Create a sphere" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj sph] -# $itk_component(primaryToolbar) insert rotate button torus \ + # $itk_component(primaryToolbar) insert rotate button torus \ -balloonstr "Create a torus" \ -helpstr "Create a torus" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj tor] -# $itk_component(primaryToolbar) insert rotate button pipe \ + # $itk_component(primaryToolbar) insert rotate button pipe \ -balloonstr "Create a pipe" \ -helpstr "Create a pipe" \ -relief flat \ @@ -5013,7 +5139,6 @@ -overrelief raised \ -command [::itcl::code $this createObj comb] - set parent [$itk_component(primaryToolbar) component other] itk_component add primitiveMenu { @@ -5175,7 +5300,7 @@ $itk_component(primitiveMenu) add command \ -image $mImage_ehyLabeled \ -command [::itcl::code $this createObj ehy] -# $itk_component(primitiveMenu) add command \ + # $itk_component(primitiveMenu) add command \ -image $mImage_etoLabeled \ -command [::itcl::code $this createObj eto] $itk_component(primitiveMenu) add command \ @@ -5199,7 +5324,7 @@ $itk_component(primitiveMenu) add command \ -image $mImage_sketchLabeled \ -command [::itcl::code $this createObj sketch] -# $itk_component(primitiveMenu) add command \ + # $itk_component(primitiveMenu) add command \ -image $mImage_torLabeled \ -command [::itcl::code $this createObj tor] @@ -5208,84 +5333,84 @@ -menu $itk_component(primitiveMenu) \ -activebackground [$parent cget -background] -# $itk_component(primaryToolbar) insert rotate button ehy \ + # $itk_component(primaryToolbar) insert rotate button ehy \ -balloonstr "Create an ehy" \ -helpstr "Create an ehy" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj ehy] -# $itk_component(primaryToolbar) insert rotate button epa \ + # $itk_component(primaryToolbar) insert rotate button epa \ -balloonstr "Create an epa" \ -helpstr "Create an epa" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj epa] -# $itk_component(primaryToolbar) insert rotate button rpc \ + # $itk_component(primaryToolbar) insert rotate button rpc \ -balloonstr "Create an rpc" \ -helpstr "Create an rpc" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj rpc] -# $itk_component(primaryToolbar) insert rotate button rhc \ + # $itk_component(primaryToolbar) insert rotate button rhc \ -balloonstr "Create an rhc" \ -helpstr "Create an rhc" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj rhc] -# $itk_component(primaryToolbar) insert rotate button ell \ + # $itk_component(primaryToolbar) insert rotate button ell \ -balloonstr "Create an ellipsoid" \ -helpstr "Create an ellipsoid" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj ell] -# $itk_component(primaryToolbar) insert rotate button eto \ + # $itk_component(primaryToolbar) insert rotate button eto \ -balloonstr "Create an eto" \ -helpstr "Create an eto" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj eto] -# $itk_component(primaryToolbar) insert rotate button half \ + # $itk_component(primaryToolbar) insert rotate button half \ -balloonstr "Create a half space" \ -helpstr "Create a half space" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj half] -# $itk_component(primaryToolbar) insert rotate button part \ + # $itk_component(primaryToolbar) insert rotate button part \ -balloonstr "Create a particle" \ -helpstr "Create a particle" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj part] -# $itk_component(primaryToolbar) insert rotate button grip \ + # $itk_component(primaryToolbar) insert rotate button grip \ -balloonstr "Create a grip" \ -helpstr "Create a grip" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj grip] -# $itk_component(primaryToolbar) insert rotate button extrude \ + # $itk_component(primaryToolbar) insert rotate button extrude \ -balloonstr "Create an extrusion" \ -helpstr "Create an extrusion" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj extrude] -# $itk_component(primaryToolbar) insert rotate button sketch \ + # $itk_component(primaryToolbar) insert rotate button sketch \ -balloonstr "Create a sketch" \ -helpstr "Create a sketch" \ -relief flat \ -overrelief raised \ -command [::itcl::code $this createObj sketch] -# $itk_component(primaryToolbar) insert rotate button bot \ + # $itk_component(primaryToolbar) insert rotate button bot \ -balloonstr "Create a bot" \ -helpstr "Create a bot" \ -relief flat \ @@ -5411,6 +5536,7 @@ buildEmbeddedHelpMenu } + ::itcl::body Archer::buildEmbeddedFileMenu {} { $itk_component(menubar) add menubutton file \ -text "File" -menu { @@ -5455,6 +5581,7 @@ -command [::itcl::code $this Close] } + ::itcl::body Archer::buildEmbeddedDisplayMenu {} { $itk_component(menubar) add menubutton display \ -text "Display" -menu { @@ -5496,9 +5623,9 @@ command bottom -label "Bottom" \ -helpstr "Set view to bottom" separator sep0 - command 35,25 -label "35,25" \ + command 35, 25 -label "35, 25" \ -helpstr "Set view to az=35, el=25" - command 45,45 -label "45,45" \ + command 45, 45 -label "45, 45" \ -helpstr "Set view to az=45, el=45" } @@ -5543,9 +5670,9 @@ -command [::itcl::code $this doAe 0 90] $itk_component(menubar) menuconfigure .display.standard.bottom \ -command [::itcl::code $this doAe 0 -90] - $itk_component(menubar) menuconfigure .display.standard.35,25 \ + $itk_component(menubar) menuconfigure .display.standard.35, 25 \ -command [::itcl::code $this doAe 35 25] - $itk_component(menubar) menuconfigure .display.standard.45,45 \ + $itk_component(menubar) menuconfigure .display.standard.45, 45 \ -command [::itcl::code $this doAe 45 45] $itk_component(menubar) menuconfigure .display.clear \ -command [::itcl::code $this zap] \ @@ -5555,6 +5682,7 @@ -state disabled } + ::itcl::body Archer::buildEmbeddedHelpMenu {} { $itk_component(menubar) add menubutton help \ -text "Help" \ @@ -5581,6 +5709,7 @@ -command [::itcl::code $this doMouseOverrides] } + ::itcl::body Archer::buildEmbeddedModesMenu {} { $itk_component(menubar) add menubutton modes \ -text "Modes" -menu { @@ -5710,6 +5839,7 @@ -state disabled } + ::itcl::body Archer::buildEmbeddedRaytraceMenu {} { $itk_component(menubar) add menubutton raytrace \ -text "Raytrace" -menu { @@ -5782,6 +5912,7 @@ -state disabled } + ::itcl::body Archer::buildModesMenu {{_prefix ""}} { itk_component add ${_prefix}modesmenu { menu $itk_component(menubar).${_prefix}modesmenu \ @@ -5906,6 +6037,7 @@ -state disabled } + ::itcl::body Archer::activateMenusEtc {} { if {!$mViewOnly} { updateRaytraceButtons 1 @@ -5977,6 +6109,7 @@ } } + ################################### Modes Section ################################### ::itcl::body Archer::initMode {{_updateFractions 0}} { @@ -6226,6 +6359,7 @@ } } + ::itcl::body Archer::beginObjScale {} { set obj $mSelectedObjPath @@ -6254,6 +6388,7 @@ } } + ::itcl::body Archer::beginObjTranslate {} { set obj $mSelectedObjPath @@ -6283,6 +6418,7 @@ } } + ::itcl::body Archer::beginObjCenter {} { set obj $mSelectedObjPath @@ -6306,6 +6442,7 @@ } } + ::itcl::body Archer::endObjCenter {_obj} { updateObjSave initEdit 0 @@ -6314,6 +6451,7 @@ addHistory "ocenter $_obj $center" } + ::itcl::body Archer::endObjRotate {dname obj} { $itk_component(ged) pane_idle_mode $dname updateObjSave @@ -6325,6 +6463,7 @@ } } + ::itcl::body Archer::endObjScale {dname obj} { $itk_component(ged) pane_idle_mode $dname updateObjSave @@ -6336,12 +6475,14 @@ } } + ::itcl::body Archer::endObjTranslate {_dm _obj _mx _my} { $itk_component(ged) pane_idle_mode $_dm handleObjCenter $_dm $_obj $_mx $_my endObjCenter $_obj } + ::itcl::body Archer::handleObjCenter {_dm _obj _mx _my} { set ocenter [gedCmd ocenter $_obj] set ocenter [vscale $ocenter [gedCmd local2base]] @@ -6382,6 +6523,7 @@ } {} } + ::itcl::body Archer::buildArb5EditView {} { set parent $itk_component(objEditView) itk_component add arb5View { @@ -6390,6 +6532,7 @@ } {} } + ::itcl::body Archer::buildArb6EditView {} { set parent $itk_component(objEditView) itk_component add arb6View { @@ -6398,6 +6541,7 @@ } {} } + ::itcl::body Archer::buildArb7EditView {} { set parent $itk_component(objEditView) itk_component add arb7View { @@ -6406,6 +6550,7 @@ } {} } + ::itcl::body Archer::buildArb8EditView {} { set parent $itk_component(objEditView) itk_component add arb8View { @@ -6414,6 +6559,7 @@ } {} } + ::itcl::body Archer::buildBotEditView {} { #XXX Not ready yet return @@ -6425,6 +6571,7 @@ } {} } + ::itcl::body Archer::buildCombEditView {} { set parent $itk_component(objEditView) itk_component add combView { @@ -6433,6 +6580,7 @@ } {} } + ::itcl::body Archer::buildDbAttrView {} { set parent [$itk_component(vpane) childsite attrView] $parent configure \ @@ -6505,6 +6653,7 @@ grid columnconfigure $itk_component(dbAttrView) 1 -weight 1 } + ::itcl::body Archer::buildEhyEditView {} { set parent $itk_component(objEditView) itk_component add ehyView { @@ -6513,6 +6662,7 @@ } {} } + ::itcl::body Archer::buildEllEditView {} { set parent $itk_component(objEditView) itk_component add ellView { @@ -6521,6 +6671,7 @@ } {} } + ::itcl::body Archer::buildEpaEditView {} { set parent $itk_component(objEditView) itk_component add epaView { @@ -6529,6 +6680,7 @@ } {} } + ::itcl::body Archer::buildEtoEditView {} { set parent $itk_component(objEditView) itk_component add etoView { @@ -6537,6 +6689,7 @@ } {} } + ::itcl::body Archer::buildExtrudeEditView {} { set parent $itk_component(objEditView) itk_component add extrudeView { @@ -6545,6 +6698,7 @@ } {} } + ::itcl::body Archer::buildGripEditView {} { set parent $itk_component(objEditView) itk_component add gripView { @@ -6553,6 +6707,7 @@ } {} } + ::itcl::body Archer::buildHalfEditView {} { set parent $itk_component(objEditView) itk_component add halfView { @@ -6561,6 +6716,7 @@ } {} } + ::itcl::body Archer::buildHypEditView {} { set parent $itk_component(objEditView) itk_component add hypView { @@ -6569,6 +6725,7 @@ } {} } + ::itcl::body Archer::buildObjAttrView {} { set parent [$itk_component(vpane) childsite attrView] itk_component add objAttrView { @@ -6589,6 +6746,7 @@ pack $itk_component(objAttrText) -expand yes -fill both } + ::itcl::body Archer::buildObjEditView {} { set parent [$itk_component(vpane) childsite attrView] itk_component add objEditView { @@ -6598,6 +6756,7 @@ } {} } + ::itcl::body Archer::buildObjViewToolbar {} { set parent [$itk_component(vpane) childsite attrView] itk_component add objViewToolbar { @@ -6628,6 +6787,7 @@ -command [::itcl::code $this initObjAttrView] } + ::itcl::body Archer::buildPartEditView {} { set parent $itk_component(objEditView) itk_component add partView { @@ -6636,17 +6796,19 @@ } {} } + ::itcl::body Archer::buildPipeEditView {} { #XXX Not ready yet return -# set parent $itk_component(objEditView) -# itk_component add pipeView { -# PipeEditFrame $parent.pipeview \ -# -units "mm" -# } {} + # set parent $itk_component(objEditView) + # itk_component add pipeView { + # PipeEditFrame $parent.pipeview \ + # -units "mm" + # } {} } + ::itcl::body Archer::buildRhcEditView {} { set parent $itk_component(objEditView) itk_component add rhcView { @@ -6655,6 +6817,7 @@ } {} } + ::itcl::body Archer::buildRpcEditView {} { set parent $itk_component(objEditView) itk_component add rpcView { @@ -6663,17 +6826,19 @@ } {} } + ::itcl::body Archer::buildSketchEditView {} { #XXX Not ready yet return -# set parent $itk_component(objEditView) -# itk_component add sketchView { -# SketchEditFrame $parent.sketchview \ -# -units "mm" -# } {} + # set parent $itk_component(objEditView) + # itk_component add sketchView { + # SketchEditFrame $parent.sketchview \ + # -units "mm" + # } {} } + ::itcl::body Archer::buildSphereEditView {} { set parent $itk_component(objEditView) itk_component add sphView { @@ -6682,6 +6847,7 @@ } {} } + ::itcl::body Archer::buildSuperellEditView {} { set parent $itk_component(objEditView) itk_component add superellView { @@ -6690,6 +6856,7 @@ } {} } + ::itcl::body Archer::buildTgcEditView {} { set parent $itk_component(objEditView) itk_component add tgcView { @@ -6698,6 +6865,7 @@ } {} } + ::itcl::body Archer::buildTorusEditView {} { set parent $itk_component(objEditView) itk_component add torView { @@ -6706,6 +6874,7 @@ } {} } + ::itcl::body Archer::buildInvalidObjEditView {} { set parent $itk_component(objEditView) itk_component add invalidView { @@ -6714,6 +6883,7 @@ } {} } + ::itcl::body Archer::initArb4EditView {odata} { $itk_component(arb4View) configure \ -geometryObject $mSelectedObj \ @@ -6730,6 +6900,7 @@ -fill both } + ::itcl::body Archer::initArb5EditView {odata} { $itk_component(arb5View) configure \ -geometryObject $mSelectedObj \ @@ -6746,6 +6917,7 @@ -fill both } + ::itcl::body Archer::initArb6EditView {odata} { $itk_component(arb6View) configure \ -geometryObject $mSelectedObj \ @@ -6762,6 +6934,7 @@ -fill both } + ::itcl::body Archer::initArb7EditView {odata} { $itk_component(arb7View) configure \ -geometryObject $mSelectedObj \ @@ -6778,6 +6951,7 @@ -fill both } + ::itcl::body Archer::initArb8EditView {odata} { $itk_component(arb8View) configure \ -geometryObject $mSelectedObj \ @@ -6794,24 +6968,26 @@ -fill both } + ::itcl::body Archer::initBotEditView {odata} { #XXX Not ready yet return -# $itk_component(botView) configure \ -# -geometryObject $mSelectedObj \ -# -geometryChangedCallback [::itcl::code $this updateObjEditView] \ -# -mged $itk_component(ged) \ -# -labelFont $mFontText \ -# -boldLabelFont $mFontTextBold \ -# -entryFont $mFontText -# $itk_component(botView) initGeometry $odata + # $itk_component(botView) configure \ + # -geometryObject $mSelectedObj \ + # -geometryChangedCallback [::itcl::code $this updateObjEditView] \ + # -mged $itk_component(ged) \ + # -labelFont $mFontText \ + # -boldLabelFont $mFontTextBold \ + # -entryFont $mFontText + # $itk_component(botView) initGeometry $odata -# pack $itk_component(botView) \ -# -expand yes \ -# -fill both + # pack $itk_component(botView) \ + # -expand yes \ + # -fill both } + ::itcl::body Archer::initCombEditView {odata} { $itk_component(combView) configure \ -geometryObject $mSelectedObj \ @@ -6827,6 +7003,7 @@ -fill both } + ::itcl::body Archer::initDbAttrView {name} { catch {pack forget $itk_component(dbAttrView)} catch {pack forget $itk_component(objViewToolbar)} @@ -6863,6 +7040,7 @@ pack $itk_component(dbAttrView) -expand yes -fill both } + ::itcl::body Archer::initEhyEditView {odata} { $itk_component(ehyView) configure \ -geometryObject $mSelectedObj \ @@ -6878,6 +7056,7 @@ -fill both } + ::itcl::body Archer::initEllEditView {odata} { $itk_component(ellView) configure \ -geometryObject $mSelectedObj \ @@ -6893,6 +7072,7 @@ -fill both } + ::itcl::body Archer::initEpaEditView {odata} { $itk_component(epaView) configure \ -geometryObject $mSelectedObj \ @@ -6908,6 +7088,7 @@ -fill both } + ::itcl::body Archer::initEtoEditView {odata} { $itk_component(etoView) configure \ -geometryObject $mSelectedObj \ @@ -6923,6 +7104,7 @@ -fill both } + ::itcl::body Archer::initExtrudeEditView {odata} { $itk_component(extrudeView) configure \ -geometryObject $mSelectedObj \ @@ -6938,6 +7120,7 @@ -fill both } + ::itcl::body Archer::initGripEditView {odata} { $itk_component(gripView) configure \ -geometryObject $mSelectedObj \ @@ -6953,6 +7136,7 @@ -fill both } + ::itcl::body Archer::initHalfEditView {odata} { $itk_component(halfView) configure \ -geometryObject $mSelectedObj \ @@ -6968,6 +7152,7 @@ -fill both } + ::itcl::body Archer::initHypEditView {odata} { $itk_component(hypView) configure \ -geometryObject $mSelectedObj \ @@ -6983,6 +7168,7 @@ -fill both } + ::itcl::body Archer::initNoWizard {parent msg} { if {![info exists itk_component(noWizard)]} { itk_component add noWizard { @@ -7001,6 +7187,7 @@ set mNoWizardActive 1 } + ::itcl::body Archer::initObjAttrView {} { if {$mSelectedObj == ""} { return @@ -7042,6 +7229,7 @@ pack $itk_component(objAttrView) -expand yes -fill both -anchor n } + ::itcl::body Archer::initObjEditView {} { if {$mSelectedObj == ""} { return @@ -7101,6 +7289,7 @@ } } + ## - initObjWizard # # Note - Before we get here, any previous wizard instances are destroyed @@ -7164,6 +7353,7 @@ } } + ::itcl::body Archer::initPartEditView {odata} { $itk_component(partView) configure \ -geometryObject $mSelectedObj \ @@ -7179,6 +7369,7 @@ -fill both } + ::itcl::body Archer::initPipeEditView {odata} { #XXX Not ready yet return @@ -7197,6 +7388,7 @@ -fill both } + ::itcl::body Archer::initRhcEditView {odata} { $itk_component(rhcView) configure \ -geometryObject $mSelectedObj \ @@ -7212,6 +7404,7 @@ -fill both } + ::itcl::body Archer::initRpcEditView {odata} { $itk_component(rpcView) configure \ -geometryObject $mSelectedObj \ @@ -7227,6 +7420,7 @@ -fill both } + ::itcl::body Archer::initSketchEditView {odata} { #XXX Not ready yet return @@ -7245,6 +7439,7 @@ -fill both } + ::itcl::body Archer::initSphereEditView {odata} { $itk_component(sphView) configure \ -geometryObject $mSelectedObj \ @@ -7260,6 +7455,7 @@ -fill both } + ::itcl::body Archer::initSuperellEditView {odata} { $itk_component(superellView) configure \ -geometryObject $mSelectedObj \ @@ -7275,6 +7471,7 @@ -fill both } + ::itcl::body Archer::initTgcEditView {odata} { $itk_component(tgcView) configure \ -geometryObject $mSelectedObj \ @@ -7290,6 +7487,7 @@ -fill both } + ::itcl::body Archer::initTorusEditView {odata} { $itk_component(torView) configure \ -geometryObject $mSelectedObj \ @@ -7305,6 +7503,7 @@ -fill both } + ::itcl::body Archer::initInvalidObjEditView {_oname} { $itk_component(invalidView) configure \ -text "$_oname does not exist" @@ -7313,6 +7512,7 @@ -fill both } + ::itcl::body Archer::updateObjEdit {updateObj needInit needSave} { set renderData [gedCmd how -b $mSelectedObjPath] set renderMode [lindex $renderData 0] @@ -7337,11 +7537,13 @@ gedCmd configure -autoViewEnable 1 } + ::itcl::body Archer::updateObjEditView {} { updateObjSave redrawObj $mSelectedObjPath } + ::itcl::body Archer::updateCombEditView {} { updateObjEditView syncTree @@ -7373,6 +7575,7 @@ } } + ::itcl::body Archer::buildWizardMenu {} { $itk_component(primaryToolbar) insert rotate menubutton wizards \ -balloonstr "Wizard Plugins" \ @@ -7392,6 +7595,7 @@ -activebackground [$parent cget -background] } + ::itcl::body Archer::buildWizardObj {dialog wizard action oname} { $dialog deactivate @@ -7415,6 +7619,7 @@ ::itcl::delete object $dialog } + ::itcl::body Archer::invokeUtilityDialog {class wname w} { set instance [::itcl::find object -class $class] if {$instance != ""} { @@ -7474,15 +7679,16 @@ # wm geometry $dialog "500x500" # Event bindings -# bind $dialog <Enter> "raise $dialog" -# bind $dialog <Configure> "raise $dialog" -# bind $dialog <FocusOut> "raise $dialog" + # bind $dialog <Enter> "raise $dialog" + # bind $dialog <Configure> "raise $dialog" + # bind $dialog <FocusOut> "raise $dialog" $dialog center $w ::update $dialog activate } + ::itcl::body Archer::invokeWizardDialog {class action wname} { gedCmd make_name -s 1 set name [string tolower $class] @@ -7546,6 +7752,7 @@ $dialog activate } + ::itcl::body Archer::invokeWizardUpdate {wizard action oname name} { if {$name == ""} { set name [$wizard getWizardTop] @@ -7582,6 +7789,7 @@ syncTree } + ::itcl::body Archer::pluginGetMinAllowableRid {} { set maxRid 0 foreach {rid rname} [$itk_component(ged) rmap] { @@ -7593,6 +7801,7 @@ return [expr {$maxRid + 1}] } + ::itcl::body Archer::pluginUpdateProgressBar {percent} { set mProgressBarWidth [winfo width $itk_component(progress)] set mProgressBarHeight [winfo height $itk_component(progress)] @@ -7609,6 +7818,7 @@ ::update } + ::itcl::body Archer::pluginUpdateSaveMode {mode} { if {1 <= $mode} { set mode 1 @@ -7620,11 +7830,13 @@ updateSaveMode } + ::itcl::body Archer::pluginUpdateStatusBar {msg} { set mStatusStr $msg ::update } + ::itcl::body Archer::updateUtilityMenu {} { foreach dialog [::itcl::find object -class ::iwidgets::Dialog] { if {[regexp {utility_dialog} $dialog]} { @@ -7682,6 +7894,7 @@ } } + ::itcl::body Archer::updateWizardMenu {} { # Look for appropriate wizard plugins set wplugins {} @@ -7884,6 +8097,7 @@ gedCmd grid rv $mGridRv } + ::itcl::body Archer::applyGridPreferencesIfDiff {} { set X [lindex $mGridAnchor 0] set Y [lindex $mGridAnchor 1] @@ -7921,6 +8135,7 @@ } } + ::itcl::body Archer::applyGroundPlanePreferencesIfDiff {} { if {$mGroundPlaneSize != $mGroundPlaneSizePref || $mGroundPlaneInterval != $mGroundPlaneIntervalPref || @@ -8262,6 +8477,7 @@ } } + ::itcl::body Archer::doPreferences {} { # update preference variables set mZClipModePref $mZClipMode @@ -8359,10 +8575,12 @@ } } + ::itcl::body Archer::readPreferencesInit {} { set mPrefFile ".archerrc" } + ::itcl::body Archer::writePreferences {} { global env @@ -8389,6 +8607,7 @@ } } + ::itcl::body Archer::writePreferencesHeader {_pfile} { puts $_pfile "# Archer's Preferences File" puts $_pfile "# Version 1.0.0" @@ -8399,6 +8618,7 @@ puts $_pfile "#" } + ::itcl::body Archer::writePreferencesBody {_pfile} { global no_tree_decorate @@ -8467,12 +8687,14 @@ puts $_pfile "set mVPaneToggle5 $mVPaneToggle5" } + ::itcl::body Archer::affectedNodeHighlightCallback {} { if {!$mEnableAffectedNodeHighlightPref} { set mEnableListViewAllAffectedPref 0 } } + ::itcl::body Archer::listViewAllAffectedCallback {} { if {$mEnableListViewAllAffectedPref} { set mEnableAffectedNodeHighlightPref 1 @@ -8523,10 +8745,10 @@ vmake $name bot #XXX Not ready yet -# return + # return -# set name [gedCmd make_name "bot."] -# createBot $name + # set name [gedCmd make_name "bot."] + # createBot $name } "comb" { set name [gedCmd make_name "comb."] @@ -8557,10 +8779,10 @@ vmake $name extrude #XXX Not ready yet -# return + # return -# set name [gedCmd make_name "extrude."] -# createExtrude $name + # set name [gedCmd make_name "extrude."] + # createExtrude $name } "grip" { set name [gedCmd make_name "grip."] @@ -8591,10 +8813,10 @@ vmake $name pipe #XXX Not ready yet -# return + # return -# set name [gedCmd make_name "pipe."] -# createPipe $name + # set name [gedCmd make_name "pipe."] + # createPipe $name } "rcc" { set name [gedCmd make_name "rcc."] @@ -8619,8 +8841,8 @@ "sketch" { set name [gedCmd make_name "sketch."] vmake $name sketch -# set name [gedCmd make_name "sketch."] -# createSketch $name + # set name [gedCmd make_name "sketch."] + # createSketch $name } "sph" { set name [gedCmd make_name "sph."] @@ -8654,7 +8876,7 @@ fillTree {} $name $mEnableListView $itk_component(ged) draw $name selectTreePath $name -# updateTreeDrawLists + # updateTreeDrawLists # Checkpoint the created object checkpoint $name $LEDGER_CREATE @@ -8663,6 +8885,7 @@ updateSaveMode } + ::itcl::body Archer::createArb4 {name} { if {![info exists itk_component(arb4View)]} { buildArb4EditView @@ -8672,6 +8895,7 @@ $itk_component(arb4View) createGeometry $name } + ::itcl::body Archer::createArb5 {name} { if {![info exists itk_component(arb5View)]} { buildArb5EditView @@ -8681,6 +8905,7 @@ $itk_component(arb5View) createGeometry $name } + ::itcl::body Archer::createArb6 {name} { if {![info exists itk_component(arb6View)]} { buildArb6EditView @@ -8690,6 +8915,7 @@ $itk_component(arb6View) createGeometry $name } + ::itcl::body Archer::createArb7 {name} { if {![info exists itk_component(arb7View)]} { buildArb7EditView @@ -8699,6 +8925,7 @@ $itk_component(arb7View) createGeometry $name } ... [truncated message content] |
From: <bo...@us...> - 2011-01-14 15:29:01
|
Revision: 42263 http://brlcad.svn.sourceforge.net/brlcad/?rev=42263&view=rev Author: bob1961 Date: 2011-01-14 15:28:54 +0000 (Fri, 14 Jan 2011) Log Message: ----------- Move raytracePlus to the public section. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-01-14 15:02:32 UTC (rev 42262) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-01-14 15:28:54 UTC (rev 42263) @@ -151,10 +151,10 @@ method pluginUpdateStatusBar {msg} method importFg4Sections {_slist _wlist _delta} - method setDefaultBindingMode {_mode} # General method askToRevert {} + method raytracePlus {} # ArcherCore Override Section method 3ptarb {args} @@ -227,6 +227,7 @@ method vmake {args} method initImages {} method initFbImages {} + method setDefaultBindingMode {_mode} # Object Edit Management method checkpoint {_obj _type} @@ -314,7 +315,6 @@ method fbModeToggle {} method fbToggle {} method rtEndCallback {_aborted} - method raytracePlus {} #XXX Need to split up menuStatusCB into one method per menu method menuStatusCB {_w} @@ -938,6 +938,30 @@ } +::itcl::body Archer::raytracePlus {} { + $itk_component(primaryToolbar) itemconfigure raytrace \ + -image $mImage_rtAbort \ + -command "$itk_component(rtcntrl) abort" + $itk_component(rtcntrl) raytracePlus +} + + +::itcl::body Archer::askToRevert {} { + if {!$mNeedSave} { + return 0 + } + + $itk_component(revertDialog) center [namespace tail $this] + ::update + if {[$itk_component(revertDialog) activate]} { + revert + return 1 + } + + return 0 +} + + ::itcl::body Archer::3ptarb {args} { eval ArcherCore::gedWrapper 3ptarb 0 0 1 1 $args } @@ -1966,22 +1990,6 @@ ################################### Protected Section ################################### -::itcl::body Archer::askToRevert {} { - if {!$mNeedSave} { - return 0 - } - - $itk_component(revertDialog) center [namespace tail $this] - ::update - if {[$itk_component(revertDialog) activate]} { - revert - return 1 - } - - return 0 -} - - ################################### ArcherCore Override Section ################################### ::itcl::body Archer::buildCommandView {} { @@ -4673,14 +4681,6 @@ } -::itcl::body Archer::raytracePlus {} { - $itk_component(primaryToolbar) itemconfigure raytrace \ - -image $mImage_rtAbort \ - -command "$itk_component(rtcntrl) abort" - $itk_component(rtcntrl) raytracePlus -} - - ::itcl::body Archer::menuStatusCB {_w} { if {$mDoStatus} { # entry might not support -label (i.e. tearoffs) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-02-01 23:10:52
|
Revision: 42866 http://brlcad.svn.sourceforge.net/brlcad/?rev=42866&view=rev Author: bob1961 Date: 2011-02-01 23:10:46 +0000 (Tue, 01 Feb 2011) Log Message: ----------- Updated Archer::constructor to properly set the view of the command window (i.e. how much command window to display verses geometry window etc. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-01 23:02:04 UTC (rev 42865) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-01 23:10:46 UTC (rev 42866) @@ -520,7 +520,17 @@ set mVPaneToggle5 $mVPaneFraction5 readPreferences + set save_hpanefraction1 $mHPaneFraction1 + set save_hpanefraction2 $mHPaneFraction2 buildCommandViewNew 1 + + if {!$mSeparateCommandWindow} { + set mHPaneFraction1 $save_hpanefraction1 + set mHPaneFraction2 $save_hpanefraction2 + $itk_component(hpane) fraction $mHPaneFraction1 $mHPaneFraction2 + } + + set mDelayCommandViewBuild 0 pack $itk_component(advancedTabs) -fill both -expand yes ::update This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-02-02 16:46:57
|
Revision: 42904 http://brlcad.svn.sourceforge.net/brlcad/?rev=42904&view=rev Author: bob1961 Date: 2011-02-02 16:46:50 +0000 (Wed, 02 Feb 2011) Log Message: ----------- Added code to remember Archer's window size. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-02 16:45:18 UTC (rev 42903) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-02 16:46:50 UTC (rev 42904) @@ -307,6 +307,7 @@ method doAboutArcher {} method doarcherHelp {} method doarcherMan {} + method handleConfigure {} method launchDisplayMenuBegin {_dm _m _x _y} method launchDisplayMenuEnd {} method fbActivePaneCallback {_pane} @@ -558,8 +559,11 @@ $itk_component(primaryToolbar) itemconfigure new -state normal $itk_component(primaryToolbar) itemconfigure preferences -state normal + ::update Load "" + + bind [namespace tail $this] <Configure> [::itcl::code $this handleConfigure] } @@ -4644,7 +4648,14 @@ } +::itcl::body Archer::handleConfigure {} { + if {$mWindowGeometry != ""} { + wm geometry [namespace tail $this] $mWindowGeometry + } + bind [namespace tail $this] <Configure> {} +} + ::itcl::body Archer::launchDisplayMenuBegin {_dm _m _x _y} { set mCurrentPaneName $_dm tk_popup $_m $_x $_y @@ -8725,6 +8736,8 @@ puts $_pfile "set mVPaneToggle1 $mVPaneToggle1" puts $_pfile "set mVPaneToggle3 $mVPaneToggle3" puts $_pfile "set mVPaneToggle5 $mVPaneToggle5" + + puts $_pfile "set mWindowGeometry [winfo geometry [namespace tail $this]]" } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-02-04 20:30:16
|
Revision: 43026 http://brlcad.svn.sourceforge.net/brlcad/?rev=43026&view=rev Author: bob1961 Date: 2011-02-04 20:30:09 +0000 (Fri, 04 Feb 2011) Log Message: ----------- Added an fbclear command. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-04 19:49:07 UTC (rev 43025) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-04 20:30:09 UTC (rev 43026) @@ -154,6 +154,7 @@ # General method askToRevert {} + method fbclear {} method raytracePlus {} # ArcherCore Override Section @@ -952,6 +953,11 @@ } +::itcl::body Archer::fbclear {} { + $itk_component(rtcntrl) clear +} + + ::itcl::body Archer::raytracePlus {} { $itk_component(primaryToolbar) itemconfigure raytrace \ -image $mImage_rtAbort \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-02-08 19:26:34
|
Revision: 43131 http://brlcad.svn.sourceforge.net/brlcad/?rev=43131&view=rev Author: bob1961 Date: 2011-02-08 19:26:28 +0000 (Tue, 08 Feb 2011) Log Message: ----------- Override ArcherCore::zap Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-08 19:12:48 UTC (rev 43130) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-08 19:26:28 UTC (rev 43131) @@ -226,6 +226,7 @@ method track {args} method units {args} method vmake {args} + method zap {args} method initImages {} method initFbImages {} method setDefaultBindingMode {_mode} @@ -1804,7 +1805,11 @@ # eval ArcherCore::gedWrapper vmake 0 0 1 1 $args } +::itcl::body Archer::zap {args} { + eval ArcherCore::gedWrapper zap 0 0 0 1 $args +} + ::itcl::body Archer::initImages {} { if {$mInstanceInit} { return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-02-10 18:15:14
|
Revision: 43201 http://brlcad.svn.sourceforge.net/brlcad/?rev=43201&view=rev Author: bob1961 Date: 2011-02-10 18:15:07 +0000 (Thu, 10 Feb 2011) Log Message: ----------- Reset output handler when going to/from a separate command window configuration. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-10 17:43:14 UTC (rev 43200) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-02-10 18:15:07 UTC (rev 43201) @@ -8133,6 +8133,8 @@ activateMenusEtc updateSaveMode + + $itk_component(ged) set_outputHandler "$itk_component(cmd) putstring" } if {$mEnableBigEPref != $mEnableBigE} { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bhi...@us...> - 2011-06-07 02:45:00
|
Revision: 44770 http://brlcad.svn.sourceforge.net/brlcad/?rev=44770&view=rev Author: bhinesley Date: 2011-06-07 02:44:53 +0000 (Tue, 07 Jun 2011) Log Message: ----------- Removed doarcherMan, and set Help->Man Pages to call the man command directly Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-06-07 01:41:02 UTC (rev 44769) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-06-07 02:44:53 UTC (rev 44770) @@ -318,7 +318,6 @@ method buildViewAxesPreferences {} method doAboutArcher {} method doarcherHelp {} - method doarcherMan {} method handleConfigure {} method launchDisplayMenuBegin {_dm _m _x _y} method launchDisplayMenuEnd {} @@ -4533,7 +4532,7 @@ } $itk_component(${_prefix}helpmenu) add command \ -label "Archer Man Pages..." \ - -command [::itcl::code $this doarcherMan] + -command [::itcl::code $this man] $itk_component(${_prefix}helpmenu) add command \ -label "Archer Help..." \ -command [::itcl::code $this doarcherHelp] @@ -4661,17 +4660,6 @@ $itk_component(aboutDialog) activate } - -::itcl::body Archer::doarcherMan {} { - global tcl_platform - - $itk_component(archerMan) center [namespace tail $this] - ::update - $itk_component(archerMan) activate - -} - - ::itcl::body Archer::doarcherHelp {} { global tcl_platform This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bhi...@us...> - 2011-06-09 00:04:44
|
Revision: 44845 http://brlcad.svn.sourceforge.net/brlcad/?rev=44845&view=rev Author: bhinesley Date: 2011-06-09 00:04:37 +0000 (Thu, 09 Jun 2011) Log Message: ----------- Don't need to keep the window name around, since ManBrowser has getBrowser Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-06-08 23:36:33 UTC (rev 44844) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-06-09 00:04:37 UTC (rev 44845) @@ -3782,9 +3782,7 @@ buildarcherHelp # Build manual browser - set disabledPages [list] - global archerMan [ManBrowser $itk_interior.archerMan2 -parentName Archer \ - -disabledPages $disabledPages] + ManBrowser $itk_interior.archerMan2 -parentName Archer buildMouseOverridesDialog # buildInfoDialog mouseOverridesDialog \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bhi...@us...> - 2011-06-09 21:57:40
|
Revision: 44875 http://brlcad.svn.sourceforge.net/brlcad/?rev=44875&view=rev Author: bhinesley Date: 2011-06-09 21:57:33 +0000 (Thu, 09 Jun 2011) Log Message: ----------- ManBrowser window naming collision is no longer a factor; renamed window. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-06-09 16:23:47 UTC (rev 44874) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-06-09 21:57:33 UTC (rev 44875) @@ -3782,7 +3782,7 @@ buildarcherHelp # Build manual browser - ManBrowser $itk_interior.archerMan2 -parentName Archer + ManBrowser $itk_interior.archerMan -parentName Archer buildMouseOverridesDialog # buildInfoDialog mouseOverridesDialog \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2011-08-11 02:40:56
|
Revision: 45918 http://brlcad.svn.sourceforge.net/brlcad/?rev=45918&view=rev Author: starseeker Date: 2011-08-11 02:40:49 +0000 (Thu, 11 Aug 2011) Log Message: ----------- Check for toc.html as well, since it comes from the configure process and not the make process in the build directory. May want to consider adding a copy build rule for things like this so make puts everything back where it belongs, but not a huge deal since re-running cmake takes care of it. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-08-11 02:31:51 UTC (rev 45917) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-08-11 02:40:49 UTC (rev 45918) @@ -3196,7 +3196,8 @@ set tlparent [$itk_component(archerHelp) childsite] - if {[file exists [file join [bu_brlcad_data "html"] books en BRL-CAD_Tutorial_Series-VolumeI.html]]} { + if {[file exists [file join [bu_brlcad_data "html"] books en BRL-CAD_Tutorial_Series-VolumeI.html]] && + [file exists [file join [bu_brlcad_data "html"] toc.html]] } { # Table of Contents itk_component add archerHelpToC { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-08-31 19:20:47
|
Revision: 46504 http://brlcad.svn.sourceforge.net/brlcad/?rev=46504&view=rev Author: bob1961 Date: 2011-08-31 19:20:41 +0000 (Wed, 31 Aug 2011) Log Message: ----------- Added the initial code for editing pipes in Archer. More to come. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-08-31 19:19:20 UTC (rev 46503) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-08-31 19:20:41 UTC (rev 46504) @@ -6754,14 +6754,11 @@ ::itcl::body Archer::buildPipeEditView {} { - #XXX Not ready yet - return - - # set parent $itk_component(objEditView) - # itk_component add pipeView { - # PipeEditFrame $parent.pipeview \ - # -units "mm" - # } {} + set parent $itk_component(objEditView) + itk_component add pipeView { + PipeEditFrame $parent.pipeview \ + -units "mm" + } {} } @@ -7327,9 +7324,6 @@ ::itcl::body Archer::initPipeEditView {odata} { - #XXX Not ready yet - return - $itk_component(pipeView) configure \ -geometryObject $mSelectedObj \ -geometryChangedCallback [::itcl::code $this updateObjEditView] \ @@ -8797,13 +8791,8 @@ } "pipe" { set name [gedCmd make_name "pipe."] - vmake $name pipe - - #XXX Not ready yet - # return - - # set name [gedCmd make_name "pipe."] - # createPipe $name + createPipe $name + #vmake $name pipe } "rcc" { set name [gedCmd make_name "rcc."] @@ -9040,9 +9029,6 @@ ::itcl::body Archer::createPipe {name} { - #XXX Not ready yet - return - if {![info exists itk_component(pipeView)]} { buildPipeEditView $itk_component(pipeView) configure \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-09-27 17:15:14
|
Revision: 46930 http://brlcad.svn.sourceforge.net/brlcad/?rev=46930&view=rev Author: bob1961 Date: 2011-09-27 17:15:05 +0000 (Tue, 27 Sep 2011) Log Message: ----------- Updated Archer::bot_flip_check to fire another ray if the first one missed. This time use points from the first triangle to compute the start and target points. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-09-27 16:56:01 UTC (rev 46929) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-09-27 17:15:05 UTC (rev 46930) @@ -331,6 +331,7 @@ method fbModeToggle {} method fbToggle {} method rtEndCallback {_aborted} + method getRayBotNormalCos {_start _target _bot} #XXX Need to split up menuStatusCB into one method per menu method menuStatusCB {_w} @@ -1094,63 +1095,91 @@ set max [lindex $rpp 3] set target [expr {[vscale [vadd2 $min $max] 0.5]}] - set diff [vsub2 $max $min] - set start [vsub2 $target $diff] + set diag [vsub2 $max $min] + set start [vsub2 $target $diag] - set udir [vunitize $diff] - # Turn off orientation set save_orient [$itk_component(ged) get $item orient] if {$save_orient != "no"} { $itk_component(ged) adjust $item orient no } - set partitions [shootRay_doit $start "at" $target 1 1 1 1 $item] - if {$partitions == ""} { - incr miss_count - append miss_string "$item " + set cosa [getRayBotNormalCos $start $target $item] + if {$cosa == ""} { + # Try firing another ray. This time use points from the first triangle. + + if {[catch {$itk_component(ged) get $item V} bot_vertices]} { + incr skip_count + append skip_string "$item: unable to get vertices\n" - if {$save_orient != "no"} { - $itk_component(ged) adjust $item orient $save_orient + # Set orientation back to original setting + if {$save_orient != "no"} { + $itk_component(ged) adjust $item orient $save_orient + } + + continue } - continue - } + if {[catch {$itk_component(ged) get $item F} bot_faces] || + [llength $bot_faces] < 1} { + incr skip_count + append skip_string "$item: unable to get faces\n" - # Set orientation back to original setting - if {$save_orient != "no"} { - $itk_component(ged) adjust $item orient $save_orient - } + # Set orientation back to original setting + if {$save_orient != "no"} { + $itk_component(ged) adjust $item orient $save_orient + } - set partition [lindex $partitions 0] - if {[catch {bu_get_value_by_keyword in $partition} in]} { - incr miss_count - append miss_string "$item " - continue - } + continue + } - if {[catch {bu_get_value_by_keyword normal $in} hit_normal]} { - incr miss_count - append miss_string "$item " - continue - } + set face [lindex $bot_faces 0] + set v0 [lindex $bot_vertices [lindex $face 0]] + set v1 [lindex $bot_vertices [lindex $face 1]] + set v2 [lindex $bot_vertices [lindex $face 2]] - if {[catch {bu_get_value_by_keyword point $in} ipoint]} { - incr miss_count - append miss_string "$item " - continue - } + if {$v0 == "" || $v1 == "" || $v2 == ""} { + incr skip_count + append skip_string "$item: unable to get vertices\n" - set hit_normal [vunitize $hit_normal] - set vec [vscale $hit_normal 100] - set cosa [vdot $udir $hit_normal] + # Set orientation back to original setting + if {$save_orient != "no"} { + $itk_component(ged) adjust $item orient $save_orient + } - if {[vnear_zero $cosa 0.00001]} { - incr miss_count - append miss_string "$item " - continue + continue + } + + set oneThird [expr {1 / 3.0}] + set target [vscale [vadd3 $v0 $v1 $v2] $oneThird] + + set v1m0 [vsub2 $v1 $v0] + set v2m0 [vsub2 $v2 $v0] + set n [vunitize [vcross $v1m0 $v2m0]] + set diag_len [vmagnitude $diag] + set start [vsub2 $target [vscale $n $diag_len]] + + set cosa [getRayBotNormalCos $start $target $item] + if {$cosa == ""} { + # This should not happen + + incr skip_count + append skip_string "$item: unable to get faces\n" + + # Set orientation back to original setting + if {$save_orient != "no"} { + $itk_component(ged) adjust $item orient $save_orient + } + + continue + } } + # Set orientation back to original setting + if {$save_orient != "no"} { + $itk_component(ged) adjust $item orient $save_orient + } + if {$cosa > 0} { incr flip_count append flip_string "$item " @@ -4914,6 +4943,40 @@ } +## +# At this point _bot is expected to be the name of an existing, unoriented +# volume mode bot. This method fires a ray at the bot and determines if it +# needs flipping and returns either an empty string that indicates no determination +# could be made or the cosine of the angle between the ray and the bot's normal. +# +::itcl::body Archer::getRayBotNormalCos {_start _target _bot} { + set miss_flag 0 + set partitions [shootRay_doit $_start "at" $_target 1 1 1 1 $_bot] + + if {$partitions == ""} { + return "" + } + + set partition [lindex $partitions 0] + if {[catch {bu_get_value_by_keyword in $partition} in] || + [catch {bu_get_value_by_keyword normal $in} hit_normal]} { + return "" + } + + set diff [vsub2 $_target $_start] + set raydir [vunitize $diff] + + set hit_normal [vunitize $hit_normal] + set cosa [vdot $raydir $hit_normal] + + if {[vnear_zero $cosa 0.00001]} { + return "" + } + + return $cosa +} + + ::itcl::body Archer::menuStatusCB {_w} { if {$mDoStatus} { # entry might not support -label (i.e. tearoffs) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-10-04 13:34:04
|
Revision: 47042 http://brlcad.svn.sourceforge.net/brlcad/?rev=47042&view=rev Author: bob1961 Date: 2011-10-04 13:33:57 +0000 (Tue, 04 Oct 2011) Log Message: ----------- Added bot_split_all, bot_sync_all and bot_fix_all. Updated bot_flip_check to return a built up string instead of spewing things directly to the command window. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-04 13:31:23 UTC (rev 47041) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-04 13:33:57 UTC (rev 47042) @@ -166,8 +166,11 @@ # General method askToRevert {} - method bot_flip_check {_logfile args} - method bot_flip_check_all {_logfile} + method bot_fix_all {} + method bot_flip_check {args} + method bot_flip_check_all {} + method bot_split_all {} + method bot_sync_all {} method fbclear {} method raytracePlus {} @@ -487,7 +490,8 @@ if {$Archer::extraMgedCommands != ""} { eval lappend mArcherCoreCommands $Archer::extraMgedCommands } - lappend mArcherCoreCommands importFg4Sections bot_flip_check bot_flip_check_all + lappend mArcherCoreCommands importFg4Sections bot_flip_check \ + bot_flip_check_all bot_split_all bot_sync_all bot_fix_all if {!$mViewOnly} { updatePrimaryToolbar @@ -1015,19 +1019,24 @@ } -::itcl::body Archer::bot_flip_check {_logfile args} { +::itcl::body Archer::bot_fix_all {} { + set ret_string "" + append ret_string "[bot_split_all]\n\n" + append ret_string "[bot_sync_all]\n\n" + append ret_string "[bot_flip_check_all]" +} + + +::itcl::body Archer::bot_flip_check {args} { SetWaitCursor $this - if {[catch {open $_logfile "w"} fd]} { - return "bot_flip_check: not able to open logfile - \"$_logfile\"" - } - set skip_count 0 set no_flip_count 0 set flip_count 0 set miss_count 0 set skip_string "" + set not_bot_string "" set no_flip_string "" set flip_string "" set miss_string "" @@ -1036,6 +1045,8 @@ set icount 0 set last_percent 0 + putString "Flipping bots ..." + foreach item $args { incr icount @@ -1051,13 +1062,13 @@ if {$gtype != "bot"} { incr skip_count - append skip_string "$item is not a bot\n" + append not_bot_string "$item " continue } if {[$itk_component(ged) get $item mode] != "volume"} { incr skip_count - append skip_string "$item is not a volume mode bot\n" + append not_bot_string "$item " continue } @@ -1167,75 +1178,68 @@ } } - puts $fd "************************ ITEMS SKIPPED ************************ " + set ret_string "************************ ITEMS SKIPPED ************************\n" if {$skip_count} { - puts $fd $skip_string + append ret_string "$skip_string\n" + if {$not_bot_string != ""} { + append ret_string "The following are not volume mode bots:\n$not_bot_string\n" + } } else { - puts $fd "None" + append ret_string "None\n" } - puts $fd "" - puts $fd "" - puts $fd "************************ ITEMS MISSED ************************ " + append ret_string "\n" + append ret_string "\n" + append ret_string "************************ ITEMS MISSED ************************\n" if {$miss_count} { - puts $fd $miss_string + append ret_string "$miss_string\n" } else { - puts $fd "None" + append ret_string "None\n" } - puts $fd "" - puts $fd "" - puts $fd "************************ ITEMS NOT FLIPPED ************************ " + append ret_string "\n" + append ret_string "\n" + append ret_string "************************ ITEMS NOT FLIPPED ************************\n" if {$no_flip_count} { - puts $fd $no_flip_string + append ret_string "$no_flip_string\n" } else { - puts $fd "None" + append ret_string "None\n" } - puts $fd "" - puts $fd "" - puts $fd "************************ ITEMS FLIPPED ************************ " + append ret_string "\n" + append ret_string "\n" + append ret_string "************************ ITEMS FLIPPED ************************\n" if {$flip_count} { - puts $fd $flip_string + append ret_string "$flip_string\n" } else { - puts $fd "None" + append ret_string "None" } - puts $fd "" - puts $fd "" - puts $fd "" - puts $fd "************************ SUMMARY ************************ " - putString "************************ SUMMARY ************************ " + append ret_string "\n" + append ret_string "\n" + append ret_string "\n" + append ret_string "************************ SUMMARY ************************\n" if {$skip_count == 1} { - puts $fd "$skip_count item skipped" - putString "$skip_count item skipped" + append ret_string "$skip_count item skipped\n" } else { - puts $fd "$skip_count items skipped" - putString "$skip_count items skipped" + append ret_string "$skip_count items skipped\n" } if {$miss_count == 1} { - puts $fd "$miss_count item missed" - putString "$miss_count item missed" + append ret_string "$miss_count item missed\n" } else { - puts $fd "$miss_count items missed" - putString "$miss_count items missed" + append ret_string "$miss_count items missed\n" } if {$no_flip_count == 1} { - puts $fd "$no_flip_count item NOT flipped" - putString "$no_flip_count item NOT flipped" + append ret_string "$no_flip_count item NOT flipped\n" } else { - puts $fd "$no_flip_count items NOT flipped" - putString "$no_flip_count items NOT flipped" + append ret_string "$no_flip_count items NOT flipped\n" } if {$flip_count == 1} { - puts $fd "$flip_count item flipped" - putString "$flip_count item flipped" + append ret_string "$flip_count item flipped\n" } else { - puts $fd "$flip_count items flipped" - putString "$flip_count items flipped" + append ret_string "$flip_count items flipped\n" } - close $fd SetNormalCursor $this pluginUpdateProgressBar 0 @@ -1243,16 +1247,101 @@ setSave } - return + return $ret_string } -::itcl::body Archer::bot_flip_check_all {_logfile} { +::itcl::body Archer::bot_flip_check_all {} { set blist [split [search . -type bot] "\n "] - eval bot_flip_check $_logfile $blist + eval bot_flip_check $blist } +::itcl::body Archer::bot_split_all {} { + SetWaitCursor $this + + set ret_string "The following bots have been split:\n" + set blist [split [search . -type bot] "\n "] + set nitems [llength $blist] + set icount 0 + set last_percent 0 + set split_count 0 + set split_bots {} + + putString "Splitting bots ..." + + foreach bot $blist { + incr icount + + if {$bot == ""} { + continue + } + + if {![catch {bot_split2 $bot} bnames] && $bnames != ""} { + incr split_count + append ret_string "[lindex $bnames 0] " + lappend split_bots [lindex $bnames 1] + } + + set percent [format "%.2f" [expr {$icount / double($nitems)}]] + if {$percent > $last_percent} { + set last_percent $percent + pluginUpdateProgressBar $percent + } + } + + pluginUpdateProgressBar 0 + SetNormalCursor $this + + if {$split_count} { + gedCmd make_name -s 0 + set gname [gedCmd make_name bot_split_backup] + eval gedCmd g $gname $split_bots + + syncTree + setSave + } + + return $ret_string +} + + +::itcl::body Archer::bot_sync_all {} { + SetWaitCursor $this + + set blist [split [search . -type bot] "\n "] + set nitems [llength $blist] + set icount 0 + set last_percent 0 + + putString "Syncing bots ..." + set ret_string "The following bots have been synced:\n" + + foreach bot $blist { + incr icount + + if {$bot == ""} { + continue + } + append ret_string "$bot " + catch {gedCmd bot_sync $bot} + + set percent [format "%.2f" [expr {$icount / double($nitems)}]] + if {$percent > $last_percent} { + set last_percent $percent + pluginUpdateProgressBar $percent + } + } + + pluginUpdateProgressBar 0 + SetNormalCursor $this + + setSave + + return $ret_string +} + + ::itcl::body Archer::cmd {args} { set mCoreCmdLevel 1 set ret [eval ArcherCore::cmd $args] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-10-05 13:52:09
|
Revision: 47095 http://brlcad.svn.sourceforge.net/brlcad/?rev=47095&view=rev Author: bob1961 Date: 2011-10-05 13:52:02 +0000 (Wed, 05 Oct 2011) Log Message: ----------- Added a tool panel to the attributes view panel and initially populated it with a set of component pick mode radiobuttons and a few bot related buttons for splitting, syncing and/or flipping bots. Added a radiobutton to the attribute view's toolbar and updated the images associated with the buttons. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-05 13:46:47 UTC (rev 47094) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-05 13:52:02 UTC (rev 47095) @@ -159,10 +159,14 @@ # General method askToRevert {} method bot_fix_all {} + method bot_fix_all_wrapper {} method bot_flip_check {args} method bot_flip_check_all {} + method bot_flip_check_all_wrapper {} method bot_split_all {} + method bot_split_all_wrapper {} method bot_sync_all {} + method bot_sync_all_wrapper {} method fbclear {} method raytracePlus {} @@ -192,6 +196,7 @@ variable mArcherVersion "0.9.2" variable mActiveEditDialogs {} variable wizardXmlCallbacks "" + variable mBotFixAllFlag 0 # plugin list variable mWizardClass "" @@ -297,6 +302,7 @@ method buildHypEditView {} method buildObjAttrView {} method buildObjEditView {} + method buildObjToolView {} method buildObjViewToolbar {} method buildPartEditView {} method buildPipeEditView {} @@ -328,6 +334,7 @@ method initNoWizard {_parent _msg} method initObjAttrView {} method initObjEditView {} + method initObjToolView {} method initObjWizard {_obj _wizardLoaded} method initPartEditView {_odata} method initPipeEditView {_odata} @@ -442,6 +449,7 @@ buildObjViewToolbar buildObjAttrView buildObjEditView + buildObjToolView # set initial toggle variables set mVPaneToggle3 $mVPaneFraction3 @@ -945,13 +953,24 @@ ::itcl::body Archer::bot_fix_all {} { + set mBotFixAllFlag 1 + set ret_string "" append ret_string "[bot_split_all]\n\n" append ret_string "[bot_sync_all]\n\n" append ret_string "[bot_flip_check_all]" + + set mBotFixAllFlag 0 + redrawWho + + return $ret_string } +::itcl::body Archer::bot_fix_all_wrapper {} { + putString [bot_fix_all] +} + ::itcl::body Archer::bot_flip_check {args} { SetWaitCursor $this @@ -1178,10 +1197,21 @@ ::itcl::body Archer::bot_flip_check_all {} { set blist [split [search . -type bot] "\n "] - eval bot_flip_check $blist + set ret [eval bot_flip_check $blist] + + if {!$mBotFixAllFlag} { + redrawWho + } + + return $ret } +::itcl::body Archer::bot_flip_check_all_wrapper {} { + putString [bot_flip_check_all] +} + + ::itcl::body Archer::bot_split_all {} { SetWaitCursor $this @@ -1227,10 +1257,19 @@ setSave } + if {!$mBotFixAllFlag} { + redrawWho + } + return $ret_string } +::itcl::body Archer::bot_split_all_wrapper {} { + putString [bot_split_all] +} + + ::itcl::body Archer::bot_sync_all {} { SetWaitCursor $this @@ -1262,11 +1301,20 @@ SetNormalCursor $this setSave + if {!$mBotFixAllFlag} { + redrawWho + } + return $ret_string } +::itcl::body Archer::bot_sync_all_wrapper {} { + putString [bot_sync_all] +} + + ::itcl::body Archer::cmd {args} { set mCoreCmdLevel 1 set ret [eval ArcherCore::cmd $args] @@ -1654,7 +1702,10 @@ -file [file join $mImgDir option_text.png]] $itk_component(objViewToolbar) itemconfigure objEditView \ -image [image create photo \ - -file [file join $mImgDir option_tree.png]] + -file [file join $mImgDir option_edit.png]] + $itk_component(objViewToolbar) itemconfigure objToolView \ + -image [image create photo \ + -file [file join $mImgDir tools.png]] } initFbImages @@ -3830,22 +3881,22 @@ set mStatusStr "Toggle lighting on/off " } "Tree Select" { - set mStatusStr "Select the picked component in the hierarchy tree." + set mStatusStr "Select the picked object in the hierarchy tree." } - "Get Name" { - set mStatusStr "Get the name of the picked component." + "Get Object Name" { + set mStatusStr "Get the name of the picked object." } - "Erase" { - set mStatusStr "Erase the picked component." + "Erase Object" { + set mStatusStr "Erase the picked object." } "Bot Flip" { - set mStatusStr "Flip the picked component if it's a bot." + set mStatusStr "Flip the picked object if it's a bot." } "Bot Split" { - set mStatusStr "Split the picked component if it's a bot." + set mStatusStr "Split the picked object if it's a bot." } "Bot Sync" { - set mStatusStr "Sync the picked component if it's a bot." + set mStatusStr "Sync the picked object if it's a bot." } default { set mStatusStr "" @@ -4707,17 +4758,17 @@ } cascade comppick -label "Comp Pick Mode" -menu { radiobutton tselect -label "Tree Select" \ - -helpstr "Select the picked component in the hierarchy tree." - radiobutton gname -label "Get Name" \ - -helpstr "Get the name of the picked component." - radiobutton cerase -label "Erase" \ - -helpstr "Erase the picked component." - radiobutton bflip -label "Bot Flip" \ - -helpstr "Flip the picked component if it's a bot." + -helpstr "Select the picked object in the hierarchy tree." + radiobutton gname -label "Get Object Name" \ + -helpstr "Get the name of the picked object." + radiobutton cerase -label "Erase Object" \ + -helpstr "Erase the picked object." radiobutton bsplit -label "Bot Split" \ - -helpstr "Split the picked component if it's a bot." + -helpstr "Split the picked object if it's a bot." radiobutton bsync -label "Bot Sync" \ - -helpstr "Sync the picked component if it's a bot." + -helpstr "Sync the picked object if it's a bot." + radiobutton bflip -label "Bot Flip" \ + -helpstr "Flip the picked object if it's a bot." } checkbutton quad -label "Quad View" \ -helpstr "Toggle between single and quad display." @@ -4767,23 +4818,29 @@ -command [::itcl::code $this setActivePane lr] $itk_component(menubar) menuconfigure .modes.comppick.tselect \ + -command [::itcl::code $this initCompPick] \ -value $COMP_PICK_TREE_SELECT_MODE \ -variable [::itcl::scope mCompPickMode] $itk_component(menubar) menuconfigure .modes.comppick.gname \ - -value $COMP_PICK_TREE_SELECT_MODE \ + -command [::itcl::code $this initCompPick] \ + -value $COMP_PICK_NAME_MODE \ -variable [::itcl::scope mCompPickMode] $itk_component(menubar) menuconfigure .modes.comppick.cerase \ + -command [::itcl::code $this initCompPick] \ -value $COMP_PICK_ERASE_MODE \ -variable [::itcl::scope mCompPickMode] - $itk_component(menubar) menuconfigure .modes.comppick.bflip \ - -value $COMP_PICK_BOT_FLIP_MODE \ - -variable [::itcl::scope mCompPickMode] $itk_component(menubar) menuconfigure .modes.comppick.bsplit \ + -command [::itcl::code $this initCompPick] \ -value $COMP_PICK_BOT_SPLIT_MODE \ -variable [::itcl::scope mCompPickMode] $itk_component(menubar) menuconfigure .modes.comppick.bsync \ + -command [::itcl::code $this initCompPick] \ -value $COMP_PICK_BOT_SYNC_MODE \ -variable [::itcl::scope mCompPickMode] + $itk_component(menubar) menuconfigure .modes.comppick.bflip \ + -command [::itcl::code $this initCompPick] \ + -value $COMP_PICK_BOT_FLIP_MODE \ + -variable [::itcl::scope mCompPickMode] $itk_component(menubar) menuconfigure .modes.quad \ -command [::itcl::code $this doMultiPane] \ @@ -4975,29 +5032,35 @@ } $itk_component(${_prefix}comppickmenu) add radiobutton \ + -command [::itcl::code $this initCompPick] \ -label "Tree Select" \ -value $COMP_PICK_TREE_SELECT_MODE \ -variable [::itcl::scope mCompPickMode] $itk_component(${_prefix}comppickmenu) add radiobutton \ - -label "Get Name" \ + -command [::itcl::code $this initCompPick] \ + -label "Get Object Name" \ -value $COMP_PICK_NAME_MODE \ -variable [::itcl::scope mCompPickMode] $itk_component(${_prefix}comppickmenu) add radiobutton \ - -label "Delete" \ + -command [::itcl::code $this initCompPick] \ + -label "Erase Object" \ -value $COMP_PICK_ERASE_MODE \ -variable [::itcl::scope mCompPickMode] $itk_component(${_prefix}comppickmenu) add radiobutton \ - -label "Bot Flip" \ - -value $COMP_PICK_BOT_FLIP_MODE \ - -variable [::itcl::scope mCompPickMode] - $itk_component(${_prefix}comppickmenu) add radiobutton \ + -command [::itcl::code $this initCompPick] \ -label "Bot Split" \ -value $COMP_PICK_BOT_SPLIT_MODE \ -variable [::itcl::scope mCompPickMode] $itk_component(${_prefix}comppickmenu) add radiobutton \ + -command [::itcl::code $this initCompPick] \ -label "Bot Sync" \ -value $COMP_PICK_BOT_SYNC_MODE \ -variable [::itcl::scope mCompPickMode] + $itk_component(${_prefix}comppickmenu) add radiobutton \ + -command [::itcl::code $this initCompPick] \ + -label "Bot Flip" \ + -value $COMP_PICK_BOT_FLIP_MODE \ + -variable [::itcl::scope mCompPickMode] $itk_component(${_prefix}modesmenu) add cascade \ -label "Active Pane" \ @@ -5823,6 +5886,127 @@ } +::itcl::body Archer::buildObjToolView {} { + set parent [$itk_component(vpane) childsite attrView] + itk_component add objToolView { + ::ttk::frame $parent.objtoolview \ + -borderwidth 1 \ + -relief sunken + } {} + + set parent $itk_component(objToolView) + itk_component add compPickF { + ::ttk::labelframe $parent.compPickF \ + -text "Comp Pick Modes" \ + -labelanchor n + } {} + + set parent $itk_component(compPickF) + itk_component add compPickTreeSelectRB { + ::ttk::radiobutton $parent.compPickTreeSelectRB \ + -command [::itcl::code $this initCompPick] \ + -text "Tree Select" \ + -value $COMP_PICK_TREE_SELECT_MODE \ + -variable [::itcl::scope mCompPickMode] + } {} + + itk_component add compPickNameRB { + ::ttk::radiobutton $parent.compPickNameRB \ + -command [::itcl::code $this initCompPick] \ + -text "Get Object Name" \ + -value $COMP_PICK_NAME_MODE \ + -variable [::itcl::scope mCompPickMode] + } {} + + itk_component add compPickEraseRB { + ::ttk::radiobutton $parent.compPickEraseRB \ + -command [::itcl::code $this initCompPick] \ + -text "Erase Object" \ + -value $COMP_PICK_ERASE_MODE \ + -variable [::itcl::scope mCompPickMode] + } {} + + itk_component add compPickBotSplitRB { + ::ttk::radiobutton $parent.compPickBotSplitRB \ + -command [::itcl::code $this initCompPick] \ + -text "Bot Split" \ + -value $COMP_PICK_BOT_SPLIT_MODE \ + -variable [::itcl::scope mCompPickMode] + } {} + + itk_component add compPickBotSyncRB { + ::ttk::radiobutton $parent.compPickBotSyncRB \ + -command [::itcl::code $this initCompPick] \ + -text "Bot Sync" \ + -value $COMP_PICK_BOT_SYNC_MODE \ + -variable [::itcl::scope mCompPickMode] + } {} + + itk_component add compPickBotFlipRB { + ::ttk::radiobutton $parent.compPickBotFlipRB \ + -command [::itcl::code $this initCompPick] \ + -text "Bot Flip" \ + -value $COMP_PICK_BOT_FLIP_MODE \ + -variable [::itcl::scope mCompPickMode] + } {} + + grid $itk_component(compPickTreeSelectRB) -sticky w + grid $itk_component(compPickNameRB) -sticky w + grid $itk_component(compPickEraseRB) -sticky w + grid $itk_component(compPickBotSplitRB) -sticky w + grid $itk_component(compPickBotSyncRB) -sticky w + grid $itk_component(compPickBotFlipRB) -sticky w + + + set parent $itk_component(objToolView) + itk_component add botToolsF { + ::ttk::labelframe $parent.botToolsF \ + -text "Bot Tools" \ + -labelanchor n + } {} + + set parent $itk_component(botToolsF) + itk_component add botSplitAllB { + ::ttk::button $parent.botSplitAllB \ + -text "Split All Bots" \ + -command [::itcl::code $this bot_split_all_wrapper] + } {} + + itk_component add botSyncAllB { + ::ttk::button $parent.botSyncAllB \ + -text "Sync All Bots" \ + -command [::itcl::code $this bot_sync_all_wrapper] + } {} + + itk_component add botFlipCheckAllB { + ::ttk::button $parent.botFlipCheckAllB \ + -text "Flip Check All Bots" \ + -command [::itcl::code $this bot_flip_check_all_wrapper] + } {} + + itk_component add botFixAllB { + ::ttk::button $parent.botFixAllB \ + -text "Fix All Bots" \ + -command [::itcl::code $this bot_fix_all_wrapper] + } {} + + grid $itk_component(botSplitAllB) -sticky ew + grid $itk_component(botSyncAllB) -sticky ew + grid $itk_component(botFlipCheckAllB) -sticky ew + grid $itk_component(botFixAllB) -sticky ew + grid columnconfigure $itk_component(botToolsF) 0 -weight 1 + + + set i 0 + grid $itk_component(compPickF) -row $i -pady 4 -sticky ew + incr i + grid $itk_component(botToolsF) -row $i -pady 4 -sticky ew + incr i + grid rowconfigure $itk_component(objToolView) $i -weight 1 + grid columnconfigure $itk_component(objToolView) 0 -weight 1 +} + + ::itcl::body Archer::buildObjViewToolbar {} { set parent [$itk_component(vpane) childsite attrView] itk_component add objViewToolbar { @@ -5851,6 +6035,13 @@ -variable [::itcl::scope mObjViewMode] \ -value $OBJ_ATTR_VIEW_MODE \ -command [::itcl::code $this initObjAttrView] + + $itk_component(objViewToolbar) add radiobutton objToolView \ + -helpstr "Tool view mode" \ + -balloonstr "Tool view mode" \ + -variable [::itcl::scope mObjViewMode] \ + -value $OBJ_TOOL_VIEW_MODE \ + -command [::itcl::code $this initObjToolView] } @@ -6272,6 +6463,7 @@ catch {pack forget $itk_component(objViewToolbar)} catch {pack forget $itk_component(objAttrView)} catch {pack forget $itk_component(objEditView)} + catch {pack forget $itk_component(objToolView)} catch {pack forget $itk_component(noWizard)} set mNoWizardActive 0 @@ -6322,6 +6514,7 @@ catch {pack forget $itk_component(objViewToolbar)} catch {pack forget $itk_component(objAttrView)} catch {pack forget $itk_component(objEditView)} + catch {pack forget $itk_component(objToolView)} catch {pack forget $itk_component(noWizard)} set mNoWizardActive 0 @@ -6363,6 +6556,35 @@ } +::itcl::body Archer::initObjToolView {} { + if {$mSelectedObj == ""} { + return + } + + set mPrevObjViewMode $mObjViewMode + + catch {pack forget $itk_component(dbAttrView)} + catch {pack forget $itk_component(objViewToolbar)} + catch {pack forget $itk_component(objAttrView)} + catch {pack forget $itk_component(objEditView)} + catch {pack forget $itk_component(objToolView)} + catch {pack forget $itk_component(noWizard)} + set mNoWizardActive 0 + + # delete the previous wizard instance + if {$mWizardClass != ""} { + ::destroy $itk_component($mWizardClass) + ::destroy $itk_component(wizardUpdate) + set mWizardClass "" + set mWizardTop "" + set mWizardState "" + } + + pack $itk_component(objViewToolbar) -expand no -fill both -anchor n + pack $itk_component(objToolView) -expand yes -fill both -anchor n +} + + ## - initObjWizard # # Note - Before we get here, any previous wizard instances are destroyed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-10-05 19:30:16
|
Revision: 47114 http://brlcad.svn.sourceforge.net/brlcad/?rev=47114&view=rev Author: bob1961 Date: 2011-10-05 19:30:08 +0000 (Wed, 05 Oct 2011) Log Message: ----------- Minor tweak to Archer::handleTreeSelect. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-05 18:09:30 UTC (rev 47113) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-05 19:30:08 UTC (rev 47114) @@ -1857,7 +1857,7 @@ if {!$mViewOnly} { if {$mObjViewMode == $OBJ_ATTR_VIEW_MODE} { initObjAttrView - } else { + } elseif {$mObjViewMode == $OBJ_EDIT_VIEW_MODE} { if {!$mRestoringTree} { initObjEditView switch -- $mDefaultBindingMode \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-10-05 20:04:39
|
Revision: 47115 http://brlcad.svn.sourceforge.net/brlcad/?rev=47115&view=rev Author: bob1961 Date: 2011-10-05 20:04:32 +0000 (Wed, 05 Oct 2011) Log Message: ----------- Tweaked Archer::pluginLoader to accomodate spaces in a filename. Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-05 19:30:08 UTC (rev 47114) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-05 20:04:32 UTC (rev 47115) @@ -667,7 +667,7 @@ ".tcl" - ".itk" - ".itcl" { - uplevel \#0 source $filename + uplevel \#0 source \"$filename\" } default { # silently ignore This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2011-10-12 19:53:01
|
Revision: 47202 http://brlcad.svn.sourceforge.net/brlcad/?rev=47202&view=rev Author: bob1961 Date: 2011-10-12 19:52:55 +0000 (Wed, 12 Oct 2011) Log Message: ----------- update bot_flip_check to set the flipped bot's orientation to rh if previously oriented Modified Paths: -------------- brlcad/trunk/src/tclscripts/archer/Archer.tcl Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl =================================================================== --- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-12 19:50:33 UTC (rev 47201) +++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2011-10-12 19:52:55 UTC (rev 47202) @@ -1101,16 +1101,21 @@ } } - # Set orientation back to original setting - if {$save_orient != "no"} { - $itk_component(ged) adjust $item orient $save_orient - } + if {$cosa > 0} { + # Set orientation to rh + if {$save_orient != "no"} { + $itk_component(ged) adjust $item orient rh + } - if {$cosa > 0} { incr flip_count append flip_string "$item " $itk_component(ged) bot_flip $item } else { + # Set orientation back to original setting + if {$save_orient != "no"} { + $itk_component(ged) adjust $item orient $save_orient + } + incr no_flip_count append no_flip_string "$item " } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |