Export 3D Model with Silkscreen

Hi, I am looking to export a 3D model of my PCB that includes the graphical silkscreen and soldermask layers. Essentially what I want is to export the thing that ‘View > 3D Viewer’ shows me into a file that can be viewed an edited in various 3D modeling programs.

I’ve found the option to export a STEP file in PCB new, which works alright, but it doesn’t appear to include any graphical layers, I just get the raw board outline and whatever components have associated 3D models.

Any way I can include the graphical layers in the export? Or failing that, are there any potential workarounds where I can export the graphical layers in another format and add them to the 3D model in another program?

I think you used the direct .step export from Pcbnew?

Maybe you can have a look at the StepUp workbench in FreeCAD. It apparently a quite powerful wrokbench, but I have not used it much myself. I did have a few little sniffs at it and I do know that it can import copper layers, although it does not do that by default and it is a separate step. I assume it can also work with SilkScreen.
FreeCAD can also export a .step 3D model.

1 Like

I think you used the direct .step export from Pcbnew?

Yeah, as I said in my original message, I’ve been using the direct .step export from Pcbnew. It just exports the board outline and the component 3d models. My question is about how I can get this to export silkscreen graphics as well, or how I can export silkscreen graphics separately in a format I can later add to the step file in a cad program.

Maybe you can have a look at the StepUp workbench in FreeCAD.

Also been messing with this some, it’s not the most convenient or well-documented process so I was hoping to avoid it if possible. Might look into it more though if a solution within KiCad doesn’t present itself.

If anyone can confirm / deny whether StepUp can work with silkscreen + solder mask layers that would be really helpful. It’d be great to know in advance if this is possible before sinking time into a potential blind alley.

yes, stepup can do traces and silkscreen. kicad does not.

whatever you do is going to be a bit of a hack as STEP is meant for mechanical work and doesn’t support graphical texturing, so you need to “extrude” the silk so it has some thickness beyond the board surface. you could do this by hand by plotting your layers as SVG/DXF and importing into your CAD.

The easiest thing is to export .WRL which gives a visually correct version of the board.

1 Like
1 Like

What export option you should choose will depend on what you plan to do with the final product. If you want to make pictures in a program like blender then you will be best served exporting wrl. If you want to have the detailed model in a CAD system then the route via freecad and stepup is the way to go.

Assuming it is the latter then I suggest you carefully analyse if you really need silk and other details in it as it will increase the model complexity and therefore limit where you can use the model (if you just have a few other components around it then it should be fine. If you want to insert it into the model of lets say a full car then you might want to be a bit more conservative with what level of detail you include)

I make art using the silkscreen and soldermask layer on PCBs, as well as through hole components. The idea here is to make a digital version of my pieces that I can share on the internet as part of my portfolio.

I tried exporting the .wrl in KiCad, it looks good in blender, except for the fact that it’s all one color and that it doesn’t include any of the silkscreen or soldermask details. Since I’m doing this to share PCB art that kind of misses out on the main point. Not sure if there’s a way to change this, but the export dialogue doesn’t seem to give any options to this effect. Please advise as to whether it’s possible to include these details, otherwise I need to figure out another export workflow.

WRL looks correct in freecad and has all the details and colors. So maybe you need to pass it through that.

WRL looks correct in freecad and has all the details and colors. So maybe you need to pass it through that.

Okay, yeah I’m seeing that now that I open the file in Freecad. It shows up as a green pcb with a white silkscreen tho, whereas my colors in KiCad were white pcb with a black silkscreen. Is there any way to set this? This will pretty much be perfect if that option is accessible.

It also leaves off my soldermask details. Is there any way to fix this? Otherwise love this option, seems very smooth.

freecad’s kicad stepup plugin can import all board elements and you can edit the properties of all of them individually (traces, silkscreen, board shape). This is what I use for mechanical design of enclosures all the time, but I’ve not tried passing that on to blender yet. The colors in kicad are only used by the 3d viewer, I don’t think there’s a way to export them unfortunately. That said, when I open the wrl in blender it does seem to load a whole lot of entities, and at least the traces are a separate thing, so maybe the silkscreen is too. I’m in the middle of something and can’t check right now, but maybe that’s the path to investigate.

you may have a look at

Moreover, if you have a wordpress site, I’ve made two useful plugins:


Edit:
Also FreeCAD can export a 3D model to a self containing xhtml file… here a sample:
https://easyw.github.io/FC-videos/3d-html.xhtml

2 Likes

you may have a look at

Wow, this is awesome! Exactly what I’m looking for, this pretty much sells me on the .wrl export option.

I’ve downloaded the code and got it working with my own .wrl file, looking really good.

The only remaining issue is that my soldermask graphics don’t show up in the .wrl export, or are tied to the color of another object. Any idea how I can fix this? If I can fix this issue this will be exactly the thing I need.

Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.