3D new library for Mechanical CAD exporting and enclosure design

this is a feature that is included only in my build,

maybe @cbernardo, @kammutierspule can consider to add it, or just add an option to hide some 3d model
wish on 3D visibility checkbox
or even just to scale e.g. to zero in one single click/input
scale proportionally checkbox

this is a feature that Altium implements to allow a better ECAD MCAD collaboration

Hi!
I’m trying to get my first model ready. But now I run into a problem.

I’m modeling a Teensy in Fusion360 and exported it as a step file. After that I imported the step into FreeCAD. But now I have tons of parts, which I tried to group with boolean actions. But this only works to a certain point and then thows an error.
Now I’m kind of suck.
I attached the file so you can have a look. Is there a way to export a solid “one part” step file?
Step file to download

@amittel
I’m not used to Fusion360, but the easiest option would be to make a union of parts in Fusion 360 itself, and then open the model in FreeCAD

it should be like that:

Fusion 360: In the Model workspace, select Modify Combine. Select the target body and then the tool body or bodies. In the dialog, select Join.

FreeCAD has a tricky way to fuse objects, if there are co-planar faces…
http://forum.freecadweb.org/viewtopic.php?t=8451#p69489

Super! I’ll try it.
I was so focused on FreeCAD, that I didn’t think about doing it in Fusion360.
Thanks!

update as promised… finally got around to make my FreeCAD/python code to add license info to the VRML files as well:

I finished the RM transformers…
Available now RM4, RM5, RM6, RM7, RM8, RM10, RM12, RM14 (plus low profile variants) as far as I could make them (TDK/Epcos datasheet only had low profile cores in them, not the coil formers, hope I got them right).
Also RM5 and RM6 had additional pin count variants listed, covered them as well… enjoy.
https://github.com/JoanTheSpark/KiCAD/blob/master/3D-shapes/Transformers.zip

PS: sorry for the VRML file sizes, I have no idea why, but it seems some of them are twice as big as needed. If anyone has got an idea why that could be (for example RM5-6pin & RM6-6pin are the same model, just different dimensions) I’m all ears.

@Joan_Sparky I dont know how are you generate the models. I open the RM-5_6pin.wrl and RM-6_6pin.wrl and I found that one (the smaller) is using DEF/USE (reuse of) coordinates.

I export them from Inventor as STEP… those files are in the repo as well (end in stp instead of wrl).
Those are then imported in FreeCAD and exported as VRML, per script, automatically, one after the other…
Really no idea where the difference in treatment comes from, especially as the original files for those two models are the same, just different parameters for dimensions that should not affect basic file/mesh/etc. properties that would cause stuff like this (IMHO).
I don’t know if there are other more detailed STEP model viewers out there that allow some sort of examination of the data that is in them…

Another thing I couldn’t find in FreeCAD was a way to reduce the numbers of segments that are being used to approximate circles/round surfaces… there are a couple of those in there that could easily do with just 8-6 segments per 90 degrees.
I naturally have no idea how STEP models are defined and if this kind of optimization is even possible…

Vrml in FreeCAD is exported directly by the Coin3D viewer
Pivy is the python binding library for Coin3d in FreeCAD
may be there you can get some info

https://github.com/JoanTheSpark/KiCAD/blob/master/3D-shapes/Modules.zip

Bosch BME280
Bosch BMP280
Telit SL869
XBee 868LP

No idea where the u.fl connector on the XBee module is placed at… nothing in the datasheet about it. EM-shield size/position also by Augenmass

EDIT:
I wonder how long it will take for KiCAD to accept STEP models directly… filse sizes for the VRML stuff are just ridiculous.

In page 14, Mechanical drawings.

Thanks very much.

Ya! If it was that easy… :wink:

2 Likes

at the moment using a library for 3D models based on MCAD models (FreeCAD or STEP in general) is a good compromise for kicad to have a native and realistic/parametric 3D rendering (with VRML exported with FreeCAD) and an exact representation of your physical board in 3D PCB mechanical environment (through my kicad StepUp)

