Stepup Generated Footprint - Incorrect Copper

Hi All,

I’m having some trouble getting the results I expect when I export a footprint from FreeCAD using the “ksu Footprint Generator” option. Specifically, the copper placement does not stay within the bounding volume on the “Pads_Poly” sketch.

My sketch is based on the “footprint-RF-antenna” demo, which exports as expected. Below is a screen capture of my FreeCAD sketch:

The KiCAD footprint editor ends up with the following footprint:

As for debugging steps, I have tried the following:

  • Run the Sketcher validation tool and had no issued detected.
  • Checked the “Pads_TH_SMD” are entirely within the “Pads_Poly” volume.
  • Checked the reference pad is within the volume on the “Pads_Poly” and a pad on the “Pads_TH_SMD” layer.
  • Confirmed the volume is completely closed by changing the geometry, extruding in FreeCAD, etc.
  • Enlarged the geometry of the footprint’s features in case there was a minimum size set somewhere.
  • Find and read any documentation on footprint sketching and export, but haven’t had much luck there.

At this point I’m at a but of a loss as to what is going wrong, and couldn’t find (searching & browsing) a similar issue on these forums or using google, so ANY help or ideas is appreciated.

Using version 0.18.4 of FreeCAD with most recent KSU and KiCAD 5.1.5 on Windows 10 64-bit.

Finally, a huge thanks to KiCAD and all the lovely plugin developers.

Cheers
-Doug

Hi @DougSt
your antenna is a bit too complex for the script used with the conversion from sketch to kicad…
I would suggest to see if Qucs-RFlayout may help in your user case.
Useful tips also here:
KiCAD: RF Designing Tips

2 Likes

Thanks for your help!

I’ll play with the geometry a bit and see what the limitations of the KSU export script are and if I can work around them. Just for reference, I was using KSU as the layout of the spiral is completely parametric, and I could reform it instantly changing a few constraints. Pretty powerful and useful tool to have.

EDIT: It seems that the KSU footprint export plugin is really sensitive to something in my drawing, however all I have is lines and very simple constraints, so that’s quite confusing. Here’s an image of a really simple geometry causing it to go nuts:

Will give it a bit more time to develop :slight_smile:

The Qucs RF Layout plugin looks fantastic as well, so will have a play.

Thanks again,
-Doug

Would you please post your FC file? I would like to play with it

Perhaps take a look at the connecting of lines.
Your image shows a black dot an the corner miters - to me that indicates a break in the line… I could be wrong…

Screen Shot 2020-07-30 at 11.03.42 AM

Apologies for the slow reply, has been a busy week at work.

Attached is the FC file.spiral_antenna_broken.FCStd (7.9 KB)

I thought the same thing, where I used coincidental constraints on each of the joints between lines and tested each of the line ends to be constrained properly.

I also ran the KSu’s “sketch validation” tool to check for open vertexes, invalid constraints, etc. All checks were successful.

I found nothing wrong with your file.
I created a look-alike file and had similar problem.

That leads me to confirm by opinion about plugins in open-source programs…

An alternate two-minute approach is to:
• Draw the shape with transparent background in a Graphic program, save it as .PNG.
• Open Kicad’s Bitmap Converter (the icon at top of main panel)
Set export to pcbnew and user_eco layer. It exports a .mod file.
• In PCBnew, Add/place a footprint and select your new .mod file
• Double-Click it on the PCB, select ‘Edit Footprint’
Change the Layer from user-eco to desired copper layer.
Add a THT or SMD pad.
Draw a Silk-screen and Courtyard graphic as desired (I didn’t bother to do this)

Save it and use it… Example below

[Edit] added the png graphic - it’s a solid line - no offset lines.


uncle

Thanks so much for the response and your efforts. It’s good to know you could replicate the behaviour on your own file.

The reason I used FreeCad was I wanted to be able to quickly change the geometry of the footprint in question, where this square shape was just a first pass and things were going to get more complex from there.

Based on your recommendation of using an image file, I might just write an Octave script that generates the .PNG file.

Thanks again for your help.
-Doug

Should have mentioned:

I also loaded the Antenna demo - footprint exported correctly.

I edited the antenna shape with a very simple shape. It did not export well… Go ahead and try it with the simplest of shapes and see if you can dial it in (or use PNG.).

[EDIT] Wanted to try something:

Edited the Demo with a minimal tweak - it worked (Hack 1).
Edited the Demo with narrower lengths - didn’t like it.
Edited the Demo with various length tweaks - didn’t like.

screenshot of the tweaks (I’m a FreeCad expert and assure you, nothing wrong with my file).

I’m done…

Hi,
I just made a similar FC antenna file and I succeeded in exporting it
spiral_antenna.FCStd (8.5 KB) rf-antenna.kicad_mod (1.5 KB)
Best results using the FC polyline tool in sketcher
FC-polyline

2 Likes

Thanks BlackCoffee and Maui for the digging on the capabilities and limitations. Interesting using a polyline sketch helped the export tool, I probably should have figured that out for myself :grimacing:

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