3D Models KiCAD Wishlist

That is my point, when you think in a (art) render you have to target your software that will be used for the rendering. Maybe Blender is not using/importing properly the VRML materials and will have other ways to set their internal proper materials. In case of kicad render, it is (and will) only use materials based on what VRML are able to offer.

So if your target is Blender, you have to learn how Blender will better render your models.

Ah oks, I gave positive feedback related with the format of the generated VRML (generated file). This is not related with the of the model it self.
On this case I was giving general feedback to @Joan_Sparky
I think that will be helpful so you can evaluate yourself your results.

So for example, I can give my feedback and say: For the KiCad render, for a transparent surface, it is better to have just a single layer with the transparency instead of a solid transparent surface.
But it is up to you to make it this way or not, you are the engineer / artist!

Texture materials are VRML basic material properties and are not implemented in Kicad, because the internal routines are not based on standard VRML libs…
so that why the rendering is missing aspects…
also light sources are missing in kicad 3d-viewer
in kicad 3d-rendering for example the shadow is calculated only on pcb board and not on 3d models, and if you turn the board up-side down the shadows disappear…
so that is why I migrated my interest for materials in Blender and not in kicad 3d-viewer…
but anyway that is totally an other subject…


please don’t consider that personally, I appreciate the 3d-viewer, but at the same time if you want professional realistic rendering or you add all professional tools or you accept that the result would be in a lesser realistic ambient

Maurice, I would be very happy if it will be possible to get by somehow renders (like yours) with external software renders for the KiCad projects…
No matter how good 3D-Viewer will become, that will be just an embedded tool and could never substitute a proper 3D software render or a MCAD software (that is why we tell people to use a MCAD for mechanic evaluation) …

We are lucky to not be a company and not have to follow strict product roadmaps or design impositions. That is why is wonderful to have this chaos and be able to offer lots of (hopefully good) options to the users!

Hello!

Thank you very much for the crystal models. I will used it when I can .

Best regards,

Javier

Hello!,

I use this capacitors https://github.com/easyw/kicad-3d-mcad-models/tree/master/Capacitors_SMD.3dshapes

But I have a problem, and that are higher than the GH JST connectors. Is there anyone with this height?

Height - Seated (Max) 0.126" (3.20mm)

http://media.digikey.com/pdf/Data%20Sheets/Nichicon%20PDFs/ZD_Series.pdf

ZD series from Nichicon.

Best regards

Hi,
those caps are coming from FC parametric generator routines here


if you change the parameters inside the .py descriptor file
https://github.com/easyw/kicad-3d-models-in-freecad/blob/master/cadquery/FCAD_script_generator/cq_params_radial_smd_cap.py
you can generate a cap with your custom dimensions
Anyway, if I get some spare time I will upload it later on the day…
Cheers
M

Hi!,

I edited the file so:  

# -*- coding: utf8 -*-
#!/usr/bin/python
#
# This is derived from a cadquery script for generating QFP/GullWings models in X3D format.
#
# from https://bitbucket.org/hyOzd/freecad-macros
# author hyOzd
#
# Dimensions are from Jedec MS-026D document.

## file of parametric definitions

from collections import namedtuple

destination_dir="/generated_cap/"
# destination_dir="./"

# body color
base_color = (39,39,39)
body_color = (220,220,220)
mark_color = (39,39,39)
pins_color = (240, 240, 240)


### Parametric Values
##
Params = namedtuple("Params", [
    'L',   # overall height
    'D',   # diameter
    'A',   # base width (x&y)
    'H',   # max width (x) with pins
    'P',   # distance between pins
    'W',   # pin width
    'modelName', # modelName
    'rotation',  # rotation if required
    'dest_dir_prefix' #destination dir prefix
])

