isolate_gerber.FlatScript 1.2 KB

1234567891011121314151617181920212223242526
  1. # #####################################################################################
  2. # DESCRIPTION:
  3. # Will isolate copper features in a Gerber file by creating surrounding paths around
  4. # #####################################################################################
  5. puts "**************** RUNNING an EXAMPLE SCRIPT = Isolate a Gerber file *******************"
  6. # ----------- START: This is needed only for the examples ----------------
  7. # first set the default location where to search for the files to be open and store it to the ROOT_FOLDER variable
  8. set ROOT_FOLDER [get_sys root_folder_path]
  9. # calculate the resources path for the examples we need to run and store it inside the PATH varaible
  10. set PATH ${ROOT_FOLDER}/assets/examples/files
  11. # ----------- END: This is needed only for the examples ----------------
  12. # set the working path to the path that holds the files we are going to work with
  13. set_path $PATH
  14. # load the GERBER file
  15. open_gerber test.gbr -outname gerber_file
  16. # isolate the Gerber file
  17. isolate gerber_file -dia 0.1 -passes 2 -overlap 90 -combine True -outname iso_geo
  18. # plot the objects so we can see them; not required for the script but in this script we want to see the results
  19. plot_all