3D new library for Mechanical CAD exporting and enclosure design

Hi @Joan_Sparky … if you want @Rene_Poschl has added the VRML export with Material Properties also to my CadQuery scripts (I need to update some model generation)
with few material_substitutions calls
export_objects, used_color_keys = expVRML.determineColors(Gui, objs, material_substitutions)
the new WRL file with materials is created, small as latest, but with material props on …
you can have a look @ here:
https://github.com/easyw/kicad-3d-models-in-freecad/blob/master/cadquery/FCAD_script_generator/make_qfn_export_fc.py
you may consider to add shiny & realistic material properties also to your nice 3D models :smiley:
I made a list of 20 colors/materials as per Mario doc … I think they can be fine for most of 3D models
material_properties_names=[“as is”,“metal grey pins”,“gold pins”,“black body”,“resistor black body”,
“grey body”,“dark grey body”,“brown body”,“light brown body”,“blue body”,
“green body”,“orange body”,“red_body”,“pink body”,“yellow body”,“white body”,“light brown label”,
“led red”,“led green”,“led blue”, “led white”]

I’ll definitely have a look at it when I get time.
Need to figure out how to get this done automatically, or is it automated already?

yes, it is automated already
you only need to decide your color map association to the material added as per Mario doc

2 Likes

@maui, one doubt.
Since Kicad already has support to STEP models now, do we still need to generate VRML in order to use your StepUp tool ?

Well the step support is not added to the stable version of kicad.
I think it will take a quite some time until we can drop the support for vrml models in 3d libraries.

Hi @chrishawk
thx for using my StepUp tools :smiley:

Since STEP has been supported directly in Kicad, StepUp tools have implemented this feature too :slight_smile:
you don’t need anymore VRML model to convert your board and part to STEP if you are using kicad dev release or 5.0 (coming quite soon)
I would need to update a bit the User Manual :wink:
actual release is kicad_StepUp_tools_v3116
https://sourceforge.net/projects/kicadstepup/files/latest/download

I still use VRML models to have all the Material properties features both in 3D viewer and in Blender when I export my models…
More of all, one option is really useful in VRML, the ability to have transparency in 3D viewer … that is useful for checking enclosures on the pcb board and parts…

just for completeness I’m summarizing what kicad StepUp tools are for:

  1. export kicad board and parts to STEP (or IGES) for a full ECAD MCAD integration
  2. convert your STEP model of parts, board, enclosure to VRML for a bidirectional use back in kicad
  3. ability to load directly the .kicad_mod footprint in FreeCAD to easy align the mechanical model to kicad footprint
  4. ability to load directly the .kicad_pcb board and parts in FreeCAD
  5. ‘bounding boxes’, ‘minimum volume’, ‘minimum heigh’, ‘drill size’, ‘blacklist’ and ‘virtual’ options to tailor your MCAD exporting
  6. interference and collisions detect for enclosure and footprint design
  7. exporting of VRML models with Material Properties for best result in 3D rendering/raytracing
  8. ability to create simple models in MCAD using boxes or cylinders with dimensions as in scale values of wrl models

requirements:

  • kicad stable >= 4.0 or development release
  • FreeCAD stable >= 0.15 or development release
  • a library of STEP (or IGES) 3D models
  • each parts must be be a single 3D object (union of parts in FC)

tips:

  • never use a scale different from 1:1:1 in your 3D models
  • configure your [prefix3D] in ksu-config.ini to your KISYS3DMOD path
  • use STEP or IGES or VRML or mixed type of models in your board

for some ready to go libraries please refer to:


and other useful libs in up this thread :slight_smile:

I would consider to keep VRML support still if this format will not the only one supported, because with VRML it is possible to:

  1. improve 3D rendering/raytracing with material properties
  2. have transparency in 3D models (enabled or disabled it just toggle-ing material properties)

Maurice

4 Likes

Hey Maurice, thanks for the explanations and for the excellent tool !

1 Like

The latest kicad (dev) has completely rewritten VRML1/2/X3D parsers. I don’t know if anyone will improve these parsers to support more VRML features (these already support much more than the older parsers) but I don’t imagine VRML support will be dropped unless VRML becomes extinct in the future. Since the parsers are already written, there is little point in removing them.

Impressive

Anyone knows where I can find SOT891 3d model ?

thanks
/Nicholas

you could use this one:
https://www.3dcontentcentral.com/Download-Model.aspx?catalogid=171&id=662141
and convert it with stepup
or perhaps generate your own using

Yes

it seems to be in some solidworks format

maybe i can open it in creo

or as you said do my own in freecad (done it once before)

thanks

you can choose the format before downloading it :slight_smile:

1 Like

opps

so I could

i tried step, wrl, iges
none showed up in kicad.
will open the models in freecad and see if they show up

shows up nicely in freecad
could be scales, and axis, and rotation problem

If you are using the KiCad stable version (version 4) you will need to use the tool StepUp http://sourceforge.net/projects/kicadstepup/ to convert from STEP to WRL properly.

If you want use STEPs directly with KiCad you will have to use KiCad Nightly Builds or wait for KiCad 5.

I have the nigthly

Application: kicad
Version: (2017-01-30 revision 9627f06)-makepkg, release build

I scaled it up to 1000 x,y,z in footprint properties but nothing showed up

tried the wrl file also

nothing shows
same files pops up nicely in freecad

What version of vrml is your file?
I think kicad only supports vrml version 2

If you use KiCad Nightlies, when you preview a STEP model it should show in the preview window. That should be the first step to make sure you are able to load STEPs.
I don’t recommend use WRL files from 3DContentCentral. I recommend use WRL files exported by StepUP tool.

If you can see the STEP model in the KiCad preview but not after add it, then it is a offset model problem.
You will need to center the model using FreeCAD. I guess StepUp tool also can aid on this process.

1 Like

I don’t see it in the preview either.

2 different versions of step.

Hi @nicholas
would you mind to try with StepUp?
here a link of a video to load and align a 3D model to its footprint directly in FreeCAD
Align 3D model to footprint with kicad StepUp
and the correspondent thread in this forum
forum thread “interactive Align 3D part to footprint”
The STEP model you will export with ksu will be aligned to kicad footprint…
PS an other thing you may have to check is if the footprint .kicad_mod and the pcb .kicad_pcb have the same wrl or step model and parameters
Maurice

EDIT
here a model done with 3d model generator
sot891_1x1_p035.wrl (23.7 KB)
sot891_1x1_p035.step (74.5 KB)

and a version without visible pins
sot891_1x1_p035.wrl (13.4 KB)
sot891_1x1_p035.step (57.4 KB)

1 Like

I dont mind using step-up, i have used it in the past.

but now i was on another computer and did not have it installed.

i will fix asap

thanks again for helping out

1 Like