How to share step 3D model with all the components on the PCB too?

Hi,

Someone requires a 3D model of the board I working on, they asked for a .step file.
After trying various things for 2 hrs I gave up and sent the person a .wrl, .emn and .anything else I could export.
Unfortunately he cant open these uncommon formats in MCAD, he needs step or IGES format.

Additionally it seems the .wrl file only creates a file with the PCB (from what I can see from opening it freecad), no components.

Question 1:
How do you create a 3D file which contains the components too?

So having tried opening the .kicad_pcb in FreeCAD-PCB… All I got was about 10% of the board, some pads and silkscreen text nothing else.

I tried opening the .wrl model in FreeCAD-PCB, the board looks nice but has no components. I tried to just export that as step file and it says "… is not a shape, export will be ignored… google it and got this… "You have to convert the STL file to a shape before you try to convert it to IGES etc… First open the mesh (stl) file, you then have to “create a shape from mesh” (Part Workbench, Part menu, 6th item down).
" But the create shape from a mesh option is greyed out for me… so dead end there.

Second approach…
I tried KiCad Step-Up to export a step file. When I run:
“C:\Program Files\FreeCAD 0.15\bin\FreeCAD.exe” kicad-StepUp-tools.FCMacro MyProjectName

I get a bunch errors saying…
missing modules(s)…
e.g.
C:\Program Files\KiCad\share\kicad\modules\packages3d\Diodes_SMD.3dshapes\SMC_Standard.step
But it exists but as .wrl file. Don’t know why its assuming a .step file?
Click okay and only a PCB outline load, not even a silkscreen.

So I can’t export board with components, or convert it to a common step or iges format. I feel when I follow tutorials I end up getting nowhere. I think it would be really great if KiCAD step up could be incorporated into the main build.
Mere mortals such as myself get nowhere trying to use these scripts.

Question 2:
How to convert a KiCAD 3D file to step up?

Thanks for any help!

@maui should be able to help you.

Yeah, wondering where he is… :smile:

You don’t.
@mangelozzi, StepUp relies on STEP models of every VRML model that KiCAD uses. StepUp can’t convert anything… it ‘just’ takes the information from KiCAD where and what stuff is and creates a STEP assembly from the STEP models afaik.
@maui is currently building up a STEP/VRML library for this purpose and the final goal of getting rid of the VRML stuff some day, together with @cbernardo and @kammutierspule (and probably others) … years away though.
So yeah, wait for @maui and maybe search on the forums for StepUp related threads as he tutored a couple of people through the setup process and got them running.

hi @mangelozzi
please have a look at this topic
http://www.eevblog.com/forum/kicad/kicad-photo-realistic-3d-rendering/msg893375/#msg893375
there are some nice info on ECAD MCAD co-Design
http://www.prostep.org/fileadmin/freie_downloads/Guidlines-UseCases/UseCases/ProSTEP-iViP_Use-Case_ECAD-MCAD-Collaboration_1.0.pdf

1 Like

With the 3D work that Mario and I are doing you can now view STEP files within KiCad. Once our work is merged with the main branch I expect VRML to go the way of the Dodo. However, anyone who wants to export STEP will need to use Maurice’s kicad StepUp. The MCAD export (except for the existing IDF export) is at least 1 year away. There’s an enormous code refactoring to be done on pcbnew. Even this 3D stuff required so much rework; I originally thought it would be a matter of weeks but it took over 8 months so far.

1 Like

I use Maurice’s KiCad StepUp script a lot, and it works quite well.

3 Likes

For the KiCad StepUp script to work, you need identical 3D models of each footprint - in .wrl format and in .step format - with both having exactly the same name.

@Anool
thank you for sharing your nice artwork :smiley:
I’m happy to see that also breaking holes (mouse bites) are created correctly on the pcb board in MCAD (as they will be if there were castellated pads)
thanks a lot to @Joan_Sparky for having shared his board with me, that I tested to improve my StepUp tools


