From: Al S. <gi...@gi...> - 2010-08-31 15:04:40
|
tkemc: show work offsets for all axes http://git.linuxcnc.org/?p=emc2.git;a=commitdiff;h=ff39c66 --- tcl/tkemc.tcl | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/tcl/tkemc.tcl b/tcl/tkemc.tcl index b9005cd..039ca69 100755 --- a/tcl/tkemc.tcl +++ b/tcl/tkemc.tcl @@ -901,15 +901,18 @@ set unitsetting "custom" set oldunitsetting $unitsetting set settings [frame $top.settings] -pack $settings -side top -anchor w -pady 2m +pack $settings -side top -anchor w set toollabel [label $settings.toollabel -text [msgcat::mc "Tool:"] -anchor w] set toolsetting [label $settings.toolsetting -textvariable ::tentry(toolno) -width 4 -anchor w] set tooloffsetlabel [label $settings.tooloffsetlabel -text [msgcat::mc "Offset:"] -anchor w] set tooloffsetsetting [label $settings.tooloffsetsetting -textvariable tooloffsetsetting -width 30 -anchor w] -set offsetlabel [label $settings.offsetlabel -text [msgcat::mc "Work Offsets:"] -anchor w] -set offsetsetting [label $settings.offsetsetting -textvariable offsetsetting -width 30 -anchor w] set unitlabel [label $settings.unitlabel -textvariable unitsetting -width 6 -anchor e] +set settings1 [frame $top.settings1] +pack $settings1 -side top -anchor w +set offsetlabel [label $settings1.offsetlabel -text [msgcat::mc "Work Offsets:"] -anchor w] +set offsetsetting [label $settings1.offsetsetting -textvariable offsetsetting -width 80 -anchor w] + pack $toollabel -side left -padx 1m pack $toolsetting -side left -padx 1m pack $tooloffsetlabel -side left -padx 1m @@ -2322,8 +2325,20 @@ proc updateStatus {} { set ::tentry($item) [format %.4f [emc_tool_offset [lsearch [string toupper $::worldlabellist] $item]]] } } + # set the offset information - set offsetsetting [format "X%.4f Y%.4f Z%.4f" [emc_pos_offset "X"] [emc_pos_offset "Y"] [emc_pos_offset "Z"] ] + upvar #0 numaxes numaxes2 + upvar #0 coordnames coordnames2 + upvar #0 worldlabellist worldlabellist2 + for {set i 0} {$i < $numaxes2} {incr i} { + if { [lsearch $coordnames2 [lindex $worldlabellist2 $i]] != -1 } { + set fstr [lindex $worldlabellist2 $i] + set spec "$fstr%.4f " + set args [emc_pos_offset $fstr] + append tempstring [format $spec $args] + } + } + set offsetsetting [string trim $tempstring] # set the unit information set unitsetting [emc_display_linear_units] |