Commit graph

31 commits

Author SHA1 Message Date
Dewey Garrett
3b26624ce9 ngcgui-gcmc: examples: option for mm or inch
also:
add cpocket.gcmc
ensure_units: debug prints iff verbose exists
ngcgui.tcl fix max_len_msg
2014-03-08 22:45:29 -07:00
Dewey Garrett
f86290abf6 ngcgui-gcmc: gcmc related bug fixes
limit msg length for popups when errant input to gcmc compiler
typo on strip()
for detecting options comment, split on // not /

minor: ngcgui.txt update
2014-03-04 09:22:09 -07:00
Dewey Garrett
b64d749707 ngcgui-gcmc programmable involute-gear example
new: involute-gear.gcmc adapted for ngcgui from B. Stultien's example
new: ensure_mode.gcmd include file to resolve potential conflict
     with preamble and gcmc code (gcmc wins)

with updates:
1) popup msg error if entry box for gcmc not a number
2) allow comment after tag when tagging a  gcmc option
3) handle gcmc_include_path for new custom tab additions
4) incorporate ensure_mode in .gcmc examples
5) update ngcgui.txt for ensure_mode
2014-03-03 11:18:43 -07:00
Dewey Garrett
1cbe86cf18 ngcgui-gcmc: always pass floating point
avoid subtle problems with gcmc using integers
2014-03-03 11:18:34 -07:00
Dewey Garrett
183efb3e9d ngcgui: support gcmc include path
with:
[DISPLAY]GCMC_INCLUDE_PATH = dir1:dir2:...
2014-02-23 17:40:33 -07:00
Dewey Garrett
9e6628caba ngcgui: workaround reassignment of fd2
Replace puts stderr with stdout to avoid problems when
file descriptor 2 is reassigned by embedding axis app.

Original puts stderr can be restored when the inadvertent
loss of stderr is solved
2014-02-17 17:16:42 -07:00
Dewey Garrett
aa05c938ae ngcgui: support tilde expansion in PROGRAM_PREFIX 2014-02-15 21:43:32 -07:00
Dewey Garrett
56fdc0ee40 ngcgui: normalize filenames for tilde expansion
when using Ctrl-u etc
2014-02-15 09:45:23 -07:00
Dewey Garrett
be56120d44 ngcgui: remove deprecated globals entry boxes
This was never a good idea, was undocumented, and noted as
deprecated in docs/src/gui/ngcgui.txt.

The plentiful availability of global-named-readonly-parameters
in the master branch makes support even more problematic
2014-02-11 20:19:16 -07:00
Dewey Garrett
f4e16c6ce1 ngcgui: bug fixes for gcmc usage
1) decline gcmc file if not in linuxcnc path
2) if not embedded and gcmc file, use file dir as outdir with message
3) remove leftover id of gcmc file when not found
2014-02-11 20:01:18 -07:00
Dewey Garrett
555c0fc623 ngcgui: make .gcmc files visible in open dialogs 2014-02-10 10:14:00 -07:00
Dewey Garrett
7bdd488c0d ngcgui,pyngcgui: support gcmc files
(squashed commits from test branch: dgarr/ngcgui-gcmc)

Add support for [py]ngcgui to read .gcmc input files for the gcmc
compiler and make tab pages with entry boxes for tagged variables.
A tabpage 'info' message and compiler options can be specified
by tags too.

Ref:  gcmc (G-Code Meta Compiler) http://www.vagrearg.org/content/gcmc
Note: gcmc version 1.4.3 or later must be installed separately and
      available in the user PATH

--------------------------------------------------------------------
Tag formats (simplified):

  Variable:
  //ngcgui: vname [= value , [comment text]]

  Info message:
  //ngcgui: info: text message

  Option:
  //ngcgui: -optioname [optionvalue]
--------------------------------------------------------------------
When a feature for a gcmc tab page is created, the variables
and options are passed to the compiler and a gcode subroutine
file is produced and placed at the head of the linuxcnc subroutine
search path.  These files are purged at each ngcgui restart
that uses .gcmc files.
--------------------------------------------------------------------