@Joan_Sparky I think that our effort in doing a 3D MCAD library for kicad is in the right direction

what I would like to see, as I asked already at developer’s list, is a 3D MCAD library composed with FreeCAD/STEP 3D parametric models and 3D VRML models aligned to the kicad model footprints…

may be @Ricardo_Crudo could ask the developers to create an official kicad repo with FreeCAD/STEP and VRML 3D models
That will help all the users that need 3D models both for realistic rendering and mechanical ECAD MCAD collaboration in finding these resources easier…
and moreover that official repo may incentive other people to collaborate and improve the lib :smile:
Maurice

1 Like

Well STEP is the undisputed king of standards specification complexity. With the plugin system I am working on it should be possible for KiCad to directly support STEP via OpenCascade but of course that’s a matter of someone doing the actual coding. Maurice’s scripts have pushed the priority of such coding down the list somewhat since the devs are all busy with so many things and the scripts are a good compromise. In the long term I’d like kicad to have its own minimal engine for displaying and producing STEP assembly models (and IGES as well - so far I can produce IGES but can’t display it) but that’s looking like a 2-year full-time job to me, which means I can probably finish the task in 10 years. The only objection some devs (including me) have to OpenCascade is that it’s a huge library - that’s inevitable since it is a 3D MCAD geometry kernel. However, kicad only needs extremely basic geometry support to be able to create a PCB solid model (as demonstrated in my libIGES project) and to add other models to an assembly model. At any rate my new plugin system allows us to make OpenCascade an optional requirement which can be installed separately - this arrangement keeps all devs happy while not eliminating the possibility of native STEP support via a custom lib in the future.

2 Likes

With all this great work on modelling SMD components, are there any THT components like resistors?
I’ve generated and used cbernardo’s resistors as WRML files, but would like to use Maurice’s script to model my enclosure with the multiple PCBs inside. However, it’s all through-hole stuff and I’m having difficulty finding appropriate resistors…

I noticed another thread which allows parametric creation of various components. Is there one like Cyril did in WRML that would generate STEP models?

you can always try to download some TH models in STEP format at 3dcontentcentral o grabcad
then you can align the footprint with


and export with kicad SteUp tool to vrml aligned to your footprint
Maurice
PS feel free to ask for support if needed in using my MCAD script :smile:

2 Likes

Thanks Maurice. I’ve had a look, but all seem to be horizontal TH models, none of them are vertical. I’ve tried taking one and then modifying it in my CAD (we use Creo / ProE), but no real luck…

The great thing with @cbernardo’s scripts for VRML is that I was able to modify a few parameters such as the pitch so I could get them perfectly matching my PCB design.

I did see a guide somewhere to convert VRML models to STEP but it was rather convoluted and involved using many different programs (Blender, FreeCAD, etc) so seems a rather tedious step if I have many components to convert.

It might be easier for me to make one from scratch if I can’t find something suitable already out there :smile:

@xavierw
if you like to code a bit, have a look at


this are some script to generate STEP and VRML models starting from a parametric table as in component’s data sheet
If you would like to play with the code, cadquery is a nice framework to let you generate parts with parametric scripts in python
here is a very simple example for a smd chip cap

may be you can have a look and create some script to generate TH resistors, than the other users could have a benefit :slight_smile:
I found that, after playing a bit with cadquery, for me it is easier to create parts in python than manually :smiley:
PS use cadquery-freecad-module 2.0

Ahh, damn, just noticed your reply.
In the end, I drew my own up…

However, I’ll have a look at that. It would be quicker than manually selecting each of the colour rings to generate a series of values. :slight_smile:

3 Likes

@xavierw
good-o :smile:
please keep me informed about the conversion with my StepUp script :slight_smile:

Holy cow that resistor looks awsome! What did you use to draw it?