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

Hi @josexavier
if you are using the exported STEP and VRML models, probably you have a wrong z angle value on your pcb fileā€¦
sometimes the model used in the pcb file (.kicad_pcb) has different x,y,z orientation values compared to the module used for orienting the model file (.kicad_mod)
you can check it just opening your .kicad_pcb and .kicad_mod files in a text editor and search for the .wrl file name
Kicad pcbnew doesnā€™t have an automatic sync between module and board file 3d parametersā€¦
In general it is a good extra grade of freedom, but sometimes it is a bit confusing

   (model 3Dmodels/my_model.wrl 
     (at (xyz 0 0 0))
     (scale (xyz 1 1 1))
     (rotate (xyz 0 0 0))
   )

Maurice

Thank you,
You was correct :slight_smile:

Another question. On your last update there is an error when I use different paths for 3d parts. I have common 3d files on /usr/share/kicad/packages3d and other 3d parts on my project folder.

I have changed the prefix3d_1 path to /home/ze/ on ksu-config.ini otherway it canā€™t export the wrl and step file into the kicad folder because it need permissions and after change it to home/ze I start getting the following:

/home/ze/Capacitors_SMD.3dshapes/C_0603.step
/home/ze/Resistors_SMD.3dshapes/R_0603.step
/home/ze/Housings_QFP.3dshapes/LQFP-64_10x10mm_Pitch0.5mm.step
/home/ze/TO_SOT_Packages_SMD.3dshapes/SOT23-6.step
/home/ze/TO_SOT_Packages_SMD.3dshapes/SOT23-5_wLABEL.step
/home/ze/Socket_Strips.3dshapes/Socket_Strip_Straight_1x03.step
/home/ze/LEDs.3dshapes/LED_0805.step
/home/ze/shapes3D/022053021.step
/home/ze/Pin_Headers.3dshapes/Pin_Header_Straight_1x05.step
/home/ze/shapes3D/S6B-XH-A.step
/home/ze/shapes3D/Pololu_DRV8801.step
/home/ze/shapes3D/B2B-XH-A.step
/home/ze/shapes3D/1050171001.step

Hi,
recently Iā€™ve changed the default dir to save the 3D model from $HOME to the same 3D prefix used for 3D modelsā€¦
Some users asked me thatā€¦

I forgot that KiCAD will put all the 3D models as default in a folder that requires permission to be writtenā€¦

  /usr/share/kicad/packages3d

This is a bad habit that KiCAD has also on windows (the models are in Program files subdir)ā€¦
I normally (and many other do) have a different folder path for all my library models (lib, mod and 3D) to be sure that will not be overwritten by a new installation of KiCAD itselfā€¦
If you let me some time, I will take care also of this permission problemā€¦

Just a clarificationā€¦ kicad StepUp at the moment doesnā€™t allow more then one single path prefix for resolving 3D models locationā€¦ it is partially intentional because if you have two models with the same name in two different search path, which one will be picked and would be the picked one the right one?
So if you want you can move/copy all your models from

  /usr/share/kicad/packages3d

to your 3D path

 /home/ze

anyway, I will take care also of this permission problem soonā€¦

thanks for reporting this
Maurice

Hi @josexavier
please have a look at latest version here


Iā€™ve added a check if the dir is writableā€¦ if not then the models will be written in $HOME
This latest version is also fully compatible with FC 0.15, FC 0.16, FreeCAD 0.17 and latest OCC 7, particularly on ā€œ.kicad_modā€ loading
:smiley:
Maurice
3 Likes

Hi,

I also started using StepUp. It took me a while to get it going but it is working great. Thanks a lot!

There is one thing puzzling me though. How can I generate a STEP file as a solid (so it can be rotated and translated as one part) and still use different colors. I tried using assemblies (so that each part has its own material and color properties) and exported them as a STEP file but then all constraints between the (sub) parts are lost (Iā€™m using the Alibre design CAD program). Any suggestions or directions how I should proceed?

Hi @dolfijn
glad to see you are using StepUp :smiley:

this is a nice feature of FreeCADā€¦ as in the kicad StepUp Starter Guide

assure that your STEP module is fused to just one solid object
(Part Boolean Union in FreeCAD)
Note: here FreeCAD forum fusion howto10 some tips to fuse correctly objects in
FreeCAD

I donā€™t know Alibre, but I know that some MCAD sw donā€™t allow the user to make a union of parts, some others just fuse them, but they lose different colorsā€¦
Please consider that you can model your parts in Alibre and then import them in FC and make a union of the assemblies to obtain a single 3D object with colorsā€¦
in FreeCAD you can also load your Kicad footprint and align directly your model to footprint itself

Maurice

