Commit Graph

198 Commits

Author SHA1 Message Date
Marius Stanciu 2c9657d9eb - removed the line that remove the spaces from the path parameter in the Tcl commands that open something (Gerber, Gcode, Excellon) 2019-09-27 05:13:38 +03:00
Marius Stanciu 27b7a7dce6 - added a new TclCommand named "bounds" which will return a list of bounds values from a supplied list of objects names. For use in Tcl Scripts. 2019-09-23 04:07:24 +03:00
Marius Stanciu edbb690d1b - in legacy graphic engine, fixed a bug that when deleting an object all objects where deleted
- added a new TclCommand named set_origin which will set the origin for all loaded objects to zero if the -auto True argument is used and to a certain x,y location if the format is: set_origin 5,7
2019-09-23 03:35:32 +03:00
Marius Stanciu 4540066731 - added a new TclCommand named quit_flatcam which will ... quit FlatCAM from Tcl Shell or from a script 2019-09-19 04:04:18 +03:00
Marius Stanciu 1d26247fc4 - FlatCAM can be run in HEADLESS mode now. This node can be selected by using the --headless=1 command line argument or by changing the line headless=False to True in config/configuration.txt file. In this mod the Sys Tray Icon menu will hold only the Run Scrip menu entry and Exit entry. 2019-09-19 03:55:47 +03:00
Marius Stanciu fe97364ba5 - fixed issue #313 where TclCommand drillcncjob is spitting errors in Tcl Shell which should be ignored 2019-09-17 02:58:01 +03:00
Marius Stanciu f51a3fa038 - made the splashscreen to be showed on the current monitor on systems with multiple monitors
- added a new entry in Menu -> View -> Redraw All which is doing what the name says: redraw all loaded objects
- fixed issue where in TCl Shell the Windows paths were not understood due of backslash symbol understood as escape symbol instead of path separator
- made sure that in for the TclCommand cncjob and for the drillcncjob if one of the args is stated but no value then the value used will be the default one
- made available the TSA algorithm for drill path optimization when the used OS is 64bit. When used OS is 32bit the only available algorithm is TSA
2019-09-16 23:27:02 +03:00
Marius Stanciu 727cee7aec - fixed some issues recently introduced in the TclCommands CNCJob, DrillCNCJob adn write_gcode; changed some parameters names 2019-09-16 17:20:56 +03:00
Marius Stanciu e9751e41b8 - added a new parameter named 'muted' for the TclCommands: cncjob, drillcncjob and write_gcode. Setting it as -muted 1 will disable the error reporting in TCL Shell 2019-09-16 04:23:16 +03:00
Marius Stanciu 61120911c6 - fixed Scripts repeating multiple time when the Code Editor is used. This repetition was correlated with multiple openings of the Code Editor window (especially after an error)
- added the autocomplete keywords that can be changed to the defaults dictionary
- modified the TclCommand New so it will no longer close all tabs when called (it closed the Code Editor tab which may have been holding the code that run)
2019-09-16 04:03:19 +03:00
Marius Stanciu 4c1163eedd - added the outname parameter (and established an default name when outname not used) for the AlignDrillGrid and AlignDrill TclCommands 2019-09-16 03:12:37 +03:00
Marius Stanciu 7aebf1c60a - added new TclCommands: NewExcellon, NewGerber
- fixed the TclCommand open_project
2019-09-16 02:57:46 +03:00
Marius Stanciu 8cba74647f - made all TclCommands not to be plotted automatically
- made sure that all TclCommands are not threaded
2019-09-16 01:39:11 +03:00
Marius Stanciu 2f553c9005 - added a new TclCommand named PlotObjects which will plot a list of FlatCAM objects
- made that after opening an object in FlatCAM it is not automatically plotted. If the user wants to plot it can use the TclCommands PlotAll or PlotObjects
- modified the TclCommands that open files to not plot the opened files automatically
2019-09-16 00:47:15 +03:00
Marius Stanciu 8b3e1b5a77 - fixed the TclCommand cncjob to use the -outname parameter
- added some more keywords in the data_model for auto-completer
2019-09-15 16:46:48 +03:00
Marius Stanciu 30f00abce8 - fixed issue in ToolPaint that could not allow area painting of a geometry that was a list and not a Geometric element (polygon or MultiPolygon)
- fixed UI showing before the initialization of FlatCAM is finished when the last state of GUI was maximized
- finished updating the TclCommand cncjob to work for multi-geo Geometry objects with the parameters from the args
2019-09-15 13:37:06 +03:00
Marius Stanciu 21ca024324 - update the Tcl Command isolate to be able to isolate exteriors, interiors besides the full isolation, using the iso_type parameter 2019-09-15 05:19:02 +03:00
Marius Stanciu 0c62be61df - established a TODO 2019-09-15 05:12:57 +03:00
Marius Stanciu a25a70c0e1 - refactored FlatCAMGeometry.mtool_gen_cncjob() method
- fixed the TclCommandCncjob to work for multigeometry Geometry objects; still I had to fix the list of tools parameter, right now I am setting it to an empty list
2019-09-15 05:00:20 +03:00
Marius Stanciu 57f4762261 - added to the NonCopperClear.clear_copper() a parameter to be able to run it non-threaded 2019-09-14 18:27:08 +03:00
Marius Stanciu d22592e64c - small changes in the TclCommands: MillDrills, MillSlots, DrillCNCJob: the new parameter for tolerance is now named: tooldia
- cleaned up the 'About FlatCAM' window, started to give credits for the translation team
2019-09-12 17:28:56 +03:00
Marius Stanciu 8e2cca827a - added a new parameter in the TclCommands: DrillCNCJob, MillDrills, MillSlots named tol (from tolerance). If the diameters of the milled (drilled) dias are within the tolerance specified of the diameters in the Excellon object than those diameters will be processed. This is to help account for rounding errors when having units conversion 2019-09-12 02:07:32 +03:00
Marius Stanciu 90b9e2da05 - modified the TclCommand DrillCncJob to have as parameter a list of tool diameters to be drilled instead of tool indexes 2019-09-11 21:40:18 +03:00
Marius Stanciu 90a8b44cdf - fixed some minor errors in the new TclCommands: MillDrills and MillSlots 2019-09-11 17:59:24 +03:00
Marius Stanciu dce347d9be - changed the resulting object name from TclCommand MillSlots 2019-09-11 17:51:56 +03:00
Marius Stanciu 0fc3743e91 - modified the MillDrills and MillSlots TclCommands to accept as parameter a list of tool dimaeters to be milled instead of tool indexes 2019-09-11 17:50:52 +03:00
Marius Stanciu 1ef9e95143 - changed the name of TclCommand MillHoles to MillDrills and added a new TclCommand named MillSlots 2019-09-11 17:34:01 +03:00
Marius Stanciu 4440298327 - fixed the TclCommand MillHoles 2019-09-11 07:06:32 +03:00
Marius Stanciu 7f3e3cb061 - fixed a small typo in TclCommandCopperCLear 2019-09-10 04:37:00 +03:00
Marius Stanciu ba1e0bc94b - fixed Tcl Command CncJob
- fixed crash due of Properties Tool trying to have a convex hull area on FlatCAMCNCJob objects which is not possible due of their nature
- modified Tcl Command SubtractRectangle
- fixed and modernized the Tcl Command Scale to be able to scale on X axis or on Y axis or on both and having as scale reference either the (0, 0) point or the minimum point of the bounding box or the center of the bounding box.
- fixed and modernized the Tcl Command Skew
2019-08-26 00:40:35 +03:00
Marius Stanciu 65ab17e308 - fixed Tcl Command AddPolygon, AddPolyline 2019-08-25 21:33:46 +03:00
Marius Stanciu 61df272bbc - added new capability in NCC Tool when the reference object is of Gerber type and fixed some newly introduced errors 2019-08-25 18:13:13 +03:00
Marius Stanciu 354946025c - finished adding the TclCommandCopperClear that can be called with alias: 'ncc' 2019-08-25 16:05:03 +03:00
Marius Stanciu 8c0b8ed13d - initial add of a new Tcl COmmand named CopperClear
- remade the NCC Tool in preparation for the newly added TclCommand CopperClear
2019-08-25 04:45:16 +03:00
Marius Stanciu d606c836f4 - added a new TclCommand named Bbox who generate a bounding box. 2019-08-24 21:25:25 +03:00
Marius Stanciu a29f8ec43d - added a new TcL Command named Nregions who generate non-copper regions 2019-08-24 20:52:35 +03:00
Marius Stanciu 87d1558977 - modified the Paint Tool. Now the Single Polygon and Area/Reference Object painting works with multiple tools too. The tools have to be selected in the Tool Table.
- remade the TclCommand Paint to work in the new configuration of the the app (the painting functions are now in their own tool, Paint Tool)
- fixed a bug in the Properties Tool
2019-08-24 19:55:03 +03:00
Marius Stanciu 017d495a41 - fixed TclCommandFollow command; an older function name was used who yielded wrong results 2019-08-22 23:09:41 +03:00
Marius Stanciu 729b7cb11c - some changes in the app.on_togle_units() to make sure we don't try to convert empty parameters which may cause crashes on FlatCAM units change
- updated setup_ubuntu.sh file
- made sure to import certain libraries in some of the FlatCAM files and not to rely on chained imports
2019-07-09 13:58:33 +03:00
Marius Stanciu a5ffe475dd - fixed bug in ToolCutout where creating a cutout object geometry from another external isolation geometry failed
- fixed bug in cncjob TclCommand where the gcode could not be correctly generated due of missing bounds params in obj.options dict
- fixed a hardcoded tolerance in FlatCAMGeometry.generatecncjob() and in FlatCAMGeometry.mtool_gen_cncjob() to use the parameter from Preferences
2019-06-07 23:14:00 +03:00
Marius Stanciu 2a30101bb0 - TclCommand Geocutout is now creating a new geometry object when working on a geometry, preserving also the origin object 2019-06-03 04:47:29 +03:00
Marius Stanciu c409df0a8e - fixed issue with geometry name not being updated immediately after change while doing geocutout TclCommand
- some changes to enable/disable project context menu entry handlers
2019-06-02 14:04:14 +03:00
Marius Stanciu a545658d44 - fixed the Circle Steps parameter for both Gerber and Geometry objects not being applied and instead the app internal defaults were used.
- fixed the Tcl command Geocutout issue that gave an error when using the 4 or 8 value for gaps parameter
2019-05-19 17:15:24 +03:00
Marius Stanciu ecc2c90f2a - changed all the info messages that are of type warning, error or success so they have a space added after the keyword
- changed the Romanian translation by adding more diacritics
2019-03-29 00:26:00 +02:00
Marius Stanciu 9648bcd693 - added a header in the New Script 2019-03-25 03:14:55 +02:00
Marius Stanciu abfa78d898 - remade the layout in 2Sided Tool
- work in progress for translation in Romanian - 91%
2019-03-17 15:47:17 +02:00
Marius Stanciu 9d0bcf477a - removed the Open Gerber with 'follow' menu entry and also the open_gerber Tcl Command attribute 'follow'. This is no longer required because now the follow_geometry is stored by default in a Gerber object attribute gerber_obj.follow_geometry
- added a new parameter for the Tcl CommandIsolate, named: 'follow'. When follow = 1 (True) the resulting geometry will follow the Gerber paths.
2019-02-19 14:53:55 +02:00
Marius Stanciu 1a8db0b5d9 - fixed the Tcl Command Geocutout to work with Gerber objects too (besides Geometry objects) 2019-02-06 22:32:32 +02:00
Marius Stanciu 2ee80990e5 - added a new function (and shortcut key Escape) that when triggered it deselects all selected objects and delete the selection box(es)
- fixed bug in Excellon Gcode generation that made the toolchange X,Y always none regardless of the value in Preferences
2019-02-06 21:37:50 +02:00
Marius Stanciu 05ae92726c - renamed the theme to layout because it is really a layout change
- combined the geocutout and cutout_any TCL commands - work in progress
2019-02-06 16:59:17 +02:00
Marius Stanciu 6ea3499d39 - updated the new shortcut list with the shortcuts added lately
- now the special messages in the Shell are color coded according to the level. Before they all were RED. Now the WARNINGS are yellow, ERRORS are red and SUCCESS is a dark green. Also the level is in CAPS LOCK to make them more obvious
- some more changes to GUI interface (solved issues)
- added some status bar messages in the Geometry Editor to guide the user when using the Geometry Tools
- now the '`' shortcut key that shows the 'shortcut key list' in Editors points to the same window which is created in a tab no longer as a pop-up window. This tab can be detached if needed.
2019-02-03 15:13:09 +02:00
Marius Stanciu e0adb9b43b - corrected small type in list_sys Tcl command; added a protection of the Plot Area Tab after a successful edit. 2019-02-01 17:44:28 +02:00
Marius Stanciu 60614e4b45 - more fixes (didn't get it right before) 2019-01-31 02:50:03 +02:00
Marius Stanciu 4441e40042 - fixed postprocessor files to work with toolchange_xy parameter value = None (no values in Edit - Preferences fields) - actual fix
- fixed Tcl commands CncJob and DrillCncJob to work with toolchange
2019-01-31 01:45:14 +02:00
Marius Stanciu 3941d03702 - fixed TclCommand Cutout
- added a new TclCommand named CutoutAny. Keyword: cutout_any
2019-01-25 20:05:27 +02:00
Marius Stanciu 006b0c8ecb - modified the panelize TclCommand to take advantage of the new panelize() function; added a 'threaded' parameter (default value is 1) which controls the execution of the panelize TclCommand: threaded or non-threaded 2019-01-25 18:57:44 +02:00
Marius Stanciu e48d2d2f49 -clean-up before merge 2019-01-03 21:25:08 +02:00
Marius Stanciu 421e9766ea -clean-up before merge 2019-01-03 21:20:54 +02:00
Marius Stanciu 21406fcccf - some small corrections 2018-06-02 16:17:46 +03:00
Marius Stanciu ddda4773e3 - added the possibility of selecting which system parameters to list
starting with the letter(s) offered as argument. It's a way to narrow
the list down. If no selection letters are offered it will list on
screen the entire list of system parameters.
2018-06-02 16:11:40 +03:00
Marius Stanciu f026d8cae6 - addded a new TclCommand that list the names of the system parameters.
It is useful if we don't remember correctly the name of the system
parameter or if we want to look for a certain system parameter as the
list is big and it grows.
2018-06-02 15:06:20 +03:00
Marius Stanciu 0f6491be69 - fixed module imports for Python3 2018-05-31 19:53:29 +03:00
Marius Stanciu 5ff3f66b04 Merge https://bitbucket.org/jpcgt/flatcam/src/master into Follow_TCL_command_add_to_new_architecture
# Conflicts:
#	FlatCAMApp.py
2018-05-31 17:53:35 +03:00
Marius Stanciu c67d2f0028 - modified the TCL comamand follow to the new architecture. Tested it and
it works without crashes. It can be safely pulled in.
2018-05-31 02:09:15 +03:00
Marius Stanciu 41dffe44d4 Merge https://bitbucket.org/marius_stanciu/flatcam_mpl/src/master into Port_to_Python3k 2018-05-30 17:54:34 +03:00
Marius Stanciu 7ec6914422 Merged Improve_panelize_Tcl_command into master 2018-05-30 03:00:42 +03:00
Marius Stanciu 3b9767cc6f - I've finally run the tests with OK result (56 tests in 102.937 sec)
- I had to play with module imports as they created a lot of error in
the tests although in reality the program worked OK.
- I've fixed some mistakes in TcL commands (they were testing isinstance
against the like of Geometry instead of FlatCAMGeometry)
- I've had to add some fixes in ObjectCollections.py (error on
create_index() method but Marco already fixed this in the checkbox
in project tab pull request and knew about this.
- Although at some point the tests run fine, I've made some checkings
on my own over the Tcl commands and discovered errors which I fixed as
mentioned above.
- conclusion is that tests are just a must and do not cover everything
(like saving projects which at some point by juggling with imports I
braked and tests were 100% OK)
2018-05-30 02:17:34 +03:00
Marius Stanciu da9f890c39 Merged master into Port_to_Python3k 2018-05-29 17:43:33 +03:00
Marius Stanciu ef611753a6 - added the posibility to create an object without plotting it. Also if
the project is created with plot=False then it will not be checked in
Project tab
- improved the panelize command by toggling OFF the plot for the
temporary objects. There is no need to plot the temporary objects, only
the panel is of interest
- add a few aliases for the Panelize command ('pan' and 'panel')
2018-05-28 15:46:42 +03:00
Marius Stanciu 3fae21622a - allow the usage of lowercase units names (like mm or in) when used in
the Tcl command set_sys
2018-05-27 14:03:19 +03:00
Marius Stanciu a4bbb98bf1 - converted from Python2 code to Python3 code
- in camlib.py, CNCJob class -> generate_from_excellon_by_tool() was
failing in the line to sort the tools due of been unable to compare
between dict's. I replaced that section.
2018-05-26 04:43:40 +03:00
mquezada cd28ff9fdd Fix issue #248 where set_sys command returned failure feedback even on command success. 2018-05-17 18:28:58 -04:00
Juan Pablo Caram 62f0662083 Support to mill all holes from the command line. Fixes #218. 2017-05-05 16:20:14 -04:00
Mike Evans c3ed6b43f2 Also fix broken add_circle command. 2017-02-07 23:13:05 +00:00
Mike Evans b809192468 Fix for Issue 227. 2017-02-04 16:44:41 +00:00
Juan Pablo Caram db59ef8edd Merge remote-tracking branch 'origin/master' 2017-01-27 19:52:59 -05:00
Juan Pablo Caram 93e2d953a4 Added preamble and postamble to write_gcode tcl command. 2017-01-27 19:52:23 -05:00
tstellanova 37cd1cb1c9 Add panel instances to panel list properly
See issue 226: https://bitbucket.org/jpcgt/flatcam/issues/226/problem-panelizing-excellon
2016-12-31 09:54:41 -08:00
Juan Pablo Caram 7e0a9f91ee Incorrect alias of save_project. Fixes #223. 2016-12-16 22:38:09 -05:00
Juan Pablo Caram 546d2aacf0 Fixes in millcncjob command and progress towards #218. 2016-11-01 00:53:47 -04:00
Juan Pablo Caram 261054f1cf Cleanup of TclCommand and migrated a few more commands to new architecture. 2016-10-18 11:36:58 -04:00
Juan Pablo Caram f77403b0f2 Bringing up to date with VisPyCanvas. Mostly migration of Tcl commands to new architecture. 2016-10-08 11:49:22 -04:00
Juan Pablo Caram 7474609776 Added feature: Select all polygons for painting and shell support with "paint" command. 2016-09-19 16:44:29 -04:00
Juan Pablo Caram 66901041d9 Fixed errors that I introduced in last commit. 2016-06-11 19:50:19 -04:00
Juan Pablo Caram 36d0a2e029 Cleaned up tests for shell. Added test steps for gerber flow. 2016-06-03 17:15:35 -04:00
Kamil Sopko be76b464ad fix typo error and cleaning 2016-04-18 20:36:41 +02:00
Kamil Sopko cd57af18bc add option type (new object will be gerber or geometry)
add tests for import_svg as gerber and geometry

