Solved -- Create a trace that snuggles up to curved dxf-imported board edge

Hmm. That sounds more than what I need.

Here is a fundamental question: why doe the kicad copper-to-edge constraint work with a plane and not a track? If it did I would be done. Here is a very quick example – I would call this a bug actually:

What about selecting all your fat traces and Convert to Zone? (The zone should get clipped properly to the board edges.)

1 Like

I thought about that but when I select the fat traces and create-from-selection, the only option is array.

It is also not just a random fat trace, I made it 3mm wide. It is centered on the edge cut. So, if I could enforce a 0.5mm edge clearance, I would have a nice 1mm ring trace left, and can have an interior plane fill up to that nicely.

Well, the fat traces were grouped, and array was the only option. I copied that out and ungrouped it, then selected it and could convert to zone. However, the traces are now skinny and the dozen or so curved segments from the dxf import got turned into a hundred little segments:
hmm

Oh, right, I couldn’t add that to 7.0 because it contained string changes. You’ll need 7.99:

(The actual zone won’t contain any different properties, so you should be able to copy it from the 7.99 document and paste it into a 7.0 document. “Should” being the operative word…)

I can’t say ‘why’ the dimensions are not as I expected and, I did not bother to investigate why some imported shapes/lines are not what they should be…

However, some simple solutions that I’ve used several times to accomplish similar tasks involves the following in some aspect, depending upon what works and what doesn’t work (usually, it has to do with Kicad’s versions not being consistent).

Basic concept is to have a PCB shape, Offset it’s lines and use it to make Trace/Zone/etc

One Approach if you have a DXF for your board shape and want to create copper but with it offset a tad-bit to get edge clearance:

By Example…
• Loaded a DXF into Edge-Cuts
• Select it, Plot it
• Import it with a Scale of 0.92 into Copper Layer

You could do similar fooling around with making it a Zone/Fill/Track

Could also, use the Offset ability in Solidworks and FreeCAD

Shape Drawn in FreeCAD, exported DXF

Shape DXF imported into Kicad and then, Ploted it from Kicad and Imported at Scale of 0.92 with Line-width of 4mm

ADDED: 22 yrs ago, I used a similar Hammond Box for my orignial Astronomy app based on dsPIC.
I milled the face-plate for the Buttons and LCD Now, I 3D-Print/Design them…

Ahh, I was looking for some sort of scaling transform, but didn’t realize that was an import option – that may be the trick I need. Gotta do some yard work so look at it later. Thx

Did some putzing with scaled dxf and realized that while the shrunken outline is as expected for the convex outer curves, it is the opposite for the concave cutouts.

So then I thought maybe keepout of some sort would be handy – as in adding a 1mm wide line centered on the edge cut as a keepout, to enforce a 0.5mm edge-to-copper clearance. I thought this would be a good hack for the apparently-broken board constraint for edge-to-copper. But a quick test with a keepout region shows that it also seems to ignore the perimeter trace. Sigh.

ko

I often find the best solution is to start over by Brute-Force, if necessary, using the existing tools, versus hacking work-arounds.

Perhaps I don’t fully understand your goal but, If I do understand it correctly, just Drawing Tracks is simple enough. I did NOT fuss with trying for Exact Dimensions/etc but video conveys enough info… (picture = 1000 words)


1 Like

OK, I didn’t really try to just route a trace, but you got me looking at it. The edge-to-copper constraint does not work with traces pasted over the boundary, but it does control the extent of planes, and routing of traces. I can’t just use an arc like in your demo, as the curves are complex, but I did get something that looks like it will work.

By setting grid down to 0.1mm, and drawing the traces in short little bits while keeping the cursor outside the board edge, I was able to draw a line up against the curves. It needed to use 45 degree sections around the notches, but I can live with that:

One problem though: it won’t let me connect it into a complete closed trace – opens it up somewhere. I think there is a setting that allows this, but unsure what it is. Anyone?