Example ini files for axis, touchy, and gscreen:
   configs/sim/axis/ngcgui/ngcgui_gcmc.ini
   configs/sim/axis/ngcgui/pyngcgui_gcmc.ini
   configs/sim/touchy/ngcgui/pyngcgui_touchy_gcmc.ini
   configs/sim/gscreen/ngcgui/pyngcgui_gscreen_gcmc.ini

Example gcmc files:
   nc_files/gcmc_lib/drill.gcmc
   nc_files/gcmc_lib/square.gcmc
   nc_files/gcmc_lib/star.gcmc    (Bertho Stultiens)
   nc_files/gcmc_lib/wheels.gcmc  (Alan Battersby)
2014-02-06 19:24:03 -07:00
Dewey Garrett
bc1bc54174 make: eliminate unneeded copies
use make to create simple standalone executable files for
   ngcgui,pyngcgui,gremlin_view,tooledit
instead of copying files from source tree

to add this patch, you may need to rm existing files:
  lib/python/gremlin_view.py
  lib/python/pyngcgui.py
  share/linuxcnc/gremlin_view.ui
2013-12-01 11:15:45 -07:00
Dewey Garrett
0e76abfb3b ngcgui,pyngcgui: add nom2 option
By default, [py]ngcgui terminates created ngc files with M2.

M2 (Program End) has a number of defined side effects that
may not be wanted.  This patch provides an option (nom2) such
that the created ngc file is started and ended with a single
percent (%) character and no terminating M2.

Option format:
  command_line: -N | --nom2
Inifile:
  NGCGUI_OPTS = ... nom2 ...

(Note: [py]ngcgui has always ignored M2 lines that follow an
endsub in the subroutines it processes)

thanks to Rick (rng3) for the suggestion
2013-08-25 06:34:37 -07:00
Dewey Garrett
8feb761ae3 ngcgui.tcl: show fullpath for dirs in path err message 2012-05-24 14:28:43 -05:00
Dewey Garrett
0950430970 ngcgui.tcl: ignore built-in readonly global variables
And note that support of global variables as input parameters
(a deprecated feature) is marked as a declining feature
to be removed for the 2.6 release
2012-05-24 14:28:43 -05:00
Dewey Garrett
2d1de3d8a0 ngcgui.tcl: report wrongly included subroutines
detect inclusion of numbered subroutine

if a numbered subroutine is included in a  _named_ subroutine file,
execution seems to stop when the endsub is encountered

Example (2.5)
$ cat prog1.ngc
o<suba> call
M2

$ cat suba.ngc
o<suba> sub
(print, before o100)
o100 sub
     (print, this is suba)
o100 endsub
o100 call
(print, after o100)
o<suba> endsub

When prog1.ngc is executed, the prints are:
  before o100
  this is suba

nothing is executed after the o100 endsub
2012-03-13 12:43:54 -05:00
Dewey Garrett
c9996a74e5 ngcgui minor rebranding update 2012-01-25 07:15:56 -06:00
Dewey Garrett
ab078fcf48 ngcgui: warn for absolute file spec conflict
Expected ini parameters for specifying files are:
         [RS274NGC]SUBROUTINE_PATH
     and
         [DISPLAY]NGCGUI_SUBFILE -- as a filename only

Unexpected usage: user specifies [DISPLAY]NGCGUI_SUBFILE as
                  an absolute filename

This fails, as expected, if absolute filename is not in search path.

Change is to warn if user specifies an absolute filename that doses not resolve
to the search path and simultaneously has a file by that name in the search
path.
2012-01-25 07:15:56 -06:00
Dewey Garrett
93ba7d81b6 ngcgui: rebranding
update copyright date
2012-01-18 14:05:39 -06:00
Dewey Garrett
7e396dfc1c ngcgui.tcl: remove unused alternate behavior 2012-01-18 14:05:39 -06:00
Dewey Garrett
cc5e7aae2a ngcgui.tcl: more internationalization items 2012-01-18 14:05:39 -06:00
Jeff Epler
51fc09fd2d Rename many user visible parts to "linuxcnc"
this includes the main script, some of the GUIs, the Python module,
the Tcl package, some image fies.

On a sim system, axis, tkemc, xemc all start.  runtests pass.