fix  obj names in test_ import_svg
2016-04-12 21:35:04 +02:00
Kamil Sopko 96419921e5 small fix if error happens inside thread execution, then pass correct error_info to display
command imort_svg was using self  instead self.app wrong object

Fix in svgparse for rotate regexp and division by zero problem.
Linestring  need at least 2 points  within very small arcs.
In svg  rect x and  y are optional , they are  0 by default.
Ignore transformation for  unknown kind.
Strip spaces  for  ptliststr In parse_svg_point_list to avoid parsing errors.
2016-04-12 19:44:56 +02:00
sopak 8a67a3cce1 reimplement command import_svg 2016-04-11 13:14:45 +02:00
Kamil Sopko e236a60be9 implement system values background_timeout and verbose_error_level
implement correct error level handling based on verbose_error_level ,  fix  double print of  tcl error and  do not wrap unknown  exceptions into TCL known
2016-04-10 15:14:18 +02:00
Kamil Sopko 26a8b7347b change default timeout
fix outname bug  in  drillcncjob
2016-04-10 11:10:25 +02:00
Kamil Sopko c2cdaaf452 fix display also for nonsignaled exceptions in execute_wrapper 2016-04-03 14:37:40 +02:00
Kamil Sopko b98954dccd fix error handling in signaled commands, error gets info about different scoup instead of true error
more detaild error  print including python trace when more complex unknown error

