+++
title = "In Development: 3D Plugins"
date = "2016-04-08"
draft = false
aliases = [
    "/post/in-development-3d-plugins/"
]
"blog/categories" = [
    "Development Highlight"
]
+++

:icons: 
:iconsdir: /img/icons/

Seasoned KiCad users are familiar with the venerable 3DViewer tool
which has traditionally been used to help verify design by visual
inspection and to create images of what a project may look like
when it is finished. Historically the 3DViewer could only process
a very limited implementation of the VRML2 (aka VRML97) specification
as produced by the Wings3D modeler.

In the past two years various developers contributed support for VRML1
and a very limited implementation of X3D, which improved the support
for VRML generated by FreeCAD. Although this gave users
greater freedom, users remained unable to exploit the IGES and STEP
mechanical models of components as provided by many manufacturers and
retailers easily.

The ability to view such mechanical models within KiCad would give
users access to a much larger collection of models on the internet;
furthermore IGES and STEP mechanical models can eventually be used by
KiCad to provide a direct export of solid model files for use by
mechanical designers and hobbyists.

With the intention of eventual support for direct mechanical model
export as outlined long ago in
http://www.ohwr.org/projects/cern-kicad/wiki/WorkPackages#20-Improved-3D-model-support[CERN's
KiCad roadmap], a 3D Plugin system was developed to make it easier to
support arbitrary 3D model formats in the future. After almost 8
months in development the code branch has been merged with the
product branch in revision
http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/revision/6664[6664]
and has since been available in the nightly builds of KiCad.

The code branch contains the plugin system with plugins to support
IDF files (emn + emp), IDF component outlines (idf), VRML1, VRML2,
and X3D. A separate plugin project is available to view IGES and STEP
files via OpenCASCADE Community Edition (OCE) and is available at
https://github.com/cbernardo/kicad_oce_3D[kicad_oce_3D].

.STEP file shown in the 3D previewer in KiCad
image::/img/post/oce_step_20160313.png[width=100%, alt="STEP file shown in the 3D previewer in KiCad", link=/img/post/oce_step_20160313.png]

The code today gives users a view of what's to come. At the moment the
3DViewer cannot handle the new data formats used to visualize the
models so models other than X3D, VRML1, and VRML2 will only be visible
as a 3D preview in the 3D File Browser and 3D Settings windows.
A new 3DViewer is under development which can take advantage of the
new 3D plugin system and will eventually replace the existing
3DViewer, the current development branch for this can be found on:

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

All this was mainly developed by two developers. The 3D plugin system
was written by Cirilo Bernardo and the rendering code was written by
Mario Luzeiro.

NOTE: *UPDATE 2016-09-07*
The OCE plugin for STEP and IGES 3D viewer support was merged with the
offical development branch recently and should now be available in the
newest nightlies.
