- solve parenting issues when trying to load a FlatScript from Menu -> File -> Scripting

- added a first new example script and added some files to work with
- added a new parameter that will store the home folder of the FlatCAM installation so we can access the example folder
This commit is contained in:
Marius Stanciu
2020-05-01 17:10:42 +03:00
committed by Marius
parent f47396a6e5
commit 37c6bb2c61
21 changed files with 275 additions and 87 deletions

View File

@@ -0,0 +1,69 @@
G04*
G04 GERBER (RE)GENERATED BY FLATCAM v8.992 - www.flatcam.org - Version Date: 2020/05/01*
G04 Filename: test.gbr*
G04 Created on : Friday, 01 May 2020 at 17:03*
%INBottom.gbr*%
%MOMM*%
%ADD13C,0.8*%
%ADD14C,1.27*%
%ADD15C,1.27*%
%ADD16R,1.5X1.5*%
%ADD17C,1.5*%
%FSLAX53Y53*%
G04*
G71*
G90*
G75*
G01*
%LNBottom*%
%LPD*%
X20779Y24462D2*
D13*
Y27002D1*
X18229D1*
X14429D1*
X18229D2*
X19509D1*
Y28272D1*
X32209Y14302D2*
X28399D1*
Y16842D1*
Y14302D2*
X18239D1*
X20779Y16842D2*
X23329D1*
Y28272D1*
X27129D1*
X20779Y19382D2*
X14429D1*
X20779Y21922D2*
X18239D1*
X28399D2*
X32209D1*
D14*
X27129Y28272D3*
D15*
X19509D3*
D14*
X14429Y19382D3*
D15*
Y27002D3*
D14*
X18239Y21922D3*
D15*
Y14302D3*
D14*
X32209Y21922D3*
D15*
Y14302D3*
D16*
X28399Y24462D3*
D17*
Y21922D3*
Y19382D3*
Y16842D3*
X20779D3*
Y19382D3*
Y21922D3*
Y24462D3*
M02*

View File

@@ -0,0 +1,28 @@
M48
;EXCELLON GENERATED BY FLATCAM v8.992 - www.flatcam.org - Version Date: 2020/05/01
;Filename: test.txt
;Created on : Friday, 01 May 2020 at 17:04
INCH,LZ
;FILE_FORMAT=2:4
T1F00S00C0.0220
T2F00S00C0.0354
%
T01
X010681Y011130
X007681Y011130
X005681Y010630
X007181Y008630
X005681Y007630
X007181Y005630
X012681Y005630
X012681Y008630
T02
X011181Y009630
X011181Y008630
X011181Y007630
X011181Y006630
X008181Y006630
X008181Y007630
X008181Y008630
X008181Y009630
M30

View File

@@ -0,0 +1,30 @@
G04*
G04 GERBER (RE)GENERATED BY FLATCAM v8.992 - www.flatcam.org - Version Date: 2020/05/01*
G04 Filename: test_1*
G04 Created on : Friday, 01 May 2020 at 17:07*
G04*
G04 RS-274X GERBER GENERATED BY FLATCAM v8.992 - www.flatcam.org - Version Date: 2020/05/01*
G04 Filename: test_1_edit*
G04 Created on : Friday, 01 May 2020 at 17:06*
%FSLAX24Y24*%
%MOIN*%
%ADD10C,0.003937*%
G70*
G90*
G01*
%LPD*%
D10*
X05118Y11417D02*
X05118Y05118D01*
X05118Y05118D02*
X08661Y05118D01*
X08661Y05118D02*
X08661Y11417D01*
X08661Y11417D02*
X05118Y11417D01*
X08661Y11417D02*
X05118Y11417D01*
X08661Y11417D02*
X05118Y11417D01*
M02*

View File

@@ -0,0 +1,19 @@
# ----------- START: This is needed only for the examples ----------------
# first set the default location where to search for the files to be open and store it to the ROOT_FOLDER variable
set ROOT_FOLDER [get_sys root_folder_path]
# calculate the resources path for the examples we need to run and store it inside the PATH varaible
set PATH ${ROOT_FOLDER}/assets/examples/files
# ----------- END: This is needed only for the examples ----------------
# set the working path to the path that holds the files we are going to work with
set_path $PATH
# load the GERBER file
open_gerber test.gbr
# load the Excellon ifle
open_excellon test.txt
# plot them all so we can see them on canvas
plot_all