Kicad's 3D viewer as a standalone binary? Doable?


I really love the new kicad’s 3D viewer. One o the best viewer for step models in GNU/Linux. Is it an easy task to create a standalone binary from kicad’s code for the 3D viewer?

Ideally I would love to see it as a viewer that is able to open multiple 3D models, scale them and move them around. Exactly as Kicad does.


The 3D viewer is a viewer, you can’t move components.

But you can export the design to step in pcbnew. File -> Export -> Step

Then, open the stp file with freecad and move the components as you like.


FreeCAD does that already?


I don;t like Freecad. It is to complicated for simple actions.


I’ve found that -all- 3D CAD programs are like that.


Yes. But all programs in GNU/Linux is a sort list. :smiley: So there is room for a simple viewer that can manipulate models.


what do you mean with manipulate? 3d viewer is just a very good viewer, not an editor at all.
scaling is really not suggested for mechanical models…

with FreeCAD you can just open a model and zoom fit, then modify the placement x,y,z to move it around…
this will require a very basic knowledge of the sw…
for more features you need to learn in general a Mechanical CAD

in Linux you can have a look at Varicad Viewer (free, not open source, a registration is required to download the package)


Hi @firewalker,

The 3D Viewer is just a “viewer”, the part that is transforming the 3D shapes from “Pcbnew” (Footprint editor KiCad’s application)
It would be too complicated to split it as a standalone. Also the result would be less useful than what the current one is.

From my experience I think about 2 days of learning you will be able to do cool stuff with FreeCAD.

EDIT: btw, the think I miss for KiCad is a standalone footprint viewer.


I can create ilustrations with 3D models in kicad that looks really grate. Combine various models (wrl, step), scale them. move them around, and in minutes the results is really nice.

I am not referring to the mechanical aspect of a 3d model. Just to create nice images. For real mechanical thigs FreeCad and Varicad are the way to go (I use Varicadview for now).


In my experience, what starts off as a simple viewer feature creeps until it is a complete editor… however, I would quite like something similar to OpenSCAD that works with WRL, STEP models.

There are several parts of KiCad that would make useful standalone tools, I don’t think the devs imagined those use cases. The trend for KiCad is closer integration. Indeed, previously people used the tools separately, and they have lost some of that ability. (e.g. just run eeschema as a drawing tool, or just pcbnew for layout).

I think it would be quite some work to split out parts, and maintaining them would be “swimming against the tide”.


Does OpenSCAD work with STEP? I didn’t know that…

in general if you need to scale a 3d model, it means you have a wrong model, not reliable for a mechanical assembly, and then also the graphical result would be inaccurate…
I would start with a good 3d library, all in scale 1:1 in mm and from it, generating nice rendering and/or mechanical assembly…
And may be you would be interested in using Virtual attribute for mechanical models, so to toggle them OFF/ON just using ‘V’ shortcut in 3d viewer


Sorry, I missed a qualifier there that indicates “future-conditional” tense! Currently, OpenSCAD can import a few mesh formats. STEP import is just my dream…

In general, it depends. In the specific case of passing a model to manufacturing, they will laugh at you if you have scaled a model to fit. But if the audience is marketing, or a even a non-technical client, to show “this is roughly what the product will look like”, then they won’t even notice parts are wrongly scaled. “A picture is worth a thousand words” and all that - only for manufacturing you still need the thousand words.


How do we add virtual models?


you may find useful CadQuery and CadQuery FreeCAD Module
Their interface is python


note: available only in nigthly


In your case box1 is what? A foot print with the outline of the box?


It can be a completely empty footprint. It is just used as an holder for a 3D shape.
But yes, if you want for design proposes you can draw something on a layer to guide the placement of the footprint on the PCB. The footprint must be added always somewhere on the PCB, the rendering will be relative to its XY position on the board.


I normally use an anchor like a footprint for a drill hole with a pad or a simple NPTH drill, and I align the 3D model to this footprint using StepUp and FreeCAD :wink:


And some of us are struggling with the basics of LibreCAD, a 2-D program.


I am running version 4.0.6 of PCBNew (Windows 64) and when I use the 3D viewer, I can only export PNG or JPG files.
Is there a new version that can export STEP files?