all_params_radial_smd_cap = {# Aluminum SMD capacitors
        # Dimensions per http://industrial.panasonic.com/lecs/www-data/pdf/ABA0000/ABA0000PE369.pdf
    "G_D100_L100" : Params( # note L model height
        L         =10.2,    # overall height
        D         =10.,     # diameter
        A         =10.3,    # base width (x&y)
        H         =12.,     # max width (x) with pins
        P         =4.6,     # distance between pins
        W         =0.9,     # pin width
        modelName = 'c_el_G_D100_L100', #modelName
        rotation  = -90, # rotation if required
        dest_dir_prefix = 'cap_El_smd'
    ),
    "F_D80_L100" : Params( # note L model height
        L         =10.2,    # overall height
        D         =8.,     # diameter
        A         =8.3,    # base width (x&y)
        H         =10.,     # max width (x) with pins
        P         =3.1,     # distance between pins
        W         =0.9,     # pin width
        modelName = 'c_el_F_D80_L100', #modelName
        rotation  = -90, # rotation if required
        dest_dir_prefix = 'cap_El_smd'
    ),
    "E_D80_L62" : Params( # note L model height
        L         =6.2,    # overall height
        D         =8.,     # diameter
        A         =8.3,    # base width (x&y)
        H         =9.5,     # max width (x) with pins
        P         =2.2,     # distance between pins
        W         =0.65,     # pin width
        modelName = 'c_el_E_D80_L62', #modelName
        rotation  = -90, # rotation if required
        dest_dir_prefix = 'cap_El_smd'
    ),
    "D8_D63_L77" : Params( # note L model height
        L         =7.7,    # overall height
        D         =6.3,     # diameter
        A         =6.6,    # base width (x&y)
        H         =7.8,     # max width (x) with pins
        P         =1.8,     # distance between pins
        W         =0.65,     # pin width
        modelName = 'c_el_D8_D63_L77', #modelName
        rotation  = -90, # rotation if required
        dest_dir_prefix = 'cap_El_smd'
    ),
    "D_D63_L54" : Params( # note L model height
        L         =3.2,    # overall height
        D         =6.3,     # diameter
        A         =6.6,    # base width (x&y)
        H         =7.8,     # max width (x) with pins
        P         =1.8,     # distance between pins
        W         =0.65,     # pin width
        modelName = 'c_el_D_D63_L54', #modelName
        rotation  = -90, # rotation if required
        dest_dir_prefix = 'cap_El_smd'
    ),
    "C_D50_L54" : Params( # note L model height
        L         =3.2,    # overall height
        D         =5.0,     # diameter
        A         =5.3,    # base width (x&y)
        H         =6.5,     # max width (x) with pins
        P         =1.5,     # distance between pins
        W         =0.65,     # pin width
        modelName = 'c_el_C_D50_L54', #modelName
        rotation  = -90, # rotation if required
        dest_dir_prefix = 'cap_El_smd'
    ),
    "B_D40_L54" : Params( # note L model height
        L         =3.2,    # overall height
        D         =4.0,     # diameter
        A         =4.3,    # base width (x&y)
        H         =5.5,     # max width (x) with pins
        P         =1.0,     # distance between pins
        W         =0.65,     # pin width
        modelName = 'c_el_B_D40_L54', #modelName
        rotation  = -90, # rotation if required
        dest_dir_prefix = 'cap_El_smd'
    ),
}

And I saved as cq_params_radial_smd_cap_custom.py, but I generate it.

Thanks and regards

c’mon … read a bit at least the doc :wink:
https://github.com/easyw/kicad-3d-models-in-freecad/blob/master/cadquery/FCAD_script_generator/FC-script-generator-starter-Guide.pdf

anyway, once you have modified the ‘cq_params_radial_smd_cap_custom.py’, you can launch the FC generator with the command as in github
e.g. for F model:
start "" "c:\FreeCAD\bin\freecad" make_radial_smd_export_fc.py F_D08_L10

https://github.com/easyw/kicad-3d-models-in-freecad/blob/master/cadquery/FCAD_script_generator/launch-cq-cap-Al_F.bat

please let me know if I can be of further assistance :smiley:

Hi!,

Sorry for my stupid question but I read the documentation a few days ago when I installed your tools but had not understood these steps.

Thank you very much for the clarification. I use Linux, it worked perfectly.

I love your scripts. They are awesome.

Now I’m looking forward to test render in Blender.

Best regards

@raspdroid those scripts were made before my new VRML exporting routine, fully compatible with Blender…
I didn’t have time to update those with the new routines, so for the moment, to see your VRML in Blender there are two options:

  1. use the Blender workaround as pointed out in the kicadStepUp-starter-Guide
  2. convert all your STEP models to VRML through the new kicadStepUp tools
    I would suggest the 2nd one, which will give you also smaller VRML models in file size…
    It could be a little annoying, but the process should be quite rapid
  • open kicad StepUp tools Macro in FC
  • open a STEP model, select it
  • click on ‘Export to kicad’ button
  • copy the generated VRML models (typically in $HOME) to their respective places in your kicad 3D path
  • confirm VRML overwrite, skip STEP overwrite
    That should a quite easy process…
    Then just export your pcb and parts to VRML from kicad File, Export VRML Menu
    I’m going to see if I can update my scripts and libs with the new Blender compatibility VRML models
    Cheers
    Maurice
    PS would you mind to post your renders? :smiley:

Of course not.

Thank you for your time.

I’ll try as soon as possible. I have yet many things to do, but it is worth to get familiar with the tools.




I have to check the battery step file because it is not positioned well in FC.

The SMD LEDs are very large. They are the only ones I’ve found.

3D models are from JoanSpark library, EasyW, Molex, JST and 3dContentCentral (the battery).

Thanks very much to alls.

Regards

PS: This is the Autopilot to Raspberry Pi Zero.

3D models are from JoanSparky library, EasyW library, Samtec, Osram, Abracon.

uC is a NXP LPC1549JDB ARM Cortex M3.

https://www.raspberrypi.org/forums/download/file.php?id=13312

https://www.raspberrypi.org/forums/download/file.php?id=13303

https://www.raspberrypi.org/forums/download/file.php?id=13305

https://www.raspberrypi.org/forums/download/file.php?id=13304

Just open the footprint in FreeCAD with the kicadStepUp tools import the STEP model of the battery and align it, then click Export to kicad: STEP and VRML … that’s it :smiley:

have a look at
http://www.3dcontentcentral.com/Search.aspx?arg=led%200603

PS Nice board :smiley:
PPS I don’t see colors for the capacitors… are you under debian? or are you using FreeCAD 0.14? If you send me the dimensions of the capacitors you have generated, I will send you a colored version …
M

Battery aligned, thank you!

Thank you for the leds, but when I open one in FC I find more objects, if selected each and pulse on “Rotate X” say “Select ONE single part object”. How I can group objects ?, I’ve been looking for an option, as in InkScape, Shift + Ctrl + U, Ctrl + G or the like but can not find.

Thanks again!

Ubuntu 15.10 with KDE, 4.2.0-25-generic #30-Ubuntu SMP Mon Jan 18 12:31:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

OS: Ubuntu 15.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6420 (Git)
Build type: None
Branch: master
Python version: 2.7.10
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

I created a SCRIPTS folder into DR8 KiCAD project and I added yours scripts, cq_cad_tools.py, make_radial_smd_export.fc.py and edited cq_params_radial_smd_cap.py file with this content:

# -*- coding: utf8 -*-
#!/usr/bin/python
#
# This is derived from a cadquery script for generating QFP/GullWings models in X3D format.
#
# from https://bitbucket.org/hyOzd/freecad-macros
# author hyOzd
#
# Dimensions are from Jedec MS-026D document.

## file of parametric definitions

from collections import namedtuple

destination_dir="/generated_cap/"
# destination_dir="./"

# body color
base_color = (39,39,39)
body_color = (220,220,220)
mark_color = (39,39,39)
pins_color = (240, 240, 240)


### Parametric Values
##
Params = namedtuple("Params", [
    'L',   # overall height
    'D',   # diameter
    'A',   # base width (x&y)
    'H',   # max width (x) with pins
    'P',   # distance between pins
    'W',   # pin width
    'modelName', # modelName
    'rotation',  # rotation if required
    'dest_dir_prefix' #destination dir prefix
])

all_params_radial_smd_cap = {# Aluminum SMD capacitors
        # Dimensions per http://media.digikey.com/pdf/Data%20Sheets/Nichicon%20PDFs/ZD_Series.pdf
    
    "UZD1E2R2MCL1GB" : Params( # note L model height
        L         =3.2,    # overall height
        D         =4.0,     # diameter
        A         =4.3,    # base width (x&y)
        H         =4.6,     # max width (x) with pins
        P         =1.0,     # distance between pins
        W         =0.65,     # pin width
        modelName = 'c_el_UZD1E2R2MCL1GB', #modelName
        rotation  = -90, # rotation if required
        dest_dir_prefix = 'cap_DR8'
    ),
    "UZD1C100MCL1GB" : Params( # note L model height
        L         =3.2,    # overall height
        D         =5.0,     # diameter
        A         =5.3,    # base width (x&y)
        H         =5.5,     # max width (x) with pins
        P         =1.3,     # distance between pins
        W         =0.65,     # pin width
        modelName = 'c_el_UZD1C100MCL1GB', #modelName
        rotation  = -90, # rotation if required
        dest_dir_prefix = 'cap_DR8'
    ),
}

In make_radial_smd_export_fc.py file I changed model_to_build to this model_to_build=‘UZD1E2R2MCL1GB’

I ran the make script and magic!

https://drive.google.com/folderview?id=0BwPVE6P4dzOCcFdGZUJYdEVuQzg&usp=sharing

Greetings!

in FreeCAD you need to select Part WorkBench, then select the objects and make a fusion (union) of parts
http://www.freecadweb.org/wiki/?title=Workbenches
It is already pointed out in the kicadStepUp-starter-Guide that all models need to be a single object
here some tricks in case of problems in fusion
http://forum.freecadweb.org/viewtopic.php?t=8451#p69489

your STEP models are fine and colored, probably you get the assembly with wrong colors because you have some part not as single part (the battery?)… the new GUI should warn you about that…
M

With LEDs I did the fusion but when I try to export FC is closed.

*** Abort *** an exception was raised, but no catch was found.
… The exception is:SIGSEGV ‘segmentation violation’ detected. Address 28

https://drive.google.com/file/d/0BwPVE6P4dzOCZ25kUmxtWU4xOWM/view?usp=sharing

PS:

gdb freecad

run

bt


Program received signal SIGSEGV, Segmentation fault.

0x00007fff76a1be80 in Transfer_TransientListBinder::NbTransients() const () from /usr/lib/x86_64-linux-gnu/libTKXSBase.so.10

(gdb) bt

#0 0x00007fff76a1be80 in Transfer_TransientListBinder::NbTransients() const () from /usr/lib/x86_64-linux-gnu/libTKXSBase.so.10

#1 0x00007fff70b644da in ?? () from /usr/lib/x86_64-linux-gnu/libTKXDESTEP.so.10

#2 0x00007fff70b64e25 in ?? () from /usr/lib/x86_64-linux-gnu/libTKXDESTEP.so.10

#3 0x00007fff70b65181 in ?? () from /usr/lib/x86_64-linux-gnu/libTKXDESTEP.so.10

#4 0x00007fff70b65181 in ?? () from /usr/lib/x86_64-linux-gnu/libTKXDESTEP.so.10

