Drawing Polygons in layout versus footprint

I can’t seem to draw a complex polygon in the pcb editor.

I have geometry on metal layers (antennas) in footprints, but unfortunately the footprints get excluded when exporting to Hyperlynx. So, I’m trying to place a footprint, then draw a zone around the area so I have it on the pcb instead of in the footprint.

I can draw a polygon around the geometry while in the footprint editor without any problems. But in layout, I get complaints about self-intersection soon after starting to draw the shape.

I ignore the warnings and continue, but eventually I can’t put corners where I want them. And, corners get placed where I didn’t specify them.

I’ve also tried importing a dxf file. That works, but I can’t get an option to convert the imported graphic into a zone. I need it to be on bottom layer so the export “sees” it.

Surely there’s a way to draw a polygonal shape on a metal layer in layout? HELP!

But in layout, I get complaints about self-intersection soon after starting to draw the shape

It’s not allowed that the polygone-lines are crossing each other. A polygone has to consist of only one continuously, closed outline with no crossing of any outline-segment. If your polygone is too complicated you could try to draw multiple (simpler) polygones and move them together.

I’ve also tried importing a dxf file. That works, but I can’t get an option to convert the imported graphic into a zone. I need it to be on bottom layer so the export “sees” it.

If dxf-import works you should have got already a polygone == graphic. You could set the polygone to “filled” and the layer to bottom - both in the polygone properties dialog.
If you want to convert the polygone into a zone (with assigned net and automatic filling):

  • first set the bottom-layer (your destination for the zone) as active
  • select polygone
  • RMB-click–>context menu–>Create from Selection–>Create zone from selection
  • you get the standard zone-creation dialog → choose net + clearance values + zone-priority
  • after zone-creation you have to delete the original graphic polygone

It would, once completed. But I can’t get it drawn without extraneous points getting inserted. If this isn’t “known behaviour”, I’ll make a video to demo it (about had it done before you replied).

  • RMB-click–>context menu–>Create from Selection–>Create zone from selection

I get the option to “Create Zone from Selection” when I “Draw a polygon”. But I don’t get that option after selecting an imported graphic.

Are you sure that works? If so, I’ll demo what’s happening to me on that too.

Thanks!

Here’s a link to YouTube that shows what happens when I try to make a polygon (either zone or graphic).

Despite complaints about self-intersection, the polygon seems to be getting defined like I want until about 1:30 into the video. Then, not only can I not put a corner where I want it, Kicad is putting in a corner it thinks I want.

I’ve tried this on several antenna footprints–always same behaviour.

I didn’t have any issue making a similar looking polygon. I did notice, at about 1:15, there wasn’t an audible mouse click. Did you miss clicking on that vertex?

The audio isn’t in sync with the video.

But, no, I didn’t miss a click. I’ve done this at least 20 times, same result.

So, this should work? I’ll see why the audio/video doesn’t sync and redo.

Thanks for trying to duplicate.

Here’s where I don’t get the option “Create Zone from Selection”:

Could you share that DXF?

You won’t be able to do it if you have the DXF grouped, but the ungrouped version should work.

Attached.

You won’t be able to do it if you have the DXF grouped, but the ungrouped version should work.

Yes, that’s why I showed it both ways so you could see it didn’t work on the ungrouped version

Thanks!
NXP.dxf (47.4 KB)

I see – somehow all the “straight lines” in your DXF are Bezier curves. We don’t currently support converting Bezier curves into zones. How did you make this DXF?

Can we use this file in an issue to track a feature request to support it?

1 Like

CorelDraw–>export to DXF.

But, you “almost support it”. The graphic import looks fine, just not presented with the option to convert to zone.

I can use another tool to draw the polys. CorelDraw was just handy.

Yes, we can import Beziers as graphics, just can’t turn them into copper zones right now.

I recommend using a CAD tool rather than art tool, such as LibreCAD / FreeCAD or a commercial CAD tool.

Not sure why you consider CorelDraw an “art tool”–it’s just not 3d like the other tools you mentioned. (Which isn’t required for drawing polygons).

But, like I said, it’s not a problem to use another tool.

I call it an art tool not to disparage it, but because getting 2D CAD out of it may be harder than a tool designed for 2D CAD (the programs I listed can all do 2D as well as 3D). Case in point: you drew straight lines, but it exported a bunch of bezier curves instead of straight lines.


This is what I got using the polygon tool, just following the outline. I did it going both clockwise and CCW.

Nah, I’ve used CorelDraw it for a decade plus for literally hundreds of laser cutting projects.

Could be the way I created the shape in CD though. Combined rectangles because it was easy.

I’ll try once again with the poly outline. Like I said, not a problem in the footprint editor, just pcbnew. Rotation was different though. I’ll try it rotated like your example and see if that’s “the magic”.

Well, it’s likely that your laser cutter software has no problem with Bezier curves, then :slight_smile: they are relatively uncommon in PCB applications and were only somewhat recently added to KiCad, and you have run into a case where the support is barebones.

Yeah, there’s lots of info about Corel exporting DXF with Bezier’s and some tools not supporting that.

Not a big deal, I’ll use something else.

But the poly thing is really bugging me–not so much that I can’t get this task done by designing the polys in another tool, but maybe I’m doing something stupid. If so, I’d like to fix it.

It fails every single time for me on the same corner.

I’m doing it again, but this time I’m not worrying about getting the corners exactly in the right spot. Don’t need to show the problem.

If you didn’t start the poly at the same corner, maybe that’s significant. Where did you start?

Thanks again!

This time I included voice over.

Try disabling grid snapping (hold down Ctrl when placing the points that are off-grid)

None of the points are off grid.

But I tried using Ctrl before creating the problematic corner. Same issue.