The 3D viewer shows a nice generated texture on the PCB depicting the traces and silkscreen markings, etc. However when I export a STEP file the PCB has no coloring at all. Is there a way to export a CAD model of my board with these colors and markings shown?
You should check out @maui’s Kicad StepUp Workbench for Freecad if you haven’t already. Generally, the copper, silkscreen, etc. are not exported to the STEP because the PCB assembly will end up having more detail than the whole rest of a subsequent mechanical assembly and really slow down the MCAD tool. However, there is an old thread on importing the full PCB into Freecad:
I don’t think this is any help to me since I use SolidWorks, not FreeCAD.
Is there not even any way to extract the image texture that is shown on the board in the 3D viewer? My current workflow is taking a screenshot in orthographic view in the 3D view and applying that as a decal in SolidWorks but that is extremely tedious to manually crop and apply.
It feels really weird that KiCAD will happily show me the board in 3D exactly how I would like it, but offers no way to export that to a usable CAD format exactly how it is shown.
EDIT: this question/problem is not about KiCad’s capabilities, but about 3D file formats and their purposes and limitations.
Some people have made beautiful renders of KiCad projects in Blender. Shadows and light effects were added by Blender, but I don’t know where they get the colors from.
I have even seen a render of a PCB including the solder fillets, but that was not a KiCad project.
I’ve been using this method for fast previews without needing to import and export larger models multiple times. I’ve sped up the process a lot by using transparency and auto-cropping:
- set the 3D viewer background colours to all black (RGB 0, 0, 0)
- disable 3D axis indicator (in the preferences menu)
- export current view as PNG
- open PNGs in gimp, Layer/Transparency/Colour to Alpha: colour 000000, both thresholds 0,0; Image/Crop to Content; re-export
- apply as decal in SolidWorks, mirror as necessary, set height and width to auto (I forgot the exact name of this option)
I haven’t had to do any manual work or adjustments, even for rather complex outlines and holes.
I export to wrl if I want to see the realistic card.
The problem that the cad software I use allows you to load wrls but the insertion in an assembly is problematic since it does not make reference faces available.
You can save yourself by adding XYZ plans by exporting wrl with card center origin.
So that you can use those plans to align the pcb to the assembly.
There is a problem in kicad that I have reported on gitlab: when you save with origin in the center of the card if there are objects of any type outside the edge-cut outline they are considered elements of the card by moving the origin of the pcb with respect to its center.
This is the link to the problem : pcbnew-> Export origin card in wrl does not consider the edge-cut edge. (#11725) · Issues · KiCad / KiCad Source Code / kicad · GitLab
The photos on the card are from inside the mechanical cad.
The tracks and the vias are not traced but I think they are not exported but I am not sure.
You should have an export entry for the 3d file inside the 3d kicad viewer which exports exactly what is visible on the screen and with the same transparencies.
Only the wrl type would be enough.
In the wrl file there are all the objects:
you should give the suggestion a bit more chance…
FreeCAD can export to STEP, so things added to a FreeCAD document can be exported to STEP and then imported in SW…
If your target is just rendering, wrl is your best option… if MCAD is instead your target, what @aaron suggested is a viable option
This might help
I’ve open an issue at gitlab both for export png with transparent background and auto-size of image to PCB or PCB+3D models size
feel free to add comments there
@kammutierspule do you think this could be feasible?
To be used as a texture, I’m thinking that a better option would be to generate gerbers as SVG and convert it to a image file (eg png). That probably can be automated and you will get better results.
Someone can also create a tool, that creates normal maps / height maps (based on layers) to be used on 3D rendering softwares.
but gerbers to svg would need to be assembled and colored and aligned etc…
a way to get the 3d rendering with at least transparent background would help a lot
This looks like exactly what I’m going for but I can’t seem to get it to work, I get a “user-defined type not defined” error on line 889 when I run it. Do you use this macro yourself?
Yea I was 9 year ago. Solid work may had change its api. Or something in your input that I had not accounted for. I haven’t able to actively up date it.
You can use FreeCAD (perhaps others) to overlay a Textured Image. In FreeCAD, it’s only temporary while in the Texture-Mapping tool but, if your goal is for Photos, perhaps it’s all you need…
You can also use Inkscape to overly and the Image will remain as you want. Of course, it’s only an image…
Example of Wood Texture…
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.