Look at your posted image… Missing closure line

Screen Shot 2023-04-08 at 16.15.53

I’m certain you can figure this out…
Depending on your system and setup… I’m set to Not snap when holding Sh+Alt

Ahh that is a good idea. I will try to refine the notches. Say, how do you make those little videos? You are on linux as well iirc.

Regarding the non-closed trace: if I close it it deletes a segment somewhere else. It won’t let me complete the loop. I thought I read something about a setting for that.

I’m on a Mac.

I make Screen-Shot movies (using Mac’s QuickTime App).
Then, to reduce the File size for posting under Kicad’s 4M limit, I use HandBrake (free Open-Source app) to export an .mp4.
There are presets for usage-type and quality; I use the ‘Gmail’ preset because it makes a nice-enough file size and video.

Not completing the loop - hum, I know nothing about that as you can see from my posts wherein the copper is closed.
There may be a setting, I don’t remember the various pref panel’s contents… (It somewhat leans me to think it’s like a “walk around” setting. When in the PCB, click the Green Icon in top bar - it’s the PCB settings panel and not available elsewise (AFAIK)… You may find something to Click to solve your problem…

ADDED: When in PCB, the menubar > Route>Interactive Router Settings:

Yes, it was indeed the Interactive-Router-Settings dialog – the “Remove redundant track” box needs to be unchecked to allow the track to connect in a loop. I saw this before when I was trying to parallel a power trace between vias by drawing a track top and bottom, and it would only allow one. A kinda annoying default setting but good to know where it is hidden.

I was able to make a copper arc as you showed, but could find no way to give it a net. Perhaps there is a way. I gave up on that.

So then I just did an ugly hack, by drawing an inner arc on the edge cut layer, to force a real trace route to follow a channel. A rather granular-looking trace that needed some manual grid-off tidy up:

But I did finally get a perimeter trace route:

So, you want to make it a NET.… Best to plan Ahead.
This will show you how to do it, after Netting, delete the left-over lines (I didn’t delete them in video…)

Planning Ahead.… you could have simply Drawn Tracks and Netted them in One-Fell-Swoop.
You can use the Fillet Track tool (and, I think in v7 there’s a Radius ability - not sure. I’m staying with v6 for at least six months)

I had tried this before and could not seem to convert an arc to trace, but I tried it again and finally got it to work.

I created the arc on top copper, set the width, right-click, create-from-selection/create-tracks-from-selection, as I had tried before. Then I pressed E to edit but it was still an arc (even though I told it to create a track):

Previously, I just undid this as I thought it didn’t work. This time I dragged it out for some reason, and there were two. The one that was underneath was indeed a track:

Crazy. I have spent way more time on this than I expected, but learned some more kicad tricks and quirks along the way.

BTW, I did note your idea about using offset in cad to create smaller dxf outlines. I was totally baffled in freecad as I needed to combine all the dxf segments together and did not find a way to do that. I am sure freecad is powerful and useful, and plan to dig into it at some later time, but it is certainly not an intuitive program for getting started. I am more familiar with solidworks (which also has a non-trivial learning curve) with an offset tool I have used before, but did not have access to it this weekend. Then I tried librecad, and was able to combine the segments and create an offset outline pretty easily. I never continued down this path, but it could probably lead to another solution.

thanks for your help @BlackCoffee

1 Like

the convert tools always leave both the old object and the newly created object. The old object remains selected, so if you don’t want it you can just do convert and then immediately hit delete, before selecting anything else.

2 Likes

Good to know as this is a useful feature. Just wasn’t obvious that there were two entities.
thx

FreeCAD has pref’s to set (screenshot)… I used SolidWorks for years but, my version is from 2000! I didn’t re-install it when rebuilding my system as I find FreeCAD does everything I could do in SolidWorks (and, ProE, Inventor, CadKey…).

Sure, some experimenting and learning is part of the effort…

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.