3D new library for Mechanical CAD exporting and enclosure design

and the Housing_SOIC.3dshapes for Housing_SOIC.pretty

The emissive property is indeed supported but the current renderer won’t necessarily make that obvious. The ambient lighting is strange so emissive objects don’t really appear the way you want. In the kicad VRML model repository for example, very many (perhaps most) models define the emissive element as non-zero - everything glows. This is why kicad VRML models generally look awful in other viewers.

In my VRML modeling tool I use more reasonable settings for the material properties and nothing has a non-zero emissive element unless it really emits light. Consistency in the appearance of object is also aided by the use of a specified set of material properties which are re-used by different model generators. For example the black color used for plastic header housings (among other things) is defined in a file “black.mat”:

\# Black plastic (glossy) \# Copyright 2012 Cirilo Bernardo (cjh.bernardo@gmail.com) \# License: GPLv.3 http://www.gnu.org/licenses/gpl.html \# \# VRML color scheme contributed by Sugeng

name: black
diffuse: 0.03 0.03 0.03
emissive: 0.0 0.0 0.0
specular: 0.03 0.03 0.03
ambient: 1.0
transparency: 0
shininess: 1.0

In this case the ‘shininess’ value is something I’m not happy with since it results in reflections which are too bright at some angles, but if I wanted to change that I’d simply edit the file and run my model generators to use the updated material spec. In short: define materials if you want to ensure a consistent and good look on your models.

There are some possible natural causes for this type of issues.
It may be related with a bad (== not sufficient) triangulation of the model, or bad triangle orientations/normals (bad model exporting / generation… etc).
Since the render uses per vertex illumination, if you use a very high shininess value, you will see the triangles (== not smooth surfaces), like this:

Using a lower value of shininess (like 1.0 as you are using) should help to diffuse the shine.
Also, remember the specular color is related with shininess. That is the color that is shinned.

updated PLCCs and added the MELFs…

Maui - thanks for the FC macro… was really helpful in getting this automated.
Here is my modification/upgrade of it:
KiCADinfo_FreeCAD_STEPtoVRML.py (10.6 KB)
Maybe you (or others) can use it or take bits from it.

The script checks a folder for stp files and works with them (add info, convert to vrml) if they are not in a hashfile yet. then a new hashfile is written so only new/changed files have to go through this again.
I still have to add something that adds license info to the vrml files.
Cherry on top would be if the stp file name is of the form “blahblah_T.stp” that the script would stop after setting shaded view and scaling and let me set the transparency for the part that needs it and would then go on it’s merry way… working on that over in the FC forums:
http://forum.freecadweb.org/viewtopic.php?f=22&t=13457&p=107639#p107639

@Joan_Sparky
very nice script to add some info on step file :smile:
for vrml file you could do something similar to the header

