Revision: 53358
http://brlcad.svn.sourceforge.net/brlcad/?rev=53358&view=rev
Author: bob1961
Date: 2012-10-25 17:56:12 +0000 (Thu, 25 Oct 2012)
Log Message:
-----------
Added the flexibility to pick BOT points and edges along the full depth of the
BOT or only from the front of the BOT.
Modified Paths:
--------------
brlcad/trunk/src/tclscripts/archer/Archer.tcl
brlcad/trunk/src/tclscripts/archer/BotEditFrame.tcl
brlcad/trunk/src/tclscripts/archer/GeometryEditFrame.tcl
Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/Archer.tcl 2012-10-25 17:25:13 UTC
(rev 53357)
+++ brlcad/trunk/src/tclscripts/archer/Archer.tcl 2012-10-25 17:56:12 UTC
(rev 53358)
@@ -153,9 +153,9 @@
method importFg4Sections {_slist _wlist _delta}
method initAppendPipePoint {_obj _button _callback}
- method initFindBotEdge {_obj _button _callback}
+ method initFindBotEdge {_obj _button _viewz _callback}
method initFindBotFace {_obj _button _callback}
- method initFindBotPoint {_obj _button _callback}
+ method initFindBotPoint {_obj _button _viewz _callback}
method initFindPipePoint {_obj _button _callback}
method initPrependPipePoint {_obj _button _callback}
@@ -752,7 +752,7 @@
}
-::itcl::body Archer::initFindBotEdge {_obj _button _callback} {
+::itcl::body Archer::initFindBotEdge {_obj _button _viewz _callback} {
if {![info exists itk_component(ged)]} {
return
}
@@ -760,7 +760,7 @@
# This deselects the selected mouse mode in the primary toolbar
set mDefaultBindingMode FIRST_FREE_BINDING_MODE
- $itk_component(ged) init_find_bot_edge $_obj $_button $_callback
+ $itk_component(ged) init_find_bot_edge $_obj $_button $_viewz $_callback
}
@@ -776,7 +776,7 @@
}
-::itcl::body Archer::initFindBotPoint {_obj _button _callback} {
+::itcl::body Archer::initFindBotPoint {_obj _button _viewz _callback} {
if {![info exists itk_component(ged)]} {
return
}
@@ -784,7 +784,7 @@
# This deselects the selected mouse mode in the primary toolbar
set mDefaultBindingMode FIRST_FREE_BINDING_MODE
- $itk_component(ged) init_find_botpt $_obj $_button $_callback
+ $itk_component(ged) init_find_botpt $_obj $_button $_viewz $_callback
}
Modified: brlcad/trunk/src/tclscripts/archer/BotEditFrame.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/BotEditFrame.tcl 2012-10-25 17:25:13 UTC
(rev 53357)
+++ brlcad/trunk/src/tclscripts/archer/BotEditFrame.tcl 2012-10-25 17:56:12 UTC
(rev 53358)
@@ -86,7 +86,7 @@
method moveBotElement {_dname _obj _x _y}
method moveBotFaceMode {_dname _obj _x _y}
method moveBotPt {_dname _obj _x _y}
- method moveBotPtMode {_dname _obj _x _y}
+ method moveBotPtMode {_dname _obj _viewz _x _y}
method moveBotPts {_dname _obj _x _y _plist}
method moveBotPtsMode {_dname _obj _x _y}
}
@@ -101,6 +101,7 @@
variable mCurrentBotPoints ""
variable mCurrentBotEdges ""
variable mCurrentBotFaces ""
+ variable mFrontPointsOnly 1
# Methods used by the constructor
# override methods in GeometryEditFrame
@@ -292,10 +293,20 @@
::itcl::body BotEditFrame::moveBotEdgeMode {_dname _obj _x _y} {
$itk_option(-mged) clear_bot_callbacks
- set edge [$itk_option(-mged) pane_mouse_find_bot_edge $_dname $_obj $_x
$_y]
+ if {$mFrontPointsOnly} {
+ set zlist [ $::ArcherCore::application getZClipState]
+ set viewz [lindex $zlist 0]
+ } else {
+ set viewz -1.0
+ }
+
+ set edge [$itk_option(-mged) pane_mouse_find_bot_edge $_dname $_obj $viewz
$_x $_y]
+
set mCurrentBotPoints {}
+ set mCurrentBotEdges {}
$itk_component(vertTab) unselectAllRows
+ $itk_component(edgeTab) unselectAllRows
botEdgesSelectCallback $edge
set plist [$itk_component(vertTab) getSelectedRows]
@@ -352,9 +363,10 @@
}
-::itcl::body BotEditFrame::moveBotPtMode {_dname _obj _x _y} {
+::itcl::body BotEditFrame::moveBotPtMode {_dname _obj _viewz _x _y} {
$itk_option(-mged) clear_bot_callbacks
- set pindex [$itk_option(-mged) pane_mouse_find_botpt $_dname $_obj $_x $_y]
+
+ set pindex [$itk_option(-mged) pane_mouse_find_botpt $_dname $_obj $_viewz
$_x $_y]
$itk_option(-mged) pane_move_botpt_mode $_dname $_obj $pindex $_x $_y
botPointSelectCallback $pindex
@@ -376,7 +388,14 @@
set plist [$itk_component(vertTab) getSelectedRows]
if {[llength $plist] < 2} {
- moveBotPtMode $_dname $_obj $_x $_y
+ if {$mFrontPointsOnly} {
+ set zlist [ $::ArcherCore::application getZClipState]
+ set viewz [lindex $zlist 0]
+ } else {
+ set viewz -1.0
+ }
+
+ moveBotPtMode $_dname $_obj $viewz $_x $_y
} else {
moveBotPts $_dname $_obj $_x $_y $plist
}
@@ -483,6 +502,7 @@
::itcl::body BotEditFrame::buildLowerPanel {} {
set parent [$this childsite lower]
set i 1
+ set row -1
foreach label $mEditLabels {
itk_component add editRB$i {
::ttk::radiobutton $parent.editRB$i \
@@ -492,12 +512,23 @@
-command [::itcl::code $this initEditState]
} {}
- pack $itk_component(editRB$i) \
- -anchor w \
- -expand yes
+ incr row
+ grid $itk_component(editRB$i) -row $row -column 0 -sticky w
incr i
}
+
+ itk_component add frontPointOnlyCB {
+ ::ttk::checkbutton $parent.dlistModeCB \
+ -text "Front Points Only" \
+ -command [::itcl::code $this initEditState] \
+ -variable [::itcl::scope mFrontPointsOnly]
+ } {}
+ incr row
+ grid rowconfigure $parent $row -weight 1
+ incr row
+ grid $itk_component(frontPointOnlyCB) -row $row -column 0 -sticky w
+ grid columnconfigure $parent 1 -weight 1
}
@@ -583,12 +614,24 @@
$selectPoints {
set mEditCommand ""
set mEditClass ""
- $::ArcherCore::application initFindBotPoint
$itk_option(-geometryObjectPath) 1 [::itcl::code $this botPointsSelectCallback]
+ if {$mFrontPointsOnly} {
+ set zlist [ $::ArcherCore::application getZClipState]
+ set viewz [lindex $zlist 0]
+ } else {
+ set viewz -1.0
+ }
+ $::ArcherCore::application initFindBotPoint
$itk_option(-geometryObjectPath) 1 $viewz [::itcl::code $this
botPointsSelectCallback]
} \
$selectEdges {
set mEditCommand ""
set mEditClass ""
- $::ArcherCore::application initFindBotEdge
$itk_option(-geometryObjectPath) 1 [::itcl::code $this botEdgesSelectCallback]
+ if {$mFrontPointsOnly} {
+ set zlist [ $::ArcherCore::application getZClipState]
+ set viewz [lindex $zlist 0]
+ } else {
+ set viewz -1.0
+ }
+ $::ArcherCore::application initFindBotEdge
$itk_option(-geometryObjectPath) 1 $viewz [::itcl::code $this
botEdgesSelectCallback]
} \
$selectFaces {
set mEditCommand ""
Modified: brlcad/trunk/src/tclscripts/archer/GeometryEditFrame.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/GeometryEditFrame.tcl 2012-10-25
17:25:13 UTC (rev 53357)
+++ brlcad/trunk/src/tclscripts/archer/GeometryEditFrame.tcl 2012-10-25
17:56:12 UTC (rev 53358)
@@ -130,7 +130,7 @@
# Repack parent so it's anchor to the north
pack $parent \
-expand yes \
- -fill x \
+ -fill both \
-anchor n
set parent [$itk_component(pane) childsite lower]
@@ -141,7 +141,7 @@
# Repack parent so it's anchor to the north
pack $parent \
-expand yes \
- -fill x \
+ -fill both \
-anchor n
# These are no-ops unless overridden in a subclass
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits