3D new library for Mechanical CAD exporting and enclosure design

:thumbsup:

Where did you render that?
When can I try that models on kicad?

Most of the models are the ones I already share… and @maui should have some of them even refined with specularity/reflections…

I used the new script of @maui to upgrade my VRML exports, then he pointed me to a script from some bloke on FreeCAD forums that can export FreeCAD meshes to povray with colors (not materials or surface smoothing unfortunately) and now I’ve got povray rendering automated:

I could do this all day :laughing:

I’ll upload the script next so you can have a play with it.
The models I need to go over again, as some of them have legacy issues.

4 Likes

I played a bit with Blender scripting


thanks to @Joan_Sparky to point out the smoothing part of the rendering :smiley:

just an info: FreeCAD 0.16 stable has been released :wink:

2 Likes

script is on github:

works for me with:

  • FreeCAD 0.16 latest nightly
  • POVray 3.7
  • KiCAD latest nightly
2 Likes

If you don’t mind, i will use the license adding stuff from this script within the step and wrl export features for the scripted 3d parts. I should be finished by later today.

2 Likes

@Rene_Poschl @Joan_Sparky
if it is fine for both of you, I would add to the module 3D license something like gEDA:

As a special exception, if you create a design which uses this symbol, and embed this symbol or unaltered portions of this symbol into the design, this symbol does not by itself cause the resulting design to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the design itself might be covered by the GNU General Public License. If you modify this symbol, you may extend this exception to your version of the symbol, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version

This is also in planning to be done for KiCad libraries too…
Maurice

Did they finally got back to you on that one?

No problem from my end.

Not really, but we can precede them :wink: (and in fact follow gEDA people)

2 Likes

My script is finished. I just send the pull request.
The current versions of my XH connectors can be found over at my repository.
I used GPL v2 (or newer) with the symbol exception from above.
Should this exception also be within the license file of the repo?

2 Likes

I merged your code… going to test it

perfect!

if you mean the license for the scripts, I would stay on GPL2 for those; just the models would need this exception for an easy ECAD MCAD collaboration

I think that many kicad users and @kammutierspule would appreciate these nice rendering with material properties 3D models …

Thanx for contributing… :smiley:
Maurice

2 Likes

With the merge of the new 3D plugin system into the KiCad main branch, you should now be able to view STEP models at least in the 3D browser preview - but due to various issues not yet fully resolved, the OCE-based STEP support is in a separate project:

To actually see the results in the 3D viewer you will need to use Mario’s branch:

https://code.launchpad.net/~mrluzeiro/kicad/kicad_new3d-viewer

I’ve added a feature in the 3D preview which renders a simplified model of the component footprint so that the user can align the model within the preview page, but that feature hasn’t been merged yet:

https://drive.google.com/open?id=0By_XTJN-s8aXUjZtV3otV2EzU0k

However, at the moment the only sensible way to produce a STEP assembly is to use Maurice’s StepUp tool. If you use Mario’s new 3D viewer branch, you will be able to assign STEP models rather than VRML models and forget about producing an intermediate VRML model. I’ll nag people to use Mario’s branch because we need more users trying it and giving feedback. When the time comes to propose a merge it will be good to have a lot of regular users posting on the comments about how they love the new viewer and want it in the main branch.

I also need people (devs) to test the 3D OCE plugin and some help ensuring that it installs and works on OSX and MSWin.

2 Likes

I’m a real noob when it comes to compiling/etc… any chance there is a simple step-by-step tutorial how to set this up or even more convenient (for me) a pre-compiled binary for windows? :blush:

I’ll ask our awesome volunteers if they can set up an automated build of Mario’s branch for OSX and MSWin. I’m sure there’s also a Linux build but I’m not sure which particular distro/release. Building the OCE plugin is a different matter though - I have to find specific devs to help out to get the project to a point where automated builds can be done. I have a sinking feeling that the automated builds will need to build OCE on OSX and MSWin (but not necessarily on linux).

Don’t stress it, I just asked this direction as I have not enough time to bughunt a compiling system/setup to get KiCAD working from source - at least not yet.
Unless you need a lot of testers for that/those branches I’d rather see you guys doing more worthwhile work :wink:

@Joan_Sparky I love that macro!
I made a subset of that just to create a preview of all my 3D models … it works like a charm :smiley:

1 Like

I think I sat there and looked at mine for 15 min yesterday :wink:

OK, didn’t just look, I checked them over and picked the ones with wrong materials or other stuff…

1 Like

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 ?