The VRML 2.0 Header and Comments
The first line of the VRML file contains the header #VRML V2.0 utf.
This identifies it as a VRML 2.0 file, as opposed to a VRML 1.0 file, for example. All VRML files must start with this header. The utf keyword refers to the UTF-8 international character set used in the file. The second line starts with the `#’ symbol. This indicates that all the text with follows it, until the end of the line is a comment, and should be ignored by the VRML software. In the example, the comment describes the contents of the scene.
http://www.agocg.ac.uk/train/vrml2rep/part1/guide3.htm

@cbernardo @kammutierspule
I also miss the ability to move the center point of the rotation view, as is usually available in 3d viewer…

An other nice option, for artistic 3d viewer, it would be to be able to add a lamp source, with some details (color, intensity, position, etc)

I think add different center points for rotation will make things (even more) “complicated to understand” for the user. That should be left to 3dmodel / MCAD editors.

Maybe I can evaluate to add lights. Any good reason for that? (I was thinking do something like that using emissive models as I explained before).
As I agree with some discussions before on 3d-viewer, adding too much options will “confuse” normal users and they will not get good results because they will not full understand or choose the correct values for parameters. So maybe it is better to not expose some o that features, so they will end always with good render results!

in case of big dimensions board, without the ability to move the rotation center it is not possible to view in zooming the peripheral of board …
moreover this is an option very common in any 3d-viewer (e.g. view3dscene, freeWRL, blender etc. have that option)
you just click in a different point and you get the rotation on that (not an option really complicated to be understood, just intuitive)

just aesthetic reason… I was just trying to follow your point of view in 3d-viewer…
As you know, my point of view is more mechanical then aesthetic…
moreover, the MCAD approach I have to 3d-viewer is aligned to what Altium is doing… as per my knowledge in Altium all models are not rendered with ligth properties, just diffuse color

so the only feature I real miss is the ability to move the rotation point, to be able to inspect the edge of board with big dimensions…

ah ok sorry, I thought you were talking in relation of 3d-models transformations…

Lets keep that idea as a wish and see in future… I experience some viewers that have that feature and some are a bit hard (for me) to understand how to use it.

@kammutierspule
so I would add these two items to my whishlist:

  1. intuitive way to move the rotation center of 3D viewer
  2. option to Hide some models (as Altium does for 3d bodies)

Both options would be very useful for 3D enclosure design and MCAD collaboration :slight_smile:
May be this is the right timing to ask, because of 3d refactoring work in progress :wink:

[quote=“kammutierspule, post:18, topic:1763”]

[quote=“maui, post:15, topic:1763”]
I also miss the ability to move the center point of the rotation view, as is usually available in 3d viewer…[/quote]
Lets keep that idea as a wish and see in future… I experience some viewers that have that feature and some are a bit hard (for me) to understand how to use it.[/quote]
Oh yes, please.
I can deal with different directions of turning the mouse wheel for zooming, I can deal with different behaviors for paning and orbitting… but what I really miss is to be able to have a custom centre point for that.

Inventor: click somewhere ON an object and this becomes your new centre for orbiting/zooming - intuitive
pcbnew: you can zoom with the mouse as centre - intuitive (I find myself cursing at a paintprog lately I use where this doesn’t happen :slight_smile:
FreeCAD: sucks, no option to get the centre point defined
KiCAD 3dviewer: sucks, no option to get the centre point defined

If you still take wishes for 3d viewer… a button or keystroke for hiding/showing 3d shapes as the menu is cumbersome for that but it’s the feature I use the most. Absolute fantastic would be on a per footprint basis, but alone a button/keystroke for all of them together would go a long way.

That should be easy features to implement, but I am still a bit faraway from start working on that.

Btw, in that “point and rotate” how do you back to usual rotate (by center of the object / board) mode?

’Fit in page’ will reset all (center view, zoom and center of rotation)


http://www.freecadweb.org/wiki/index.php?title=Mouse_Model

@Joan_Sparky
if you use ‘inventor navigation style’ in FreeCAD, when you pan (central mouse button) and double center click, then your rotation center will be moved to the cursor point…
I normally use ‘inventor navigation style’ instead of ‘CAD navigation style’ in FreeCAD

@maui
Oh my, that implementation is awkward and really useless. But thanks for the pointer. :confused:

@kammutierspule
As Maui wrote… clicking on [zoom extends] will bring you back to the objects point of centre sitting at it’s centre… that works in FreeCAD or pcbnew too :smile:

Thinking of it… Inventor has got a tool for orbit and for pan etc…
For them it’s easy to decide if one wants to set the centre point or not… if the button is released and the pointer is ‘over’ something on the object, then this becomes the point, because of the tool.

In KiCAD you don’t have this, as there is no orbit tool… so you will need some sort of timer that decides between:

  • click to select new centrepoint (if object underneath mouse pointer)
    and
  • click&hold to orbit the model

… does clicking in the 3d viewer do anything? Didn’t think so… so if the button has been released after x ms the user wants a new orbit centre… if no release until then he prolly goes for orbitting…

But just so we’re clear… the point of centre is determined by the mouse pointers position OVER the object… whatever surface is being hit first by that projected mouse-pointer-axis (which is perpendicular to the view-plane) determines the depth on that ‘axis’. This way one can’t get a rotation centre inside of something, except you reset the zoom, as then it’s back at the pcb centre again, but I never have a real prob with that in a CAD prog, so flat pcbs should be even less dramatic.

hi @all,

your 3D-contributions sound great!
i will have to try this out in the near future.
but i have a question regarding the license:
if the models are GPL - than the by Kicad generated model is also GPL…
and so iam not allowed to use this in a closed source design?

  • and if i have a customer that does not accept open source design that would mean i can not use the generated model or have to do the parts again just to be able to use theme? :worried:

ps iam willing to contribute 3D-modells of things i need…
will just have to refine some of theme before i can upload theme…

sunny greetings
stefan

@s_light
I started the 3D mechanical and parametric library mainly because
I would like to make possible to publish a full open hardware project:
- schematic, pcb and 3D mechanical model for enclosure design …

but as kicad is fine also for closed design, I would like that the library would apply to that too…

I think GPL should be fine…
there is a discussion about license and fonts on developers mailing list…
http://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg16268.html
but we could go deeper … I would appreciate any comment and suggestions…

a possible solution would be something like SnapEda has done: adding a design exception

Design Exception: The permission to propagate a work of a design formed by combining CAD symbols and 3D mechanical library, even if such propagation would otherwise violate the terms of GPL.
That would apply only to a complete assembly of board and 3D cad symbols.

I would ask also the point of view of @Joan_Sparky as a valuable contributor of the 3D library :smile:

PS
@s_light you may know that everything started from


and
http://forum.freecadweb.org/viewtopic.php?t=10815

and then I developed


and the parametric 3D models ( thanks to @hyOzd )

:slight_smile:

and looking at an other good open source eda suite
The gEDA developers found a similar solution, they have defined a exception clause for their library - just like the GPL font exception - so you can use the library also for commercial (closed) projects

http://wiki.geda-project.org/geda:license/

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

[EDIT]
and a Wayne point of view
http://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg16274.html

Query:
What kind of restrictions do I have to expect when I’m using KiCad for my designs?
Wayne reply:
None. I don’t think anyone here believes that if you use our symbols,
footprints, and/or 3D models that we own you design. If they do, we
have a serious issue.

that point of view, I think, is putting away the problem of distributing the design …
[EDIT]
and the last minute update
http://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg16679.html

Wayne Stambaugh
Tue, 08 Dec 2015 06:50:24 -0800

I just wanted to give everyone a heads up that I did not forget about our library license issue. I sent a modified version of the gEDA symbol library (GPL font exception) to the FSF for comment on November 20. I received a reply that they are looking at and will get back to me. I’m not sure what is taking so long but as I’m not a lawyer, I would rather get some feedback before making it public. As soon as I hear back from the FSF and we have an acceptable license, I will forward the license to the library and website devs. Who knows, if I did a good enough job, maybe I can start my second career as lawyer. :wink: Cheers,

Wayne

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: