← Back to team overview

kicad-developers team mailing list archive

Re: 3d-viewer future discussion

 

On Mon, Mar 30, 2015 at 7:11 AM, Mário Luzeiro <mrluzeiro@xxxxx> wrote:

> Hello all,
>
> I am bringing here today some discussion about 3d-viewer future.
> Special I am looking for the 3d-viewer user opinions and for a technical
> opinion from GAL and Pcbnew developers.
>
> When I started my contributions to 3d-viewer, I noticed that it was a
> kicad's forgotten piece. I rewrite some parts, improve a bit other.. a bit
> of wire, tape.. and decorations.
> There are still some room for improvement, however, the way it is now,
> there is no possibility to make huge advances in functionalities and
> features.
>
> The way it is now is a good candidate for the next stable versions, small
> improvements of fixes can still be supported, but for myself I am not
> enthusiast adding more features as it is.
>
> Are there any old discussed ideas for the 3d-viewer?
>
> I see the 3d functionality in a PCB Cad software with two big group
> functionalities:
>
> 1 - Full integrated (with pcbnew and all kicad) 3D designer.
> 2 - Visualization tool.
>
> For 1, I see two options
> 1A - Help to design the PCB (example, component placement in real-time
> visualization, 2D track design... 3D position in the board.. )
> 1B - Things that ultimately lead to have 3D DRC.
>
>
I think the 3D positioning of components is nothing more than a marketing
gimmick.
Most people have difficulty processing spatial information, so a 3D visual
for placing
components if anything only makes life more difficult for those people. For
people
like me who can imagine complex assemblies in 3D this 3D placement is only a
nuisance because it provides a lot of extra information which has no value.
The
component courtyards are probably one of the best assets for helping with
placement
and in the case of mechanical devices + electronic components if the
designer
cannot handle the information without a 3D viewer then they should be
working
with MCAD people to do formal checks rather than relying on what they
imagine
they see. It is not unusual for mechanical components to obscure so much
that
you cannot possibly see the interference and you need to perform volume
collision
tests and take tolerances into account; you cannot do that with 3D
visualization
and the users will be fooling themselves. For less complex mechanics the
VRML
viewer may be good enough provided the models used are good enough, but even
in fairly trivial situations there is no guarantee that the designer will
get it right
without more formal checks.



> For 2, I see two options
> 2A - A visualization CAD (thats what KiCad 3d-viewer is much now),
> eventually with assembly check and some details.
> 2B - A realistic rendering ("marketing eye-candy material")
>
> So, right now it is a bit of 2A and a bit of 2B, but from 1, all we have
> is the model list, position, scale, rotation information and there are any
> other communication or design features.
>
>
What features would you want to add and how will they be useful? From my
perspective what needs to happen to the 3D model component is for some
thought to go into how we handle different model formats and how we
determine
what code module makes use of different types of 3D models. In addition all
models of course may have an arbitrary orientation and position and in the
case
of VRML models even an arbitrary scaling. Handling the orientation is
trivial but
how about the translation (offset)? What units do we use for the
translation?
The VRML models for example use 0.1inch = 1 unit but for IDF models what
would we use and how do we ensure the correct translation on the PCB
whatever
the selected output units is (mm/inch/mil). Any other MCAD model will share
the same issue as the IDF models.

So I imagine we need an API for specifying what type of model to load and
what
orientation/offset is required; this can be similar in many ways to the
File IO plugin.
Each model, whatever it is, must be the member of a base 3D model class.
This
class will present other code modules with information about the type of
model
it is storing - perhaps even a simple enum to let you know if the model is
VRML(1,2)/x3d(ascii, binary)/IGES/STEP/whatever. Another function should let
you know if the object supports display of the model. For example the
VRML/x3d
models all support display; the IDF models currently do not but it is not a
big
job to create a representation for display. The IGES models will not create
a
representation for display, but if someone had the time to implement one it
can certainly be done (though nowhere near as simple as displaying IDF).
But a future 3D viewer for example might have access to IDF and IGES modules
which will support display, so your 3D view can be a mix of models. Do we
even entertain such a thing or just say "no, only VRML/x3D shall ever be
used
for 3D model display", in which case only the VRML/x3d modules will say that
they support display?

One thing which many of us agreed should happen with the 3D model, and
VRML/x3d in particular, is that model data needs to be cached rather than
loading a model 1,000 times if there are 1000 instances of a component
and also to save time when reloading the board data and refreshing the
display. Another thing which would be nice is better support of the VRML
and x3d specifications, but I cannot imagine a good way to do this without
a major refactor. In cases where there are no normals we would need to
somehow create cache files of the normals.

- Cirilo


> I was checking a bit what other commercial software packages do, I found
> Xpedition from Mentor Graphics.. it looks very capable/featured for me (but
> Kicad 3d-viewer look quality if better IMO!)
> https://www.youtube.com/watch?v=CGn6JU3fWnM
> https://www.youtube.com/watch?v=EjG__1vL24w
> http://www.mentor.com/pcb/xpedition/3d-layout/
>
>
> How interesting (as a user utility and as for KiCad project) will be in
> the future this type of features? Since schematic and PCB design part is
> almost perfect :P I think that 3d-viewer could be in 3rd position of
> priorities :)
>
> In any case, any future improvements for 3d-viewer, should be developed in
> a closed discussion with GAL and Pcbnew guys, since both are using openGL
> libraries and at least maybe some source code could be reused. Then, if we
> want to archive real-time, a good communication and architecture must be
> defined to be able to pcbnew and 3d-viewer to talk to each other (same way
> schematic editor is doing with pcbnew).
>
> Of course, IMO, resources and efforts shall not be spent from the main
> development goals since this would be a 3rd priority. In other way, for
> people like me, that are just contribute for pleasure in this 3D area, this
> nice 3rd priority contributions can be taken.
>
> Let me know your thoughts to see how I can contribute in the future in
> this area.
>
> Regards,
> Mario Luzeiro
>

Follow ups

References