How Do You Create Edge Cut Lines

How do you create the edge cut lines when working on a complex shape of a PCB?

In my case, I unable to draw precisely with the graphical tool in the PcbNew when the shape of a PCB is a bit more sophistic one, not just a simple rectangle, a square, or a circle. In this case, I feel like to use an external tool like the AutoCAD to draw.

Does anyone know if this is workable with using the AutoCAD?

Also, can someone tell what is “Grid Origin” command of PcbNew is for? I hope I can set my own origin when drawing graphical lines in PcbNew for my own convenience.

–Joe

This is a PCB that I need to create?

Those segments are all circular arcs or lines, so a DXF import should work well. I’d suggest LibreCAD to draw the outline since KiCad uses libdxf from that project. AutoCAD may not work since libdxf may not implement all features of whatever version you are using.

Another alternative which may be viable, since the outline is still very simple, is to edit the kicad_pcb file with a text editor and manually enter the data for the arcs and line segments. I would only resort to this if I had trouble with the DXF files though.

Do you have access to an IDF (v2 or v3) definition of the board outline? KiCad’s IDF framework can be used to import the board shape including the mounting holes and any cutouts, but no code has been added yet to take advantage of this. But if you deal with a lot of IDF descriptions of the board outline, I could put “IDF import” on my list of things to do.

Thank you @cbernardo! LibreCAD works for me.

Hi @cbernardo I was able to draw the edge cut lines by using LibreCAD and imported the DXF file into Pcbnew (see the screenshot). But, I am unable to align the origin of dawing with snap point of Pcbnew.

Do you kown if there is a way to do it? I need to sanp the drwing’s origin so that I can have a convinient reference point for placing the mounting holes, which have to be placed precisely according to the mechanical requirement.

–Joe

Hi Joe,

What options and renderers did you try?

WIth “default canvas” (F9) and the DXF import function “center on page”, the origin is placed at the center of the page; and is aligned to the grid. With the OpenGL canvas (F11) the different position settings do not behave the same; instead the outline is grabbed by a point on the perimeter.

I will send the devs an email about the DXF behavior to see what people think about how the DXF import should behave.

Hi @cbernardo,

I used the “default canvas” and tried all of the DXF import options.

Right now I am able to get the drawing’s origin at the grid point, after so many tries. But I don’t remember how did it. I’ll try it from a scratch again to find a good work flow for this task.

Thanks,

–Joe

Hi @cbernardo,

Based on my experiments, only choosing the “Right top corner” option when importing the DXF file gets the drawing’s origin to snap the grid point in PcbNew. Here is the option window:

And here is the PcbNew after the importing is down:


–Joe

I’ll try to find time to add an option to the default canvas to set the DXF origin at a specific X,Y location on the PCB grid.

Hi @JoeChen - The latest revision (6131) has a patch which allows you to specify the location of the DXF origin on the PCB layout editor. So, before you import the DXF, use the cursor to determine the grid coordinates where you want the DXF origin, then do the import, check the option to specify the grid coordinates, and specify the coordinates. Since some people still work in imperial units there is a selection menu to tell the software whether you want to use mm (default) or inches to specify the grid coordinate.

Thank you @cbernardo for your great work! The new user option for the importing works wonderfully for me!