@mangelozzi
with kicad StepUp it is also possible to export the STEP ( stp ) and VRML of the full assembly pcb and parts to have a 3D mechanical model to be used in a multi boards project, for mechanical collisions and interference checking as in the following example (main board plus add-on daughterboard)

1 Like

Hi Anool, oh I see there in lies the problem. Does one get a converter that can batch convert one’s whole kicad library to .step files?

I use FreeCAD to convert .step files to .wrl (using Maurice’s script so the orientation/scale etc are preserved).
Am not aware of a Batch Converter.

there is no way to convert VRML model to STEP with a clean result…
the only way is to have a STEP 3D library and from that do the conversion to VRML
I made already some out of the box libraries to be used just as a substitute of official 3D vrml libraries







have a look at the kicad StepUp Starter Guide
https://sourceforge.net/projects/kicadstepup/files/kicadStepUp-starter-Guide.pdf/download
kicad to MCAD workflow
kicad-StepUp-workflow.pdf (198.2 KB)
and, as I suggested in a different post, please have a read at this ‘long’ topic
https://forum.kicad.info/t/3d-new-library-for-mechanical-cad-exporting-and-enclosure-design
you can get a lot of useful info and many 3D STEP and VRML models thanks also to @Joan_Sparky nice work!
All VRML models not exported from a MCAD or STEP model are useless in terms of mechanical integration
I’m sorry, but MCAD road requires a bit of homework :wink:
… but it will give you a great improvement in pcb designing and mechanical co-design :smile:
Maurice

Like you, @mangelozzi, I spent some time figuring it all out, with a lot of very generous help from Maurice and Joan :wink:

As you’ve discovered, with the VRML models, you get the basic “KiCAD only” version:

But once you set up your equivalent Step models, you can then put your PCB assemblies together in MCAD packages and from there do rendering to end up with some pretty realistic looking things :slightly_smiling:

It’s really worth persevering :smiley:

5 Likes

@xavierw
thanks a lot for sharing your nice artwork!
I’m very happy to see my kicad StepUp code in action :smile:

1 Like

Nice stuff @xavierw, really cool looking. Thx for sharing!

No problem - whatever little I can give back to the help I get on here, it’s more than worth it!
The only thing I’d like to figure out how to do is improve the silkscreen layer. Although you can see it debossed, it’s still the same colour as the PCB and I cannot assign it a different one (easily) because the debossing is “part of the PCB” and doesn’t come across as a different entity allowing colour / materials to be assigned to it.

Maybe I could somehow have an export of the silkscreen layer as a graphic (bitmap) and then stick it back on as a label. That would produce the best looking results I think.

Nice renders @xavierw which tool did you use to make that renders?

there are two options:
The first one is to add a texture to your board
a) export the Front Silk gerber file with pcbnew (you can replicate it also for front Cu)
b) convert gerber to png with gerbv (https://sourceforge.net/projects/gerbv/files/gerbv/gerbv-beta/)
c) set transparent background for the png
d) use the png as texture for your board (this works in FreeCAD)
The second one is more tricky
a) set pcb thickness to 0.1 (design rules-> layer setup-> board thickness)
b) export VRML from pcbnew
c) remove your shapes3D folder or move the file to a different place
d) import this VRML (pcb, tracks, silk) in your MCAD and put it over the board (this works in FreeCAD)
@xavierw please let me know if one of these can work for you

it should be PTC Creo (ProE)

Maurice

1 Like

First time I am hearing about that software. Looks powerful.

Just getting to this topic a few days late, but those are some killer renderings!

@xavierw those look stunning, well Done! :heart_eyes:
@maui thanks for your amazing work with KiCAD step up! That is so great! :clap::clap::dizzy:

I will have to have a second try with KiCAD stepup this weekend. I have downloaded the kicad step library… I really hope theres primitive shapes in it (but can them with FreeCAD I hope).

Thanks for all the help guys!!! :smile: