KiCad StepUp: The Sketcher for Footprint generation

I have something usable…
I need to clean up the code and I will update the WB

3 Likes

Looks pretty good, though I’m wondering, the waveguide opening looks like it was completely cut away and the copper is hanging in mid-air. This is not possible. The substrate should be continuous, the dxf is basically only showing the copper outlines, not the border of the PCB necessarily (except for the screw holes).

@dom11990 No prob, it wiil be without the internal hole.

Regarding the net-tie I would prefer to create the model as pads which will respect DRCs.
A small net-tie fp can then added to consent the connection between the main RF FP and the rest of the circuit (as in my uploaded design).
A large net tie zone may lead to error prone design.

BTW it seems the DRC trick is done only by a polygon filled element and not by the fp tag.
Polygon works just fine in 5.1 and 5.99

@maui was there any special process to create that footprint? You mentioned updating the WB, what changed? Let me know when you pushed an update and I’d be happy to try another similar design I have for a differential microstrip to waveguide transition.

I’m still having trouble consistently exporting “good” footprints from a step file. When I click on the sketch and hit the “Sketcher Validate” button it says there are open vertices. What does this mean? That the shape is not enclosed? All vertices highlighted have coincident constraints.I feel like there may be a bug…
Hairpin-Mixer-Wide-Mask.FCStd (39.5 KB)

I’ ll have a look at the file.
BTW Give me few days and I will release a new WB version.

1 Like

FreeCAD is continually being changed in subtle ways. It is quite common to have perfect sketches in some older version of FreeCAD, and then in the newer version there are some errors in Sketches (Usually over constrained).

@dom11990
Please post also your FC info version

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

@dom11990
would you mind to post the step file?

Hairpin-Wide-Mask.stp (439.3 KB)

It is a little tricky. There are two structures. You want the inner one for the copper, the outer lines form the PCB ENIG finish so you can delete those (as I did in my fc file).

1 Like

in your FC file you have SOLID004 and SOLID010 which are almost doubled (I suppose you forgot to delete the outer lines form the PCB ENIG finish)
Anyway I’ve improved all the algos.
In few days I’ll update the Wb

I don’t see how I keep making these mistakes! Maybe it would be helpful to detect this (multiple vertices within a certain configurable distance) automatically and give dumb users like myself a helpful warning? haha

2 Likes

I have uploaded the new ksu release… here some of the new features:

  1. Sketcher_CreatePolyline-RFa tool to generate a PolyLine Sketch of a ‘contour’ of a shape, even if the shape has internal edges, to facilitate the process to convert CST RF geometries to KiCAD footprint (improved to work both on STEP and DXF)

  2. exportFootprint new functions added to convert a FreeCAD geometry to a KiCAD footprint:
    A. NetTie_Poly sketch to generate NetTie footprint poligons to solve advanced RF layout design
    B. F.Cu and B.Cu option available for NetTie_Poly and Pads_Poly sketches
    C. PTH_Drills and NPTH_Drills sketches for automatic converting circles made of arcs to footprint pads and drills (this often comes from a CST generated STEP file to a 2D projection)
    D. PTH_Drills: option to assign a specific pad number to a bunch of pads (generated vias) of the footprint (useful with a via shielding in RF fp)
    E. sample file for Stub filter, Microstrip filter, Power splitter, Transition with Antenna waveguide on Demo Menu StepUp folder.

Let me know how it will go.

here the generated footprints:
splitter-fp.kicad_mod (21.3 KB)
hairpin-fp.kicad_mod (5.8 KB)
Notch-wNT-fp.kicad_mod (2.3 KB)
TwA-fp.kicad_mod (23.2 KB)

4 Likes

Many different Pref’s for various aspects of work… it takes trying things and making good notes…

To get a clean import, consider setting your pref’s as shown below. Screen shots show the difference between using Legacy and Not Using Legacy Python Import…

[Edit] …oh, don’t forget to explore the same panel for ‘Step’ settings…

all suggested preferences are in kicadStepUp-cheat-sheet.pdf

2 Likes

@maui Couple questions. I’ve been experimenting with the ksu plugin and noticed a couple things I am not sure I fully understand.

First, if I sketch an arc in FreeCAD and label the sketch “Pads_Poly” and export the sketch into a Kicad footprint, the arcs are formed by small straight line segments (first shot below). Kicad custom pad primitives include arcs and circles (second shot below) so I was wondering why the arcs are rendered as line segments instead of true arcs and circles?

Screen Shot 2021-09-04 at 12.29.53 PM

Second, I noticed in one of the examples (complex-Polyline-footprint) a layer called “Pads_Poly_Arc”. What does this label refer to? I could not find the definition in kicadStepUptools.py.

Third, with regards to the recent changes to add bottom copper. Would it be possible to also include inner copper layers (In1.Cu, In2.Cu, etc)? Kicad does show inner copper layers for footprints though you have to edit the file manually.

A polyline Pad in kicad is done only by segments and not by arcs. StepUp discretize Arcs to Segments to easily create a shaped contour pad into a kicad_mod polyline pad.

Kicad primitives cannot be used to form a closed filled shape.
KSU ATM is supporting only circle custom geometry (as it is available in the demo samples).

it is a shape with a complex contour including arcs; arcs will be discretized to polylines.

ATM only F.Cu and B.Cu are supported and only for polygon and net tie pads.
All the footprint generated by ksu will need a manual editing process to get an usable fp.
Ksu is aimed to simplify the process related to model complex shapes or pads.

For the net tie pads, that is what I am using it for. It would be helpful if we could create an inner layer as well.

Regarding the pad numbering, is there any reason not to assign a default numbering to the pads instead of a hash character?

a single sketch could contain more than a pad and ATM there is no way to assign a different number to each pad.
An automatic way would lead to a risky zone… I had preferred to leave the numbering to kicad fp editor.