From 451b4ce507cbde6c9341eb1ea97df977dbe65470 Mon Sep 17 00:00:00 2001 From: Marius Date: Sun, 3 May 2020 16:19:27 +0300 Subject: [PATCH] - small changes to allow making the x86 installer that is made from a Python 3.5 run FlatCAM beta - fixed multiple parameter 'outname' in the Tcl commands OpenGerber and OpenGcode - added more examples in the scripts Examples: isolate and cutout examples - updated the Italian translation - updated the translation files --- assets/examples/cutout_a_gerber.FlatScript | 28 ++++++++++++++++++++++ assets/examples/isolate_gerber.FlatScript | 26 ++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 assets/examples/cutout_a_gerber.FlatScript create mode 100644 assets/examples/isolate_gerber.FlatScript diff --git a/assets/examples/cutout_a_gerber.FlatScript b/assets/examples/cutout_a_gerber.FlatScript new file mode 100644 index 00000000..169ef912 --- /dev/null +++ b/assets/examples/cutout_a_gerber.FlatScript @@ -0,0 +1,28 @@ +# ##################################################################################### +# DESCRIPTION: +# Will cut a PCB piece with a pattern (Gerber file) out of the surrounding PCB material +# ##################################################################################### + +puts "**************** RUNNING an EXAMPLE SCRIPT = Cutout a Gerber file *******************" + +# ----------- 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 test.gbr as gerber_file +open_gerber test.gbr -outname gerber_file + +# cutout the Gerber file with name gerber_file using an endmill with diameter 1.2 at a distance of 0.1 units from +# the Gerber object. Will add gaps (bridges to hold the PCB to the surrounding material) on each side of the PCB +# (4 sides) and the resulting Geometry object that hold the cutout geometry will be named cutout_geo +cutout gerber_file -dia 1.2 -margin 0.1 -gapsize 3 -gaps "4" -outname cutout_geo + +# plot the objects so we can see them; not required for the script but in this script we want to see the results +plot_all \ No newline at end of file diff --git a/assets/examples/isolate_gerber.FlatScript b/assets/examples/isolate_gerber.FlatScript new file mode 100644 index 00000000..d2d0478c --- /dev/null +++ b/assets/examples/isolate_gerber.FlatScript @@ -0,0 +1,26 @@ +# ##################################################################################### +# DESCRIPTION: +# Will isolate copper features in a Gerber file by creating surrounding paths around +# ##################################################################################### + +puts "**************** RUNNING an EXAMPLE SCRIPT = Isolate a Gerber file *******************" + +# ----------- 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 -outname gerber_file + +# isolate the Gerber file +isolate gerber_file -dia 0.1 -passes 2 -overlap 90 -combine True -outname iso_geo + +# plot the objects so we can see them; not required for the script but in this script we want to see the results +plot_all \ No newline at end of file