Stack of PCBs for verifications

Hello everyone, (Not sure I’m on right place …) So, I have a question about the possibility of showing an assembly of PCBs with the 3D tool. When I stack 2 PCBs on top of each other, the tool mixes the two PCBs.
An example, 2 PCBs :


3D view :

On PCBNew I stack both :smiley:


3D view :

I would like to know if there is a solution to tell him that they go on top of each other, with spacing, this to determine if a mechanical problem of assembly and possible to correct before finalizing the project. The packaging is often put aside but it is nonetheless important, if it is not good, everything must be redone … I would like to have your opinions on the subject and your suggestions!
Thank you.
Vincent.

I think it would be better to design them separately and then assemble in other CAD software, like FreeCAD.

Or you can design one of them (probably the upper one) and then make it a module (a symbol, footprint and STEP model exported from KiCad and then put it on the other PCB design.

Here, you are mixing things which will be very difficult to validate.

4 Likes

To answer that directly, no there isn’t.
PCBnew works on the premise that the layout is ONE board.
For solutions @MuratUrsavas gave you the common options.

Thanks MuratUrsavas, searching a solution from my side I found a Github with some python script to import layers into Freecad. This is joining the post from omjanger : Import Kicad boards in Freecad PCB.

StepUp for Freecad is what you need. It is well tested, comprehensive and well supported.

Thanks John, at this point I still don’t know what the best tool to do this is. On the one hand I saw a presentation with FreeCAD-PCB, you propose StepUp which seems good but complicated to implement. It is based on macros usable with Freecad. FreeCAD-PCB is an AddOn which seems easier to start. I installed FreeCAD and will be testing it. Thanks for the ideas. Vincent

I second StepUp also as the defacto tool for importing KiCAD models in FreeCAD, it is also an add-on for FreeCAD, so you need only too add the workbench and you are ready to go, it is (very) well supported and actively being developed.

Good luck !

1 Like

Though I do remember recently someone was looking for importing traces (I think for some sort of stress analysis) from KiCAD to FreeCAD and the author of StepUp suggested using FreeCAD-PCB since that plugin does a better job then StepUp for that one specific usecase.

Mmm not sure if we are talking about the same workbench, AFAIK maui recommended this workbench:

to make analysis in the copper, KSU however, uses it internally, but just for the top and bottom copper.

My bad. I mis-remembered. I knew, though, that he did recommend a different workbench instead of insisting that his workbench was the best for all situations. Integrity like that always impresses me.

I do this all the time. Choose one board as the “mother”. Create a module for the other board (now the daughter). Separately export the daughter board as a complete 3d image (Kicad can do this) and point to it with the new module you created. Now include the new daughter module on the mother board as if it were any other component.

1 Like

this has been solved here:

Thanks Xenomorph, interesting, how can you export a PCB board as 3D image ?
under PCB-Editor I try to export board as .step :


Then in Freecad when I open the file nothing visible ?!!?

I’m able to load separately both boards, under Freecad using StepUp :


with .kicad_pcb files, but probably I miss some thinks !

you may have a look at:


To see the imported step, be sure to select the correct Item in the tree and set Visibility to True.

Note: You can do quite a bit without using StepUp. However, one nice feature of StepUp is the ability to load the Traces.

But, you can load traces without StepUp too.
Export the traces as DXF then, import into FreeCad then, using ‘Part’ workbench, “Make Face From Wires”. I do it both ways, depending on it’s usage… This way is less prone to error/crashing when DXF’s have many redundant element lines. I do it this way especially when doing FEA on the traces…

Either way, you can use the step file for creating attach hardware/etc and export back into Kicad… example below showing some items on risers…

Hello BlackCoffee & Mauni, I can export my 2 boards from Kicad in the form of .step files. If I load each in Freecad I get 2 folders, as the snapshot from BlackCoffee shows, I would like to put both boards in the same folder. I am not familiar with Freecad and would like to know or find an explanation for this.
From another side, with a big PCB design the exportation to .step format hangup :


The Kicad2Step say : Not reponding, not sure is normal ?
Thank you.
Vincent.

I’m not quite clear on that statement - my post doesn’t show any folders…

However:
• If wanting two PCB’s (or other Step’s) in the same FreeCAD project, then:

  • In Freecad, Create a New project, Add a ‘Part’ to it
  • Import the Step file into the ‘Part’ (don’t File>Open each, that will create two FreeCad folders, so to speak)

• If wanting two PCB’s in the same Kicad Project, then:

  • Just copy the one that’s in the project and Rename it and paste the copy into the project
    (you can paste other PCB’s into the same project, too)
  • Then, work on the PCB’s of interest… Can have many PCB’s in a single Kicad project.

I don’t know anything about “Kicad2Step”, I don’t use it so, can’t comment on it…

From Kicad, I export Step files by:
File>Export>Step

Then, I FreeCAD, I create a Part, Select/Double-click the Part label and Import the Step files.

Each one can be positioned via the ‘Placement’ tab in Data panel

To make Standaoff’s, Boxes, Risers, etc, etc, add a Body to the Part and do the work in the Body.

INFO-TIP’s:
Can have multiple bodies in a Part, Multiple Parts in a File and can drag&drop bodies, Steps and Compounds into Parts

Kicad exports the Step into a Folder that gets Imported into FreeCAD as a Folder. Simply Drag&Drop that folder into the Part label (then, it belongs to the Part and no longer a separate Part…) as shown in vid below.

There’s a good bit of homework and curiosity testing to do…

So, to answer the first problem, in fact, I tried to generate a .step file that already include a .step file in the kicad project, the tool does not like that! It does not seem possible, so to solve this problem, I deleted the 3D imprint that generated the error:
Original 3D view:


Updated:

With that, I am able to get a file format in version .Step that loads in FreeCad:

So, I’m not sure to understand the explanations, under Freecad I create a new project seems Unnamed :

I open the first .step file, with Part -> Import CAD (no Add Part ?!!?) Then same form the second .step file and at the end both are are angered, it’s pretty, but that’s not what I’m looking for.

For FreeCAD help, it’s best to use their Forum and tutorials.

Just like Kicad’s having integrated App’s (PCBnew, Eeschema, BitMap…etc) and Plugin’s, FreeCAD also has intgrated App’s and plugin/macro’s.

In FreeCAD, the App’s are called Workbench’s and Macro’s.

Coder’s of these try to imitate real App’s and have come a long way since day one. But, like most Open-Source App’s, what things get named/called depends on the Coder’s…

Example: SolidWorks uses the words “Extrusion” and “Cut”, FreeCAD uses the words “Pad” and “Pocket”. But, they do the same thing.
It’s like Starbuck’s: They have what they call a “Pour-Over” but, other’s call it “Drip” coffee. They are the same thing - a paper-cone with grounds and hot water poured over it.
(Next time at Starbuck’s ask for a “Pour-Over” - it’s not on the posted Menu but, they all do it. And, it’s the best drink they have IMHO)

You are using the “Part” workbench. I use the “Part-Design” workbench and the Toolbars/Tools and Menu items are different.

“Part” is like those minimal 3D App’s included in 3D-Print software (based on Primitives).
“Part-Design” is like real CAD programs such as SolidWorks, Inventor, Pro-E (based on Parametric’s and Primitive concepts)… Get it? Learn to use Both (and Draft workbench, too).

“Unamed” changes to the Filename when you Save the project.

Kicad will export Step’s of PCB’s that contain Footrpints made with Step models. No problem.

The Vid below shows PCB with a 6050MPU (step) and an Arduino Nano (also a step). They were made in FreeCAD, used in Kicad’s Footpints, Then, Exported from Kicad as Step. Then, Imported into FreeCAD…

Btw if you want to mention a specific user, type an ‘@’ sign and a list of thread contributors pops up.
So @vidalv should get your attention.:slightly_smiling_face: