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

Neither was Inventor… know what you mean. Real PITA once you figure out that all models you did so far are on the wrong plane or screwups like that… been there, fixed that, didn’t get a T-Shirt :cry:

As for offsets, yup… they’re good, that will work. :slight_smile:

1 Like

you can just use StepUp tools to load your STEP model in FC select the part and click on Export STEP & VRML scaled and you’ll get your wrl (you can conserve STEP model coming from SW because the file size would be smaller than FC one)…
or you can convert STEP to wrl using this FC macro


there is a bit work to do to attach also material properties to the VRML but it should be easy just palying a bit with this code
https://github.com/easyw/kicad-3d-models-in-freecad/blob/master/exportVRMLwColors/exportPartToVRMLwMaterials.FCMacro

Maurice

Ill give that a shot!

Why is this happening?

I have aligned it!

Looks rotated by 180 degrees?
@maui will probably need the step file and the footprint this goes with for analysis :wink:

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