a system with realtime wasn't yet tested.

packaging probably requires additional changes and was not yet tested.
2012-01-18 11:25:09 -06:00
Michael Geszkiewicz
a2fd523040 ngcgui: Make few buttons translatable
Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
2012-01-16 16:53:55 +01:00
Dewey Garrett
1f3c2cd88a ngcgui: change name of feature var
global feature name changed from #<_feature> to #<_feature:> to be more
consistent with ngcgui recommended practice

minor: use any,color,override for transient indication of
       use of entrykeybinding

minor: fix name on hole_circle.ngc
2011-12-31 05:33:14 -06:00
Dewey Garrett
30a2719a7c ngcgui: bugfix
symptom: when specifying a single "Custom" tab, an error
         occurred because ::ngc(any,custom,color) was not set yet
fix:     invoke initgui earlier for embedded page

symptom: with option new, new tab could not find file
         in search path because fullpath was passed
fix:     use file tail to support search
2011-12-29 05:05:31 -06:00
Dewey Garrett
4d4634b34b ngcgui: warn when file not in search path
When ngcgui is embedded in axis, a user can use the gui filechooser to browse
and select a file that is not in the search path ([RS274NGC]SUBROUTINE_PATH)

When the processed file is sent to emc (via axis) it won't run because the
subroutine is not found in the search path.  (If the subfile contains no calls
to other routines, it can be made to run by activating the checkbox for
"Expand subroutine"))

Detect that file is not in search path and inform user.

Related change: ngcgui_ttt places its generated subfiles in /tmp so that they
will be purged (ubuntu: /etc/default/rcS:TMPTIME) and uses the
expandsubroutines option so that the subfile does not need to be in the search
path ([RS274NGC]SUBROUTINE_PATH).  A new option, nopathcheck, is used by
ngcgui_ttt to avoid warnings on the search path restriction.
2011-12-28 05:17:02 -06:00
Dewey Garrett
893952151f ngcgui: support search path for filenames
For ngcgui tab pages embedded in axis gui, use a search path for the
filename items:
  [DISPLAY]NGCGUI_PREAMBLE, NGCGUI_SUBFILE, NGCGUI_POSTAMBLE, TTT_PREAMBLE

If a filename is specified with an initial "/" character, only the absolute
filename is considered.

When the file is specified as a relative filename (first character is not a "/"),
the search order is:

  [DISPLAY]PROGRAM_PREFIX
  [RS274NGC]SUBROUTINE_PATH

First file found in the search wins.

Thanks to Seb Kuzminsky for the suggestion.
2011-07-18 20:07:09 -05:00
Dewey Garrett
ad9349098a ngcgui: internationalization provisions 2011-07-12 11:07:24 -05:00
Dewey Garrett
41929a66e2 ngcgui.tcl: bugfix for numbered params in range 31-99 or 3digit
misplaced bracket prevented exclusion of these numbered params
in handling of special association lines for positional parameters.

error report: _tkinter.TclError: can't read ""num02" : no such variable
thanks to Bob Palmer for bug report
2011-07-06 08:16:10 -05:00
Dewey Garrett
614fd57275 ngcgui for v2.5
ngcgui is a subroutine utility for writing and using emc subroutines
ngcgui can run as a standalone application or be embedded in
multiple tab pages in the axis gui

Support two new tcl packages that create axis gui tab pages
  Ngcgui    (ngcgui subroutine utility)
  Ngcguittt (ngcgui interface for truetype-tracer)

new:     tcl/ngcgui_app.tcl -- tcl package for [DISPLAY]TKPKG = Ngcgui
new:     tcl/ngcgui_ttt.tcl -- tcl package for [DISPLAY]TKPKG = Ngcguittt
new:     tcl/ngcgui.tcl     -- ngcgui namespace, procs, and standalone
updated: tcl/pkgIndex.tcl   -- tcl index for new tcl packages

new:     configs/sim/ngcgui*.ini  -- example ini files
new:     nc_files/ngcgui_lib      -- ngcgui compatible library

requires libtk-img (tcl Img package)
requires truetype-tracer v4 to use Ngcguittt
2011-06-08 08:01:06 -05:00