I’m trying exporting a PCB as VRML, though it seems that a few notable importers can’t read the generated files.
To avoid any issues with my designs or models I just created a test PCB with a few predefined components, but the results are the same.
This is an example from Win10 3D Builder, which is a quite good reader for 3D formats, however it tells me that “one or more objects have an invalid definition”, even though if initially it shows everything fine; if I accept to try fix it the results are totally wrong
The VRML file generated is the following TestSet.7z (17.0 KB)
I’m also giving the VRML files to my colleague working on SolidWorks, and he has the same results, objects definitions are invalid and I have to revert to STEP (which doesn’t preserve the nice colors).
Well, good question, as I didn’t contact Microsoft
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$
@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
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
@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
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).
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
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.
This post started become a mine of information to me
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 )
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.
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…