← Back to team overview

kicad-developers team mailing list archive

update on 3D refactor

 

Hi folks,

 I'm currently integrating the newer 3D code into pcbnew; in the short term
this will
essentially only provide an improved file selector dialog for the
VRML/X3D/IDF
models and initially there will be some duplicated data in MODULE until we
can
replace the rendering system with the system which Mario is developing. In
the
long term the new code will allow us to render IDF component models and
ultimately IGES solid models (and hopefully STEP models within ~2 years) and
will also implement caching of the visual model data to (hopefully) help
speed up
the 3DViewer in some situations. When the new Renderer is implemented we
will
also be able to preview 3D models as we browse them and see the effect of
the
scale/offset/rotate parameters. In the future we may even provide a means to
render the MODULE pads so we can easily see the alignment of the models
with respect to a footprint.

 On the technical side, the S3D_MASTER structure will eventually be
deprecated
by a much simpler S3D_INFO structure which only contains a filename and the
scale/offset/rotation information - the vast amount of data currently
crammed
into S3D_MASTER will no longer plague the MODULE; instead the Cache Manager
will create and hold an intermediate representation of the model visual
data at the
Renderer's request and the Renderer will display that data as desired.

 The Cache Manager will be available via Prj() within pcbnew and cvpcb but
can
easily be added to eeschema if that's ever required in the future.

 One stumbling block at the moment remains the implementation of the dynamic
plugin. The plugin works fine under Linux but I need some help
checking/adding
code to ensure support under OSX and MSWin as well. Once we sort out the
issues with the 3D dynamic plugin we will also be able to create other
types of
dynamic plugins for the Import and Export functions and make significant
improvements to the maintainability of the code.  In the case of the Export
functions for example, menu items will be added dynamically and action
dispatched via the plugin interface - there will be no more need to touch
numerous
files and rebuild all of KiCad each time an exporter's code is modified or
another
exporter is added.

 Anyway, for anyone interested in helping out with the dynamic plugin
implementation on OSX and MSWin, there are notes in the 3dv/README
file in the 3d refactor branch:

https://code.launchpad.net/~cirilo-bernardo/kicad/3drefactor

- Cirilo