Kicad footprint design: primitive 3D objects

In a parallel thread some altium users asked about the possibility to very easy and simply draw a polygone and extrude this to get a 3D-model for a footprint in less than a minute. Sadly this feature is currently waiting for implementation, upvoting these two gitlab issues may help: Support importing extruded 3D models from Altium PCB (#15058) · Issues · KiCad / KiCad Source Code / kicad · GitLab
and especially Generate simple 3D models inside KiCad / support extruded outlines and footprint height property (#3453) · Issues · KiCad / KiCad Source Code / kicad · GitLab

As long as this is not natively implemented but the user has a little bit imagination and or flexibility to use the existing tools at hand the following method provides a similar result with also very few knowledge in 3D design:

  • draw a simple 3D-cube with 1x1x1mm dimension (any 3D-cad programm allowed) and save as step file
  • draw the second often needed geometric shape: a simple 3D-cylinder with 1mm diameter and 1mm length and also save as step file
  • place both 3d model files somewhere in your generic kicad 3d-model directory (and remeber the path)
  • if you now want to design a new footprint and can’t get the original 3D-step file from the manufacturer (because of xxx-reason, or a very confidential agreement, or simply the internet connection is failing), then:
  • open the footprint properties dialog
  • open the panel for 3D-data
  • point the 3D-model path to the generic 3d-model (either the cube or the cylinder)
  • use the scale-values to get the desired size - either by just judging the picture (does the cube fit the silkscreen?) or by using the dimension numbers from the datasheet.

The picture + project below shows the achievable result. This method is as fast as the altium method, albeit not as comfortable.

project:
primitiv_cube_cylinder.zip (327.2 KB)

example picture:

additional note 1):
in the picture nr.3 the 3d-model points to a local path → the 3d model is placed as subfolder of the footprint itself.
advantage: copying/archiving the project includes the 3d model
disadvantage: the model can only reasonable be used with that footprint library - not reusable between different libraries.

additional note 2):
if you really can’t draw a 3D-cube/cylinder, use the model embedded in the example project

additional note 3): Thanks to some forum members who gave hints in the past regarding such a workflow.

1 Like

It’s easier than you think…

Kicad Exports STEP files of the PCB and the STEP Models that are placed on it.

If simply wanting a Model of a Shape, just draw it on Edge_Cut layer and Export it. Then, you can use it in a Footprint.

Further, if wanting to Tweak the STEP, you can Import it into your favorite CAD/Other Program and do your tweaks, then use it in Footprints.

Video below shows:
• Drawing a Shape
• Exporting STEP

• I could have gone directly to Importing into a Footprint but chose to Tweak it first (using FreeCAD).

• Then, I loaded Both the Original STEP and the Tweaked-STEP into Footprints…

Too simple and it took longer for me to type this post than it took to do the work…

Naturally, I could have included anything desired in the tweaking process…

And, I could have used a Kicad Stock-Part (a STEP, NOT a WRL) on the Shape and Exported the STEP…

EDIT: An Afterthought… I’ve posted this before but will add it here as an FYI…
Sometimes I use Kicad for Non-PCB reasons. Though I usually use FreeCAD to do my stuff for CNC-Milling, sometimes I’m lazy and/or want to not bother with FreeCAD for simple 2D Milling (meaning, no Shapely 3D-contours…).

An Example is for my Guitar Pickguards… I draw them in Kicad and generate the Gerber and use CopperCAM to Mill them… (screenshot after the Video).


2 Likes

the kicadsetup plugin of freecad can do it,very easy

Interesting, thanks for the tips.

The point of the “extruding” model system in those feature requests is that it would be still much easier to do this inside KiCad instead of needing FreeCAD and StepUp. I have used FC and SU and am thankful for both, but even after many years I stand behind my feature request.

1 Like