you have to use COORDINATES = X Y Z 0 0 0 0 0 W in the ini file.
and it will make tkemc.tcl display only the axis you want I also made it so it
will use the ini to display the MACHINE = yours
diff --git a/tkemc.tcl b/tkemc1.tcl
old mode 100755
new mode 100644
index 2e35a9c..e398bdc
--- a/tkemc.tcl
+++ b/tkemc.tcl
@@ -81,59 +81,57 @@ set worldlabellist ""
set axiscoordmap ""
set numaxes [emc_ini "AXES" "TRAJ"]
set coordnames [ emc_ini "COORDINATES" "TRAJ"]
-
set numcoords 0
-if { [ string first "X" $coordnames ] >= 0 } {
+if { [ string first "X" $coordnames ] >= 0 | [ string first "0" $coordnames ] >= 0 } {
set numcoords $numcoords+1
set worldlabellist [ concat $worldlabellist X]
set axiscoordmap [ concat $axiscoordmap 0 ]
}
-if { [ string first "Y" $coordnames ] >= 0 } {
+if { [ string first "Y" $coordnames ] >= 0 | [ string first "0" $coordnames ] >= 0 } {
set numcoords $numcoords+1
set worldlabellist [ concat $worldlabellist Y]
set axiscoordmap [ concat $axiscoordmap 1 ]
}
-if { [ string first "Z" $coordnames ] >= 0 } {
+if { [ string first "Z" $coordnames ] >= 0 | [ string first "0" $coordnames ] >= 0 } {
set numcoords $numcoords+1
set worldlabellist [ concat $worldlabellist Z]
set axiscoordmap [ concat $axiscoordmap 2 ]
}
-
-if { [ string first "A" $coordnames ] >= 0 } {
+if { [ string first "A" $coordnames ] >= 0 | [ string first "0" $coordnames ] >= 0 } {
set numcoords $numcoords+1
set worldlabellist [ concat $worldlabellist A]
set axiscoordmap [ concat $axiscoordmap 3 ]
}
-if { [ string first "B" $coordnames ] >= 0 } {
+if { [ string first "B" $coordnames ] >= 0 | [ string first "0" $coordnames ] >= 0 } {
set numcoords $numcoords+1
set worldlabellist [ concat $worldlabellist B]
set axiscoordmap [ concat $axiscoordmap 4 ]
}
-if { [ string first "C" $coordnames ] >= 0 } {
+if { [ string first "C" $coordnames ] >= 0 | [ string first "0" $coordnames ] >= 0 } {
set numcoords $numcoords+1
set worldlabellist [ concat $worldlabellist C]
set axiscoordmap [ concat $axiscoordmap 5 ]
}
-if { [ string first "U" $coordnames ] >= 0 } {
+if { [ string first "U" $coordnames ] >= 0 | [ string first "0" $coordnames ] >= 0 } {
set numcoords $numcoords+1
set worldlabellist [ concat $worldlabellist U]
set axiscoordmap [ concat $axiscoordmap 6 ]
}
-if { [ string first "V" $coordnames ] >= 0 } {
+if { [ string first "V" $coordnames ] >= 0 | [ string first "0" $coordnames ] >= 0 } {
set numcoords $numcoords+1
set worldlabellist [ concat $worldlabellist V]
set axiscoordmap [ concat $axiscoordmap 7 ]
}
-if { [ string first "W" $coordnames ] >= 0 } {
+if { [ string first "W" $coordnames ] >= 0 | [ string first "0" $coordnames ] >= 0 } {
set numcoords $numcoords+1
set worldlabellist [ concat $worldlabellist W]
set axiscoordmap [ concat $axiscoordmap 8 ]
@@ -243,23 +241,6 @@ if {[string length $toolfilename] == 0} {
set toolfilename "emc.tbl"
}
-# pop up the tool table editor
-proc popupToolEditor {} {
- global toolfilename
-
- # create an editor as top-level ".toolEditor"
- if {[file isfile $toolfilename]} {
- geneditStart toolEditor $toolfilename
- } else {
- geneditStart toolEditor [msgcat::mc "untitled"].tbl
- }
-
- frame .toolEditor.buttons
- pack .toolEditor.buttons -side bottom -fill x -pady 2m
- button .toolEditor.buttons.load -text [msgcat::mc "Load Tool Table"] -command {geneditSaveFile toolEditor; emc_load_tool
- button .toolEditor.buttons.cancel -text [msgcat::mc "Cancel"] -default active -command {destroy .toolEditor}
- pack .toolEditor.buttons.load .toolEditor.buttons.cancel -side left -expand 1
-}
set paramfilename [emc_ini "PARAMETER_FILE" "RS274NGC"]
if {[string length $paramfilename] == 0} {
@@ -758,7 +739,8 @@ proc toggleOptionalStop {} {
# use the top-level window as our top-level window, and name it
-wm title . "TkEMC"
+set title [emc_ini "MACHINE" "EMC"]
+ wm title . $title
# create the main window top frame
set top [frame .top]
@@ -788,7 +770,6 @@ bind . <$modifier-x> {after cancel updateStatus ; destroy . ; exit}
# add the View menu
set viewmenu [menu $menubar.view -tearoff 0]
$menubar add cascade -label [msgcat::mc "View"] -menu $viewmenu -underline 0
-$viewmenu add command -label [msgcat::mc "Tools..."] -command {popupToolEditor} -underline 0
$viewmenu add command -label [msgcat::mc "Offsets and Variables..."] -command {popupParamEditor} -underline 0
$viewmenu add command -label [msgcat::mc "Diagnostics..."] -command {popupDiagnostics} -underline 0
$viewmenu add command -label [msgcat::mc "Backplot..."] -command {popupPlot} -underline 0
@@ -1081,33 +1062,41 @@ set relabssel [frame $coordsel.relabssel]
set actcmdsel [frame $coordsel.actcmdsel]
set jog [frame $bun.jog]
set dojog [frame $jog.dojog]
-
+set axiscount 1
pack $move -side top -fill both -expand true
pack $position -side left
pack $pos0 -side top
-if { $numaxes > 1 } {
+if { $numaxes > 1 && [ string first "Y" $coordnames ] >= 0 } {
pack $pos1 -side top
+set axisnum $axiscount+1
}
-if { $numaxes > 2 } {
+if { $numaxes > 2 && [ string first "Z" $coordnames ] >= 0 } {
pack $pos2 -side top
+set axisnum $axiscount+1
}
-if { $numaxes > 3 } {
+if { $numaxes > 3 && [ string first "A" $coordnames ] >= 0 } {
pack $pos3 -side top
+set axisnum $axiscount+1
}
-if { $numaxes > 4 } {
+if { $numaxes > 4 && [ string first "B" $coordnames ] >= 0 } {
pack $pos4 -side top
+set axisnum $axiscount+1
}
-if { $numaxes > 5 } {
+if { $numaxes > 5 && [ string first "C" $coordnames ] >= 0 } {
pack $pos5 -side top
+set axisnum $axiscount+1
}
-if { $numaxes > 6 } {
+if { $numaxes > 6 && [ string first "U" $coordnames ] >= 0 } {
pack $pos6 -side top
+set axisnum $axiscount+1
}
-if { $numaxes > 7 } {
+if { $numaxes > 7 && [ string first "V" $coordnames ] >= 0 } {
pack $pos7 -side top
+set axisnum $axiscount+1
}
-if { $numaxes > 8 } {
+if { $numaxes > 8 && [ string first "W" $coordnames ] >= 0 } {
pack $pos8 -side top
+set axisnum $axiscount+1
}
pack $bun -side right -anchor n ; # don't fill or expand these-- looks funny
pack $limoride -side top -pady 2m
@@ -1248,7 +1237,7 @@ if {$userfont != ""} {
set fontstyle [font actual $userfont -weight]
} elseif {[lsearch [font families] {courier 10 pitch}] != -1} {
set fontfamily {courier 10 pitch}
- if {$numaxes > 6} {
+ if {$axiscount <= 3} {
set fontsize 24
} else {
set fontsize 48
@@ -1256,7 +1245,7 @@ if {$userfont != ""} {
set fontstyle bold
} else {
set fontfamily courier
- if {$numaxes > 6} {
+ if {$axiscount <= 3} {
set fontsize 24
} else {
set fontsize 48
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers