← Back to team overview

kicad-developers team mailing list archive

Re: proposed changes to S3D_MASTER to accommodate other 3D model types

 

Le 23/01/2014 08:41, Cirilo Bernardo a écrit :
> Hi folks,
> 
> It is fairly easy to use the existing scheme of 3D model selection
> for including other types of 3D models such as IDF and STEP; such
> models may be of no interest to the 3D viewer but are useful for
> other exporters such as the IDF exporter currently in development and
> the STEP model support which I still dream of.
> 
> To support the specification of various models, I propose to make
> some changes to S3D_MASTER including:
> 
> 1. introduction of an Is3DType() to determine if any particular
> consumer is interested in the model referred to by m_Shape3DName.  In
> the case of the 3D viewer any file which does not have a wrl or x3d
> extension is ignored, but for other exporters such as the VRML and
> IDF exporters, the export routines must check that the name refers to
> a type of model which they are capable of handling.
> 
> 2. The Is3DType() function relies on an internal flag being reset
> whenever the file name (m_Shape3DName) is changed. It would be crazy
> to keep track of all code which changed the name as the code evolves,
> so I propose using accessor functions to set and get the model
> filename. There are very few places in code where m_Shape3DName is
> accessed, so this is not a big job.

Sounds good.

Not sure a flag is needed.
Is3DType() could just test on the fly the file name extension.
The calculation time has no matter in this case.

> 
> Those are all the changes required to support IDFv3 component models
> (and other mechanical models in the future). I have working code on
> my local branch which implements (1) but I wanted some feedback
> before proceeding with (2).
> 
> Improving the IDF code by adding component footprint models will
> allow people who need to interact with mechanical designers to
> provide an IDF description of the board mechanics; from the
> mechanical modeling point of view this is superior to the current
> method used by people which is to convert a VRML model into a solid
> model through a variety of steps.
> 
> Any comments/suggestions?
> 
> Regards, Cirilo

Thanks.

-- 
Jean-Pierre CHARRAS


Follow ups

References