#5 0x00007fff70b65181 in ?? () from /usr/lib/x86_64-linux-gnu/libTKXDESTEP.so.10

#6 0x00007fff70b65b16 in STEPCAFControl_Writer::WriteColors(Handle_XSControl_WorkSession const&, TDF_LabelSequence const&) ()

from /usr/lib/x86_64-linux-gnu/libTKXDESTEP.so.10

#7 0x00007fff70b71583 in STEPCAFControl_Writer::Transfer(STEPControl_Writer&, TDF_LabelSequence const&, STEPControl_StepModelType, char const*, bool) () from /usr/lib/x86_64-linux-gnu/libTKXDESTEP.so.10

#8 0x00007fff70b71af7 in STEPCAFControl_Writer::Transfer(Handle_TDocStd_Document const&, STEPControl_StepModelType, char const*) ()

from /usr/lib/x86_64-linux-gnu/libTKXDESTEP.so.10

#9 0x00007fff70fc6d40 in ImportGui::Module::exporter(Py::Tuple const&) () from /usr/lib/freecad/lib/ImportGui.so

#10 0x00007fff70fc349a in Py::ExtensionModuleImportGui::Module::invoke_method_varargs(void*, Py::Tuple const&) ()

from /usr/lib/freecad/lib/ImportGui.so

#11 0x00007ffff6a97b4c in method_varargs_call_handler () from /usr/lib/freecad/lib/libFreeCADBase.so

#12 0x00007ffff6566267 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#13 0x00007ffff669d08c in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

—Type to continue, or q to quit—

#14 0x00007ffff655dd09 in PyEval_EvalCode () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#15 0x00007ffff6605286 in PyRun_StringFlags () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#16 0x00007ffff6abc716 in Base::InterpreterSingleton::runString[abi:cxx11](char const*) () from /usr/lib/freecad/lib/libFreeCADBase.so

#17 0x00007ffff741dd20 in Gui::Application::runPythonCode(char const*, bool, bool) () from /usr/lib/freecad/lib/libFreeCADGui.so

#18 0x00007ffff7421837 in Gui::Application::exportTo(char const*, char const*, char const*) () from /usr/lib/freecad/lib/libFreeCADGui.so

#19 0x00007ffff7493330 in StdCmdExport::activated(int) () from /usr/lib/freecad/lib/libFreeCADGui.so

#20 0x00007ffff748bdac in Gui::Command::invoke(int) () from /usr/lib/freecad/lib/libFreeCADGui.so

#21 0x00007ffff5471f60 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

#22 0x00007ffff5983a42 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#23 0x00007ffff5984da3 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#24 0x00007ffff5de442d in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#25 0x00007ffff5de8829 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#26 0x00007ffff59dde20 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#27 0x00007ffff5deca9b in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#28 0x00007ffff5989cdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#29 0x00007ffff5990dd6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#30 0x00007ffff74687b5 in Gui::GUIApplication::notify(QObject*, QEvent*) () from /usr/lib/freecad/lib/libFreeCADGui.so

#31 0x00007ffff545d85d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

—Type to continue, or q to quit—

#32 0x00007ffff59903dd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) ()

from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#33 0x00007ffff5a0c3a2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#34 0x00007ffff5a0b223 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#35 0x00007ffff5a34b52 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#36 0x00007fffee083ff7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0

#37 0x00007fffee084250 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0

#38 0x00007fffee0842fc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0

#39 0x00007ffff548e1ee in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) ()

from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

#40 0x00007ffff5a34c26 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

#41 0x00007ffff545c0d1 in QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

#42 0x00007ffff545c445 in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

#43 0x00007ffff5462429 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

#44 0x00007ffff7426460 in Gui::Application::runApplication() () from /usr/lib/freecad/lib/libFreeCADGui.so

#45 0x0000000000403400 in main ()

Now the capacitors have colors. :slight_smile:

Well done! You have learnt a lot!
Next time everything will be much easier :smiley: