I have a bunch of STEP models exported from FreeCAD 0.18. Sometimes, the 3D viewer in KiCAD shows incorrect colors for an assigned model. The attached example shows, in KiCad incorrect colors (grey red red gold).
When I re-check my STEP file in FreeCAD it shows the correct colors (grey red green gold).
Can someone else verify this behaviour? I thought this might be a cache issue, but I’ve cleared 3D-related stuff from %APPDATA%, and I’ve deleted the 3d model association, saved the footprint and library, restart KiCad and re-do the 3d model association - no luck Paths are correct - I double-triple checked.
I’m sure it isn’t I’ve started learning FreeCAD because of the mechanical modeling of pcbs in enclosures, for which I need accurate models. Hence STEP.
But you do remind me to try a .wrl export from FC and see if the colors are correct. I can open the STEP file in Notepad++, but haven’t attempted to delve into the color values (appear to be alpha, r, g, b on a 0-1 scale).
Then again, I ‘expect(ed)’ KiCad to show the STEP model as I’ve exported (and re-imported) them from FC with the correct colors. There’s just something odd going on and I’d like to know why - maybe it’s a bug. So what does your 3d viewer say?
I came across your library before - it looks very good! - but because I wanted to parametrically create my parts, I decided to go traverse the hard path and learn FC and do it all myself.
That being said, I will look through that thread and your lib for more inspiration. I remember coming across a few pdfs with some technical details about the 3d viewer and wrl coloring, lighting etc.
Also, are you offering to ‘fix’ my source file in the same manner you’ve generated your library? The STEP file is attached in the first post, let me know if you want to .FcStd file.
I’m one of 3D Viewer developers, I’m offering that I will check if I can find any bug on 3D Viewer.
Also, if you want give me authorization for use your model, I can add it to my library and generate all the color ring references.
As @Rene_Poschl suggested above, as workaround you can use your FC model to generate both STEP & WRL files… then use wrl in KiCAD but place both in your 3d lib folder.
.step will be used for STEP exporting, but .wrl will be catch for KiCAD 3d viewer, keeping all colors.
But the step model does not need the colours of the rings. Meaning this is completely unnecessary for this usecase.
This is why one typically has a wrl model for rendering (should one need it) and one for exporting to freecad or some other cad.
Remember that these rings add quite a lot of additional information to the step file. If you then include quite a few of them in your pcb and then for example have your pcb combined with other complex pcbs then you might discover that your mechanical cad program (freecad) will slow down quite a bit. So my tip: keep the step models simple but good enough to identify which parts they are (so a plain resistor without rings should do here)
I am yet to see someone who does complex designs and still cares about the resistor ring colors.
That does not invalidate your warning in any way though.
yeah, explain to me what exactly I need WRL for though.
I use STEP exclusively in KiCAD and Solidworks, and barring weird bugs like this one, it does everything needed. I don’t want some silly VR crap obscuring my real models.
wrl allows you to define shader colours which is needed for making much more realistic renderings than you would ever get from the flat single colour model of step.
Also wrl is a surface mesh model which can be directly used by rendering engines and therefore allows much more complex models to render much faster. Graphics cards are also optimised for this (because games use this type of modeling)
Also note that we are not excusing kicads bug. We are telling the user that there simply is a difference in which format is best used for which usecase.
Hi Jules,
Could you report a with that STEP file added and screenshots on https://bugs.launchpad.net/kicad/+filebug
I looked into the issue but I have no knowledge on the STEP standard so I couldn’t understand where the issue comes from.