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

I got this up and running in about 30 minutes with my board. This is a great tool!

2 Likes

Well, then you’re ahead of me, that’s for sure :laughing:

@Ldoiron17 thanks for your positive feedback! :smile:
I’m always happy to see that my StepUp tools are @ work!
When I started my StepUp project I was a completely noob in FreeCAD, so I made them thinking that the user would be able to play with the STP exporting without a knowledge of FreeCAD itself…
That approach it becomes useful also if the user has a different MCAD software to play with mechanical design.
@Joan_Sparky … I’m sure that when you’ll need a mechanical collaboration with kicad in some of your design, you’ll get StepUp exporter working very fast! :wink:

That is the reason I needed it. I am designing an open source motor drive board that uses a CPU cooler for thermal management. I will post some renderings up when I get it looking good.

I don’t plan on using freecad too much, I have solidworks and I am not willing to make the switch until there are some more functionalities available in freecad.

@maui I haven’t quite figured out how to take a single .wrl file and create a step from it using your macro. I tried the “Export toKicad” STEP and scaled VRML 1/2.54" button but it doesn’t seem to have any outputs or errors when I click this.

I want to take some of the stock .wrl files from the kicad standard libs and port them over to my own libraries, so this conversion will be really useful when I figure it out.

Any advice?

@Ldoiron17 the path from wrl to STEP is not useful / feasable, you will get a very bad STEP model coming from a tessellate model (VRML is a lot of triangles representing the outer surface of the component)
It is a pity because all the kicad mesh models out there are useless for MCAD world…
The only way is from a mechanical model STEP to a VRML model
for that reason I started the 3D MCAD library of STEP models


please have a look there to see if you can find the models you are missing, or just put a list here and I will see if I could found some for you

Ah, that makes sense why I couldn’t figure that out. I looked there for the footprint I want but couldn’t find it. I need a directfet package. I will draw it up in solidworks and make a step and vrml of it.

Is there one place where all of the 3D stepup models are living? The most comprehensive spot I found was @Joan_Sparky’s github link here:

I just use that github repo to have a place for @maui and the rest of the gang to get to the ones I made :wink:

@Ldoiron17
thank you for contributing in 3D mechanical library :smiley:
Please consider to include STEP, VRML and kicad_mod files
you can put your models here and I will upload them to github

at the moment unfortunately there is not an official repo for 3D MCAD STEP & VRML models
so the places in which me and @Joan_Sparky are building up a repo are:


(some ready to go MCAD libraries to substitute the official ones)

(a lot of scripts to generate parametric STEP and VRML models)

(nice STEP and VRML models for kicad)

So I want to get this mechanical model right be I post it here for upload.

It doesn’t make sense to draw most 3D models with the 3D origin at the 2D origin in the XY plane that kicad calls the center of the part. What I want to do is make my Kicad footprint have a Z axis offset for the 3D part (which I know how to do) so that the feet of my directFET can be non-zero Z in my MCAD drawing. If I don’t do this then I need to mess around with the origin after drawing, or draw the part in a non-trivial fashion starting with the package legs, which is extremely annoying.

My question is, is this acceptable by the community? If this is the case it seems like somehow the the offset information wants to travel with the STEP and VRML files.

Maybe by way of a Kicad footprint file? I have all of my 3D shapes/ footprints / schematic symbols in my own personal repo online that are all linked together. After I fill it out a bit more I will make it available to the public, it isn’t quite ready.

?!? :confused:

The origin of CAD models is at <0,0,0>, as is the normal thing for any MCAD tool out there. KiCAD expects your SMT or TH part to sit on the X/Y plane at a Z-height of 0. The Z-axis positive values go towards you if you look frontal onto the X/Y plane.
If you got SMT devices, they will have nothing that protrudes into -Z territory.
Different matter for TH components, whose pins go through the board and are in -Z territory.

I don’t really get what you mean with the feet of the directFET being non-zero Z.
Can you post some images/files/models to make you point?

I make MCAD models so they don’t need any adjustment at all, neither in StepUP nor in KiCAD for placing them.

as @Joan_Sparky pointed out

The 3D models will be:

  • parametric models coming from technical datasheet
  • FreeCAD 1:1 model (optional)
  • STEP 1:1 model
  • STEP 1:1 model with with text on it (optional)
  • VRML 1/2.54 model (to fit perfectly kicad 3d-viewer with scale 1,1,1)
  • footprint file with right orientation, scale and 3D model associated
    the footprint could be also omitted if the official distribution one is available
  • STEP model fused in single object

if you find easier to build your models with a different origin, you can manage a script to translate the model exactly over the footprint using something similar to what @SchrodingersGat has done here


thanx for your contribution :smiley:
Maurice

I understand this. but for drawing a 3D model it doesn’t make sense (IMO) to have to start by drawing the feet of a package, see cross section below where the directFET origin doesn’t have any material in it. And the “feet” or tabs off to each side that the package sits on are only referenced to the body, so drawing them first is actually impossible without drawing the rest of the part, see below.

I missed the 2.54 scaling on the vrml file! That is most likely the source of my current pain, which is why the part isn’t showing up in the correct place if I use on offset. I will probably fix the STEP file so there doesn’t need to be an offset, but now that I am here I am curious to see how the scaling works on the 3D settings for footprints.

I’ll get this right soon, hopefully.

EDIT: @Joan_Sparky that is a XZ cross-section of the DirectFET footprint I drew up. The origin for Kicad needs to be located at the lowest Z and in the middle of the X dimension.

Ok, what tool do you use to draw you parts?
I’m only firm in Inventor unfortunately and it took me some time to refine my way of doing things.

Can you define workplanes?
Can you offset them from the original planes that go through the origin?

Or can you create your device not from looking at it from the top, but from the side?

Couple of ways to deal with this.

Example (SOT 343x) created mostly from the side:

I am using solidworks, and moving the origin isn’t possible. I can move the part wrt the origin after I have drawn it, which is what I ended up doing. For some reason late last night having to do that was irking me.

I am okay with doing that now that I have had coffee, seems like the correct solution!

There must be workplanes or something similar in that tool… I can barely remember anything from it (had it 10-12 years back for some time)… was deep in 3DS Max then :slight_smile:

You just start by offsetting a plane from the standard x/y plane by whatever the chip underside sits above the PCB.
I do this for QFN housings for example…

Yeah, there are tools for doing that. But solidworks wasn’t meant for origin shifting.

You can also define a user coordinate system and put that origin where you want it and then export to a STEP using that coordinate system but it is a pain to set the origin to a point in free space that isn’t on a vertex.

You can also shift the part around the origin by effectively adding offsets to all of the sketches and 3D features. That is fine, I just did that.

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!