I’ve made a tool to align the 3d model directly moving it over the pcbnew footprint.
here there is a small video tutorial:
With ‘kicad-StepUp-tools’ it is possible to load the kicad footprint in FreeCAD and align the 3D part with a visual real time feedback of the 3d model and footprint reciprocal position.
Once the 3D part is aligned to the footprint pads and silk, the model can be exported in STEP format and in VRML format for kicad 3d-rendering, just clicking on the Scale to kicad VRML button. That will align EDA to MCAD 3d viewers. No need to reiterate the aligning process or empiric calculate offset and rotation to apply to VRML model.
You can also click on ‘Create axis’ button to have an other help in orienting the part. With this tool is possible to download a part from on-line libraries (e.g. 3dcontentcentral, grabcad, etc), align the model to kicad footprint and export the model to wrl. That will produce a 3d VRML model exactly aligned to footprint as in mechanical CAD.
TIP: footprint aligner workflow:
load the Macro
open the 3d STEP model in FreeCAD
click on ‘load the footprint’ button
align the part to footprint
click on ‘scale to kicad VRML’ button
and here the place to download the script:
Moreover if you have the model in VRML and STEP, you are just a ‘step’ from having also the 3D mechanical copy of your kicad board and assemblies for ECAD MCAD collaboration and enclosure design…
please have a look here for a full description of this feature:
That’s great; I plan to have something like this for IGES models once the 3D work is done, but this involves rendering IGES models, which may take another 6 months or more for me to implement. Can your scripts be modified to manage IGES models as well?
the kicad StepUp tool is already capable to handle IGES…
unfortunately FreeCAD and OCC (open cascades) have a less support/compatibility for IGES compared to STEP, so sometimes the FC exporting process could result in a non valid or multiple faces object IGES model… FreeCAD people are focusing on STEP because this standard is widely used/accepted and updated…
IGES is an old format that has not been updated since 1996…
as from wikipedia page: IGES - wikipedia
After the initial release of STEP (ISO 10303) in 1994, interest in further development of IGES declined, and Version 5.3 (1996) was the last published standard.
I’m looking forward to see the new 3D refactoring of kicad, but I would like a lot to have STEP format included too
this StepUp tool is useful particularly when you want to integrate manufacturer’s model into kicad…
so the model you get will be aligned and translated as per manufacturer needs, not for kicad needs…
Then the tool will be useful to you too
also when you get models from on-line libraries as e.g. 3dcontentcentral or grabcad the tool will help the user in aligning the model to the footprint…
I’ve seen at this forum thread
that you are designing your models with Inventor and then you export them to STEP and then to VRML with FreeCAD…
As you may know, I’m creating a repository for free 3D parametric models coming from FreeCAD with STEP and VRML 3D model ready to go for kicad…
I was reading from your post that you are happy to share your models too…
I was wondering if you would like to join with me and hyozd to increase the 3D MCAD repo
we have done a lot of parametric models of 3D parts scripting the process for part with many variants (e.g. tantalum capacitors with different sizes)…
what we are missing is some nice 3d part models for single model parts (e.g. USB micro connector or similar)
If you would like to share some of your models, we could offer to kicad users the ability to have free 3D parametric MCAD models, that could be distributed with any open hardware design…
(normally manufacturer’s models have some restrictions to be free distributed)…
Please let me know your opinion
thanks a lot for your comment!
and I remember that you have done a great job in improving the VRML 3d render interface and FreeCAD VRML compatibility…
that gave me the chance to create kicad StepUp plugin and later this tool…
I consider that a nice open source collaboration!
IGES is very old but still very well supported and much easier to implement than STEP. With the 3D refactor you will be able to provide support for STEP via OCE - you just need to write a plugin. The plugin can be part of the kicad source, but only an optional compile since it depends on OCE, or it can be out-of-tree. My long-term plan is to implement STEP AP214e3 (deprecated, but many models still in the wild), AP203e2 (superset of AP203e1 so I’m hoping e1 support is automagic), AP242 (currently e1 but that may change before I have time to start). Kicad only needs a lightweight library for MCAD; we don’t need the entire geometry kernel of OCE.
“IGES format always brings in parts as a surface model and assemblies will be one single part with multiple surfaces. IGES files require further processing inside of the 3D CAD software to convert them to solid models.
STEP format is preferred as it brings the part into your 3D modeling software in solid format.”
“IGES solids capability is weak. Solids came late to IGES development. Consequently, translation of solids is more prone to geometric inconsistencies, resulting in unsewn/untrimmed surfaces.”
I had some probs in some case in importing iges models, and let them became a solid… it could be because of FreeCAD iges weakness, but if I could give a vote to the new kicad 3d refactoring/plugin, I will vote for STEP!
P.S. with kicad StepUp, thanks to FreeCAD, STEP AP203, AP214, AP242 formats are already supported…
EC2.wrl (needed those for a project, plastic housing needs modification to use it like that, got the EC3 as well)
ESP07.wrl (ordinary ESP8266-07 module)
Fuse_0805.wrl (housing for SMT fuses is usually green or blue)
LED_0805.wrl (pretty detailed)
SMD10.wrl (that’s the housing RECOM uses for their dcdc converters R-78xx-x.xSMD series)
Switch_SPST_rectangular.wrl (SPST switch from ebay)
USB-A_socket.wrl (usb a socket right angle mount from ebay)
So yeah, have a look at those… pretty detailed and somewhat longer loading times, but look nice. Makes you wish the 3d viewer would have more rendering options (shadows, raytracing, etc…) and AA or oversampling.
For most of these STEP models to align with the WRL models I had the orientation modified in FreeCAD before exporting to WRL the following way (nowadays I know which orientation in Inventor aligns out of the box with KiCAD, so not needed for any future models):
If you want to have a look at the footprints see here, I didn’t make them to KiCAD spec as I don’t want the reference to appear on my boards (text sizes are very tiny, layers are cmts.user) nor do they have fab outlines and might have the wrong orientation - so yeah, pretty unconventional but will help loading. Joan_KiCAD_Footprints.pretty.zip (9.9 KB)
Would need a prioritized list of stuff that is missing for you so I can do one here and there when I have some time. Would also need the datasheet/type/drawing links for the ones you’re after.
Modelling would be in Inventor as I’m fastest there and intermediary as STEP models.
thank you for sharing your models… they are very nice
That would be great to add some of them to the free MCAD/VRML models for kicad…
I went through them and I noticed that you create the STEP model with a scale factor of 1/2.54, as the VRML one.
Moreover the STEP is not aligned to VRML…
Modeling in inventor is fine, but to have the 3D models ready for the repo I’m building up, it would be nice to have:
STEP model in scale 1:1
VRML model in scale 1/2.54
STEP and VRML model aligned correctly to kicad footprint…
STEP part should have the name equal to file name
would you mind to modify e.g. Conn_USB-A_EDAC.kicad_mod ?
Scale is no problem, they’re 1:1 in Inventor and getting them into a 1/2.54 I actually have to import/export them inside Inventor for scaling (as I couldn’t find an option to do this in FreeCAD)… if you like 1:1 STEP it saves me one step
If VRML is 1:1 then KiCAD has to have a scaling applied in all 3 dimensions… I just wanted to avoid that as I never had STEP models in mind, but I see where you want to go with this, so no problem.
That one might be interesting and needs your input or a footprint to load I can work from/with if you have certain demands for orientation. Otherwise I can make sure that the STEP/VRML/kicad_mod align out of the box, just if the overall orientation is up to your/the libs specs I don’t know?!
Realigned the starting plane for the USB connector and went through FreeCAD for conversion… full cycle (STEP, VRML and KCFP (*)). VRML needed 0.394 scaling in KiCAD naturally. Conn_USB-A-2.0_socket_right-angle.zip (216.1 KB)
I’m sorry if I was not clear about VRML scaling…
when I say
“3) STEP and VRML model aligned correctly to kicad footprint…”
I just intended that VRML should be exported from STEP just maintaining the same orientation and position, the scale for VRML should be 1/2.54 (point 2) as you did for your previous lib models…
One other thing I forgot to tell you is that VRML model should be exported “shaded”, this will avoid to have a ‘wireframe’ on its body…
You can notice the wireframe opening vrml file in view3dscene software (kicad at the moment doesn’t display wireframe anyway… but it s useful if someone wants to use the vrml for exporting the board e.g. to blender…)
And the last one, the STEP model should have ‘.step’ extension for the lib models, not ‘.stp’ (this is useful for using the STEP model with kicad StepUp script )
Adding also the footprint to the lib (KCFP) it is perfect, the VRML scale is fine (scale (xyz 1 1 1))
current workflow for me with aim of getting a 1:0.394 VRML (with STEP only for conversion/as afterthought):
inventor model 1:1
import in inventor for scale adjustment 1:0.394
export as 1:0.394 STEP
import freecad (rotations not needed anymore)
export freecad as VRML
-> no 1:1 STEP
If I wanted a 1:1 STEP and a 1:0.394 VRML I would have to do 2 different STEP models to get a 1:1 STEP and a 1:0.394 VRML out of the box… I’d rather avoid that as it involves a lot of demotivating clicks
So, can you adjust scale of a STEP or VRML model via script?
Would be perfect if I could run the freecad conversion as a script as well… just needs to import the STEP and export the VRML.
model 1:1 in inventor (or what have you)
export as 1:1 STEP
start script that creates the shaded 1:0.394 VRML with freecad (just point it at a folder and let it rattle away)
 Reading your StepUP threads here and on launchpad it seems that you got that one covered?
Those are straight 1:1 STEP models from Inventor: SOT223-3.stp (418.0 KB) NEW!
And one I needed for myself ($3.5 DCDC converter Vin max 36V, 500mA Vout 3.3V or 5V):
currently going through my ‘old’ models and converting them to the right orientation as I go along… had to learn a new trick in inventor for it
Then I modified one of the xQFP models to parametric so I just have two variables (pitch & pincount) from here on for those.
sure I can handle the scaling and converting to vrml part…
for me to have just the model in STEP, scale 1:1, with the right orientation would be perfect!
Just in case you may need some user friendly tool to move, rotate, scale and convert to VRML, you can download the kicad StepUp demo and you’ll find the ‘kicad-StepUp-tools.FCMacro’
If you launch the macro inside FreeCAD you can scale and convert to VRML just in one click