3D new library for Mechanical CAD exporting and enclosure design

Cool, as soon as Wayne get’s back with a useful exception ‘block’ I’ll add them to my symbols… still got to add the license to the VRML parts… lol.
Just woke up after I wrote the lib2csv&back script last night in 4-5 hours to get a ‘manf#’ field into all my symbols :sleeping:

PS: I’m able to do 1-2 new 3d models per week I think, so if there are any useful ones missing, keep 'em coming.

PPS: new today - TminiDIP, SSOP8-P-0.65 & VSSOP8-P-0.50 all in SMD_SMDx_others.zip

nvmd, I just did read the kicad docs about it… might take a while :slight_smile:

@Joan_Sparky
I don’t think this is going to happen in the main branch… I asked to add a single button to pcbnew and I got a big reaction, because it was changing the UI policy :smile:
https://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg14185.html
I can imagine what could happen if someone would ask for many :wink:
Anyway, if you are interested,
I have done a version of 3d-viewer with buttons to display/toggle
- pcb body
- realistic mode
- 3d modules
- 3d virtual models
- shadows
- silkscreen
- fill zone
- solder mask
- solder paste
- drawings
note: virtual models let me show/hide mechanical models (e.g. enclosure)
https://lists.launchpad.net/kicad-developers/msg18069.html


please let me know if that may be of your interest, then I will clean a bit the code and publish it
most of the diff are only in 3d-viewer code
(it will be aligned to the stable release)
Maurice

1 Like

don’t worry about me… I can live with what’s there atm. I’m sure they’ll add the missing stuff at some point as the 3d viewer is a bit very sparse with manipulation elements.

I’m fighting with the library code right now… damn thing does weird stuff - and all I wanted was the manf# field in there, arghh :tired_face:
Ah well, I’ll get there - eventually…

Hi :slight_smile:
the licence thing semes to solve itself in ‘near’ time :wink:
thats great :smile:

@maui your buttons looks good - i personally dont want to get into development/editing source of kicad for the moment - its just one thing to much to keep track of… (iam fine with ‘alpa/beta’ testing the daily builds during normal work ;-))
hopefully at some point the interface is just easily editable (for example like in FreeCAD - there you can add/delete buttons as you like - and if you have a python script/macro you can create a button for this… and this thing is the same for libre office…)
-> how does your ‘virtual models’ work?
i have made a footprint for my DIN-Rail Enclosure that iam using for some of my pcbs…
currently the 3D model is on ‘TODO’ - but if i have it ready i would add it to the footprint.
but than i have a big box around my pcb…

so i currently have some new footprints + 3D-modells in work:

*3D model to be done…
All 3D-Models for this i have done/will do in FreeCAD
for the BreakoutBoard / Pin-Headers i currently have used my own model and made the array-modification and final combination in blender.
but i think i can try to do this only with FreeCAD so it is contained all in one file / software…
(hopefully the FreeCAD-Assembly thing will get merged next year :wink: )

than i also could export step files from all models -

what are you guys are thinking for something like these ‘special’ footprints -
should i just make my own library on github for theme ?
or do you want to merge them in one of yours?
or should i make a official requests to the KiCAD libs?
(currently i think i only loosely following the KLC - have to reread this and update all parts)

thanks for all the work you all have done so far on this!! its amazing!

sunny greetings
stefan

if I can get some spare time during holidays, I would put a snapshot of stable with 3d-viewers add-ons on sourceforge…
are you on windows or ubuntu?

I just put a 3d object associated to e.g. a hole/pad and I assign it as virtual
(check the Virtual Attribute for the mechanical part in Footprint, Edit Parameters, Properties)


then I toggle ‘virtual’ models visibility using my menu button…
I toggle only 3d modules (wrl files) and not pcb footprint, so in case of a spacer anchored to a pad, the pad will always be displayed, but the spacer only when the virtual 3d modules will be enabled…

in this way you can assign mechanical parts (e.g. enclosure, add-on boards etc) to virtual and decide when you want to display them, during board design

I think the easier would be to have your own lib in github, so they will be available for merging…
I’m going to package some models to fit in the standard kicad libs, so I will merge the models there
Please I just would need to have some rules respected, as in the first post…

I think a try would be fine, but I don’t think they are still ready to accept FreeCAD models… which is a quite not smart choice, considering they are going to develop the 3d-refactoring to accept MCAD models…
I already asked few times…

anyway a try would be worthwhile :slight_smile:
Maurice

i did not know that the virtual thing existed :wink:

iam on Kubuntu 15.10 64bit. currently use the daily build (ppa:js-reynaud/ppa-kicad)
is it possible to have more than one kicad install side by side?

for my parts i will make a library/libraries on github and reread your specs and the KLCs.
as licence iam fine with MIT currently for about all my things :wink: - and my parts are all made from scratch (reading the available documents)

is there a macro for FreeCAD to export all needed formats (inclusive vrml with scaling) at once?
(if not iam willing to try to write one…)

is it easier to have one library for every part -
or one big library to cherry pick from?

it is used to add e.g. connector that have not a correspondent 3D model, I thought to use this feature for mechanical enclosures/parts because it has a very small impact in pcbnew (not changing anything in board format, not adding any new field) but it can be easily associated to a mechanical 3D model…

I suggested to the dev list the option to include it, because I think it is a really useful tool, in mechanical ECAD design

I’m not very familiar with linux, so I’m not sure if it is possible to have 2 installation side by side… I would appreciate any suggestion…

in windows it is easy… different version of kicad can be just installed in a different folder (I use to have old stable 4022 and dev side by side)

it is fine, but for merging models I would prefer to have the possibility to apply the same GPL licence, that is the one adopted by kicad official libraries…

at the moment I have written, separate from StepUp script a macro to scale and export only VRML files…
but if you have a look inside the FreeCAD parametric libraries @


there you can find code that will scale/export VRML and STEP (not scaled) from freecad doc…

kicad has adopted a one big library, but there are a lot of people maintaining it…
I have chosen some sector zipped libraries, with a README.txt file with a list of included models, just to make the process faster

thank you for contributing :smile:

and the LQFP, TQFP, PQFP parametric library for the Housing_QFP.pretty lib

README.txt

1 Like

I’ve tried the python scripts to generate parametric packages:


I’ve noticed it fails if I use in a model name ‘.’ or other character that is not a number, letter, underscore.
Is there some way to generate models with ‘.’ in their names or it’s a limitation of cadquery or freecad?

I never tested, but if the prob exists it is just because of the script …
I never handled or tested these cases…
I would suggest you to create models without ‘.’ in name and then rename as for your request

Note that there is a small issue with executing the script with cadquery 3.0 so, for the moment, use cadquery 2.0 to generate the models
Maurice

uploaded models for transformers (complete with core and coil package) as I needed one myself. Enjoy…

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

EFD 15, EFD 20, EFD 25 and EFD 30

RM 7, RM 8, RM 10, RM 12 … with some more to come (vertical positioning is out of whack for these atm - they sit too deep, will update once I got that sorted)

EDIT1: I removed the coil formers, but added the remaining EFD transformers for the complete series as far as I’m aware… If somebody needs a pure coil former please drop me a line.

EDIT2: I added the RM transformers and renamed the zip file on github - link is updated.

2 Likes

Hi, when I was reading this thread, I noticed the comments about how to include something like a case using virtual footprints but where is this button that is mentioned here?

I can’t seem to find anywhere to turn on or off virtual models in the 3d viewer.

Thanks

S

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…