reinplement drillcncjob

fix camlib problem with all  drills("all"  was already there) but it crashes on tools without points, when  no tools "all" is as default

add timeout to all helps  if  command is  signaled
2016-04-03 14:20:50 +02:00
Kamil Sopko 2082446ab0 tweak signal handling 2016-03-25 00:59:02 +01:00
Kamil Sopko e96ee1af29 merge new pull requests from FlatCAM->master
implement  executing of tasks  inside worker thread
cleanups, reimplement  Isolate/New/OpenGerber as OOP style Shell commands
disable edit  during shell execution,  show   some  progress
add ability for breakpoints in other threads and only if available
add X11 safe flag, not sure what happen on windows
2016-03-24 23:06:44 +01:00
Kamil Sopko 980638630d cleanups
implement TclCommand.TclCommandSignaled as proof of concept (not usefull)
bypass using threads  within obj.generatecncjob(use_thread = False, **args)
reimplement some more shell commands  to  OOP style
2016-03-19 15:13:07 +01:00
Kamil Sopko 78854f7fe0 fix ordering in naming arguments and help
add commands TclCommandAddPolygon(add_poly, add_polygon) and TclCommandAddPolyline(add_polyline)

implement add_polyline in camlib.py
2016-03-17 12:14:12 +01:00
Kamil Sopko cd6700152c draft for reimplementation of tcl commands to separated files/modules 2016-03-16 18:57:43 +01:00