← Back to team overview

kicad-developers team mailing list archive

Re: update on 3D refactor

 

On Sat, Oct 3, 2015 at 7:50 PM, Mário Luzeiro <mrluzeiro@xxxxx> wrote:

> Hi Cirilo, all,
>
> In Kicad at this moment, you select the "3D shape name" in "3D Settings"
> in "Footprint Properties" in the Pcbnew.
> Also, there is the option to set the default Path and then the 3D scale
> and Position.
>
>
Yes, this will all disappear. At the very least the contents of the 3D
Model tab should
be populated by the 3D manager, but we also have the option to remove the
tabs and
just add a button "3D Models".


> Should that "3d path config dialog" and "file browser dialog" be developed
> in/for the Pcbnew instead of do it related with "3D Viewer"?
>
>
No, in principle these items have almost nothing to do with pcbnew. What if
someone
decided in the future that they want to allow model selection in eeschema?
I see no
sense at all in tying these dialogs exclusively to pcbnew. The reason for
the refactor
is that too many items are too strongly coupled to pcbnew and it is making
the code
unnecessarily difficult to maintain.


> IMO "3D viewer" should only have source code related with visualization.
> The paths and "3d model file names" (and 3D scale and position
> information) are something related with the kicad_pcb project.
>
>
The refactor is not limited to 3DViewer; it was always going to be a large
overhaul of
the management of 3D models so that in the future it is trivial to add
support for yet
another model. At the moment for example you have to make numerous changes
to
3D viewer as well as pcbnew every time you want to add a model, and there
is no
need for such complexity. With the new scheme the model manager will load
plugins
and dynamically adapt the file selection dialogs to list more file
extension filters etc.

- Cirilo


(As I discuss before) I believe you still can do that dialogs in Pcbnew and
> then pass the full path to (some module in) 3D viewer to load and render
> that 3D file.
>
>
> Is there anyone with minimal interest in 3D things of kicad that can also
> comment / give feedback on this subject, so it will not be only me to reply
> o Cirilo's emails?! :)
>
> Mario
>
> ________________________________________
> From: Kicad-developers [kicad-developers-bounces+mrluzeiro=
> ua.pt@xxxxxxxxxxxxxxxxxxx] on behalf of Cirilo Bernardo [
> cirilo.bernardo@xxxxxxxxx]
> Sent: 03 October 2015 09:45
> To: KiCad Developers
> Subject: [Kicad-developers] update on 3D refactor
>
> If anyone has time to have a peek at my 3D refactor branch:
>
> bazaar.launchpad.net/~cirilo-bernardo/kicad/3drefactor<
> http://bazaar.launchpad.net/~cirilo-bernardo/kicad/3drefactor>
>
> the existing code can be built within the build/3dv subdirectory after
> configuring kicad for compilation. The kicad code itself is quite a few
> revisions out of date but that doesn't matter at this point since the
> code being developed is not yet touching any other kicad code and
> the test program 'test3dmm' can be built on its own.
>
> At the moment the code will only work on Linux (i'll need help getting
> the plugin loading to work on OSX and MSWin) and you can't currently
> see how the plugin will affect the list of models which you can associate
> since I haven't made the file browser dialog yet, but what you can see
> at the moment is the  3D model path configuration dialog which is
> accessible from File->Select (ctrl-t). I'd appreciate any feedback on the
> path configuration dialog at this stage since I'd like to avoid doing too
> much work which people might not like.
>
> The 3d path config dialog allows a user to edit the list of paths which
> will be searched if a PCB file names a relative filename. There is also
> an implied entry (never saved and never displayed) which is the current
> project directory.
>
> I'll work on the model file selector next, which isn't as simple an item
> as it may sound, and should be able to implement all but the preview
> of the model being browsed.
>
> One other item I'd like feedback on: should we still give the user the
> option to save a full path or shall we automatically use a full path if
> none of the configured paths are a root path of the model and in all
> other cases automatically truncate paths to a root path stored in
> the config file? The one possibly big problem with using all relative
> paths of couse is that is a user accidentally modifies/deletes paths
> using the configurator, a project may not be able to find some (or all)
> of its model files.
>
> - Cirilo
>

Follow ups

References