Outline tool works with non-filled polygons

Issue #156 resolved
Eliot Phillips created an issue

I use KiCad for all my board generation. The Edge.Cuts layer let's you draw the board outline of any arbitrary shape. When you generate the Gerbers it just has a line instead of a filled poly. I can't use the Isolation tool to generate the board outline since it creates geometry on the outside and the INSIDE of the board outline. I need geometry on just the outside of the cut line in order to do a proper cutout.

Issue #130 and this feature would make for a very robust cutout process.

Attaching a KiCad Edge.Cuts file as an example.

Comments (10)

  1. Juan Pablo Caram repo owner

    Can't you just,

    • Create a solid polygon in KiCad, or
    • Simply delete the inner isolation path in FlatCAM?
  2. Eliot Phillips reporter
    • There doesn't appear to be any way to generate filled polygons in Kicad.

    • Can you delete just one isolation track? I couldn't figure it out, it seemed to always highlight as a pair (OS X)

  3. Juan Pablo Caram repo owner

    I have not used KiCad in a while, but I'm 100% sure you can create filled polygons. Pretty much every single PCB has filled copper regions. Some PCB programs call it polygon pour.

    You are right, both interior and exterior are a single object. I will probably add a feature to the drawing tool to remove the interior of shapes.

    So after I add that feature to the drawing tool there would be 2 alternative ways to do what you are trying to do. In such case, do you still think that a specific feature is required?

  4. Eliot Phillips reporter

    You can create filled polygons on the copper layers of the board, but this is the Edge.Cuts layer which you draw the board outline on and only outlines.

    I'm sure there'd be other uses for deleting half of an isolation pair but I want to script all of this cncjob generation, i.e. generating the board outline directly with no mouse based interaction.

    FlatCAM seems to be the most sane and actively developed pcb cam system right now for people trying to use free software. I thought it would be a good place to start for what I'm trying to get done:

    I've been using the Othermill lately and I want to apply that sort of methodology to other, cheaper PCB mills. The idea is you use an end mill for all isolation, drilling (milling), and cutout. Most of the time I'm using a 1/32nd end mill to do this all on simple single sided through hole boards. Which is nice since you can just hit go and it cuts the entire board to completion without any tool changes or operator involvement. Kicad has a python scripting engine so you could actually run the flatcam postprocessing from there.

    I don't think Flatcam can be scripted to do a job like this yet: * Milling holes with thin end mills like 1/32nd requires cutting holes using multiple depth cuts (mentioned in comments on issue #130). * Board outline generator doesn't work with KiCad outlines and doesn't use multiple depth cuts. * Ideally output of all of these, isolation cutting, hole milling, outline milling, would be in one g-code file since there's no tool change.

  5. Juan Pablo Caram repo owner

    I'm seeing more interest on automation and scripting from users lately.

    Let me see how to approach this problem. Whether to add more geometry manipulation commands or a specific command for board outlines. Suggestions are welcome.

  6. Juan Pablo Caram repo owner

    Resolved in b5f428d. Added shell commands interiors and exteriors.

    If there is a single Gerber path defining the boar outline, performing an isolation routing operation will result in a polygon with an "exterior" and an "interior". The exteriors operation creates a new Geometry object with the desired geometry for cutting the board outline.

    The command interiors does the opposite.

  7. Eliot Phillips reporter

    I just tried exteriors command.

    The KiCad Edge_Cuts.gbr is a graphic line where the center of the line is the actual board edge.

    I think in FlatCAM speak that would mean using -follow 1 to get the desired line. (Aside: is that open_gerber option currently working? errored for me)

    The exteriors operation would then follow that line but shifted by -dia /2 to generate the proper end mill path.

    follow, exteriors, and interiors feel like they should be options on isolate instead of standalone commands since they're generating geometry to be used for toolpaths. (I'm guessing follow is on open_gerber since it happens at file parsing)

  8. Juan Pablo Caram repo owner

    I has forgotten the "follow" option existed. That operation can only be done at parsing time, because after a normal parsing (without "follow"), only polygons (solid regions of copper) remain. The "path" information is discarded.

    The "follow" option should solve your specific use case. If it's not working, please create a new issue.

    I assume the "exteriors" and "interiors" commands worked properly?

  9. Eliot Phillips reporter

    Opened issue #157 for -follow

    The exteriors and interiors worked but I don't think I'd ever use them. If I wanted to outline something I'd have to use a command that took a tool diameter as an option and generated an exterior offset line.

    I don't think the -follow option will make FlatCAM work with KiCAD's Edge.Cuts since it just generates a path in the center of the gerber object. To do the actual board outline cut the tool has to cut everything on the exterior of that line (a path that's half the tool diameter away from the followed line).

  10. Eliot Phillips reporter

    I just realized that this wasn't a KiCad problem, FlatCAM just doesn't support processing board outline gerbers the way EDA software generates them.

    In Eagle you just draw a line around the board in the Dimensions layer.

    In KiCAD you just draw a line around the board in the Edge Cuts layer.

    I was confused because I thought I would just use the same Gerbers I send to PCB manufactures but process them for the mill using FlatCAM.

    Luckily, a combination of -follow and exteriors will generate the proper cutout (once follow works).

  11. Log in to comment