Define V-score vs milling?

I have a Python script that does the panelization and draws VScore in the layer Eco1_User. At gerber export the script also exports that layer but then proceeds to change the gerber file to VCut according to the gerber X2 spec. I suppose one could just change the FileFunction line in the gerber file with a text editor, but scripting does it right every time. My fab accepted this without question. The relevant code is

##### Generate gerbers for Vcut
if Eco1_as_Vcut:
  pctl.SetLayer(pcbnew.Eco1_User)
  pctl.OpenPlotfile("Vcut", pcbnew.PLOT_FORMAT_GERBER, "Vcut")
  pctl.PlotLayer()
  pctl.ClosePlot()
  retval.append(pctl.GetPlotFileName())
  # Change Eco1.User to Vcut inside Gerber X2 file, see
  # https://www.ucamco.com/files/downloads/file/81/the_gerber_file_format_specification.pdf
  with open(pctl.GetPlotFileName(), "r+") as f: 
    contents=f.readlines()
    for i,line in enumerate(contents):
      if line=="%TF.FileFunction,Other,ECO1*%\n":
        contents[i]="%TF.FileFunction,Vcut*%\n"
    f.seek(0)
    f.truncate()
    f.write("".join(contents))
2 Likes