← Back to team overview

kicad-developers team mailing list archive

update on 3D refactor


As part of the ongoing 3D refactor I've implemented another dummy/demo
plugin which will accept any *.wrl file and use the new intermediate scene
representation (cache data) structures to produce the 2 tetrahedra shown
in the link below. This particular demo plugin only serves as a basic
of how to make use of the new cache data structures and hopefully it will
be useful to people writing real plugins such as the VRML1,2 and X3D
plugins which will be required as part of the plan to overhaul 3DViewer.


(note: I haven't pushed this code to my branch yet, I'm just letting people
know what's going on)

One of the features of the cache data structure is that it can directly
produce VRML2 files, which is how I actually achieved the rendered
image via 'view3dscene'. Kicad will not be able to display the data until
Mario and I sort out a new renderer. On the practical side, what this
means is that any plugin which can translate the 3D model data into
the cache data representation will automatically (a) be able to be
rendered by the new (as yet non-existent) renderer, which shall make
3D model previews possible, (b) allow such models to be used within
the 3Dviewer - that is, the 3D viewer will have access to a wider
variety of model types to display, and (c) be able to produce a VRML

My next step will be to implement the first non-demo plugin, an IDF
component plugin. This will allow IDF users (depending once again
on the new Renderer) to visualize the IDF component models without
resorting to creating dummy boards and using the external idf2vrml tool.
Future plans include the development of another IDF plugin which
will use the IDF framework to render an IDF board assembly model
within kicad, but that will be a low priority item.

Once the IDF plugin is done work will continue on the new Renderer
and the overhaul of 3DViewer. I'll also start work on the Export API
with the intention of (a) overhauling at least the VRML and IDF
exporters and (b) finally adding in the IGES exporter. It is technically
possible for me to add an IGES exporter in only a few days, but I
want to implement an Export Plugin and Export API scheme to make
future code maintenance easier. Ideally I would also migrate the
Specctra DSN export and GenCAD export, but this overhaul can
always be done in stages (Specctra DSN and GenCAD may require
a broader Export API implementation than VRML or IDF require).

My experience developing this latest demo plugin has been great;
since the plugin code is not tied into kicad at a low level unlike
the existing 3D code, I was able to perform my debugging and rebuilds
without triggering a wide-scale recompile of kicad sources, which
was one objective of the rewrite.

- Cirilo