Problems with VRML export

What did 3D Builder say when you reported this problem to them?

Well, good question, as I didn’t contact Microsoft :smile:
As both 3D Builder and SolidWorks use VRML input, and they both fail in loading files from KiCad, I presumed that KiCad was somewhat wrong… But clearly I could be wrong (and both 3D Builder and SolidWorks), that’s possible.

In this while let’s turn the question to another route: can somebody mention a third party tool that successfully loads VRML from KiCad?
And hopefully is able to save it in another format as well…

open source
https://castle-engine.io/view3dscene.php
view3dscene is a viewer for many 3D model formats: glTF, X3D, VRML, Collada, 3DS, MD3, Wavefront OBJ, STL and (2D) Spine JSON and sprite sheets (in CGE, Cocos2d, Starling XML formats).
Edit: moreover no viewer issue on Print 3D of win$

1 Like

Well… Even Print 3D doesn’t work here, shows the same red square around the object when loading, then it “repairs” all the same way…

@maui I tried view3dscene, and it opens the file without any issue.
Then I tried saving it again in VRML, the result file size is different, so I assume it re-encoded it… without any luck: from 3D Builder/Print 3D still load the new file with the old issue :face_with_raised_eyebrow:
Didn’t try with SolidWorks this time, but I suspect to have the same results - BTW my goal is to exchange the colored 3D with my colleague that works on mechanical CAD

then you should stay on STEP model, not on vrml

2 Likes

@maui The definition you cite is exactly the reason for which, in this specific case, I preferred the VRML in place of the STEP: visual clarity of the real aspect of the assembled board.
Note: I’ve seen lately that IGES can do the same (colored parts), and looks more dimensionally accurate as STEP does, but I’ve no means to output in IGES format from KiCad :man_shrugging:

STEP does it in a more mechanical precision compared to vrml format

As an example take a drill hole defined in step. It might be defined as a direction vector, radius and depth of the hole. This means one can extract the true hole center, dimension, direction for use as the source for constrains and also to get manufacturing drawings made from it (one can tell that it has exactly that diameter with this depth)

Contrast this to wrl. here the hole does not really exist. The aproximated cylinder that was used to create it is not part of the file format. (that information is lost forever) All you have is a strange mesh that looks to the human eye as if there was a nicely drilled hole there. The file format does not contain information about its center, direction or radius. It only has a number of triangles that form that hole.

_

Moreover if your issue is the color, probably there is something in the process or in your models you are missing
Could you post a problematic example?

The example above is a good starting one. If from pcbnew I select a “File / Export… / Step…” what I get is the following
TestSet.step (230.4 KB)
Maybe I haven’t a good STEP viewer (advice?), but I can’t see any colored item or texture, and the same happened importing in SolidWorks.

In this example there are no models external to standard KiCad installation (in fact I found the random connector I chose had no model, and I didn’t intervene on this).

viewer + editor:
FreeCAD
or just viewer:
CAD-Assistant

2 Likes

@maui OK, I will try them as well.
Meanwhile I downloaded the STEP viewer from NIST
https://www.nist.gov/services-resources/software/step-file-analyzer-and-viewer
This pointed to: a) the STEP generated has colors(!) and b) it generates an X3D (then a VRML in disguise…) from the STEP :smile:

I made a few tests with CAD Assistant and it’s really nice to use, reads in the material/color from the STEP generated by KiCad, and I can export it to something read by 3D Builder (like .OBJ)
A plus: it can show a clipping plane of the objects, which is very handy with parts supplied by third parties.

Now the bad parts in STEP exporting…

  • There are no copper layers, pads, etc. - I understand that maybe in VRML they were just stamped over the board, but they can have a meaning in viewing
  • To be precise: there is no layer at all! This means I can’t see silkscreen, which can be quite important
  • Even worse: there are no vias, not even the hole to generate them

Looks like the STEP output can only give a faithful report on the overall dimensions - of the PCB at least, as for components you have to be very sure of the models used.
Well, in the end I’m a bit disappointed by these methods for 3D export in KiCad, as none of the two is completely satisfying :confused:

Have you tried using the step-up plugin for Freecad.
This can produce the output I believe you want with track and silk information in step format.

1 Like

As well as @Maui excellent StepUp, you might also look at this project if you need accurate copper detailing. This project produces accurate board models including the copper - it was originally designed to facilitate board milling but has also been used for FEM analysis.
Use it with Step Up to generate a complete board model.

1 Like

This post started become a mine of information to me :sweat_smile:
I installed latest FreeCAD that I hadn’t here + StepUp, and now things start becoming very interesting

@John_Pateman I’ll take a look at fcad_pcb as well, thanks

I use the step-up plugin all the time. (Thanks @maui :slight_smile: )
Took some getting used to and all my silk screen usually ended up miles from my board, but now I have the settings all sorted it works a treat and I can produce accurate .step files for our engineers really quickly.

3 Likes

That’s what happened to me as well, but it was easy: the silk DXF was in inches and the board in millimeters :sweat_smile:

One of the things I didn’t fix yet with KiCad StepUp: text on copper layers isn’t imported with “Add Tracks”?
I understand this is a bit far from original post…

It may be related to this issue:

if you scroll down on that post, maui also posted a possible workaround.

Copper text ATM is not imported as solid traces by ksu (it is simply skipped)…
my suggestion ATM is to replicate your text item to silk screen and import it as per the silks screen method.

1 Like