Hi Maurice,

Thanks for your reply. The problem is indeed the Boolean operator in Alibre design. Works fine but discards the colors of united parts. I tried some simple unification with FreeCAD and that looks promising :slight_smile: So I will proceed by fusing my Alibre generated assemblies in FreeCAD. Should work.

Thanks again!

Peter

This shouldnā€™t be a problem; models from different manufacturers follow all kinds of orientations etc so you always have to specify the X,Y,Z offsets and the rotations. If you really want to create your models a certain way, thatā€™s not a problem either. You know all the package dimensions so you can create reference planes where you need them. In SolidWorks you can always change the plane of a drawing at a later stage if you need to move things. If you really wanted to shift the origin (and even orientation) in SolidWorks you just create an assembly, specify the relationships of the part to the origin, then export a STEP file. If the part was added to the assembly as ā€˜fixedā€™ then you can convert that to ā€˜floatā€™ and create the relationships you need.

I found that FreeCAD in many cases is more reliable than commercial packagesā€¦ and for sure is much more customizable! :smiley:

As a matter of fact, I evaluated FreeCAD two years ago. What me stopped was the lack of assembly support. I believe that is still work in progress.

But, for now, I have a legitimate reason to make it part of my mechanical tool chain (the nice Boolean unite operation) :-). So, i can have a look at it again.

there is a WorkBench for Assembly which is very usefulā€¦ still there is a lot of work to do to complete that Assembly sideā€¦


There is something growing up on 0.17 dev release, but still not fully usableā€¦
moreover from FC014 (two years ago) and FC016 there are huge improvements in features and stability :smiley:

Hi there,

I have one more question about the Boolean fusion operation. I made several .step files and .wrl files using the StepUp macro. Just works fine.
I am now moving on and importing a PCB board with the.step files (for connectors only) into FreeCAD. And then it appears that some fused models actually arenā€™t turned into a solid. I attached an example.stp file (from Amphenol) and the export result using the StepUp tool. When I use StepUp I also unified the subparts using the Part workbench. The resulting .step file and .wrl files are attached too.

When the .stepfile is processed during a PCB import, its start complaining that it is not fused. Which is true when I import the model by hand in FreeCAD.

What am I doing wrong?

Connectors.rar (1.1 MB)

this is nothing to do with StepUp macroā€¦
the issue is that you are not able to fuse the model in FC, because of some particularity of the model itselfā€¦ the FC (OCE) fusion operation is fine, but when you reload the model, you get it in many partsā€¦
have a look at FC forum for this topic

there is also a reference on that on kicad StepUp Starter Guide (follow the link to FC forum)

10. Create your own Library
ā€¦

  1. assure that your STEP module is fused to just one solid object
    (Part Boolean Union in FreeCAD)
    Note: here FreeCAD forum fusion howto some tips to fuse correctly objects in
    FreeCAD

there are some tricks to make the model ā€˜a unionā€™, or you can just to try using a different sw (i.e. OnShape), but this is a process that one has to discover on the field :slight_smile:

1 Like

Your part is not a solid. It consists of a lot of open faces.
(one example is here in this screenshot.)
The union operation only works on solids.

1 Like

Hi Rene_Poschl,

Thanks for the reply! I understand the problem.

Is there an easy way to transfer this model in a sound solid part?

Or can I better create a model of my own (a solid one :-))

Any suggestions?

Thanks!

Peter

Iā€™m not sure if there is a software which can repair such a model.
Maybe you find a better one online. (Look at the manufacturers website)

Otherwise your only option would be to design it yourself.
If you do that, i would suggest making it a bit less detailed. (In my opinion having a 3d representation of threads is a bit of an overkill.)

Ok, I will have a look if I can ā€˜repairā€™ it somehow and otherwise I will make a less detailed model.

Thanks,
Peter

Repair would be futileā€¦ that model is way to detailed for KiCAD.
That looks like a production model for the single componentsā€¦ dunno why something like this is offered as download for MCAD/ECAD usersā€¦ total overkill.

Yes, I Agree. One can wonder why Amphenol put such a detailed model online.

What I have done now is: import the detail model in Alibre design (MCAD software) and made an abstract solid by projectioning the outline of the Amphenol model in the drawings that are used for extrusion and so forth. So now I have an simple solid with exact dimensions as specified by Amphenol. Iā€™m happy with the result.

31-5431-10RFX.step (207.5 KB)
31-5431-10RFX.wrl (60.0 KB)

1 Like

Nice trick to project the model to get a shape to extrude from!..
then you can also add a bit of color with material properties :smiley:
31-5431-10RFX.step (209.6 KB)
31-5431-10RFX.wrl (59.3 KB)

2 Likes