Export 3D plot to 3D file format

Does someone maybe knows of a project that allows exporting MPL 3D plot (mpl_toolkits.mplot3d.Axes3D) to 3D file format, like OBJ, 3DS, BLEND … any kind?

Is the savefig function what you're looking for ?

http://github.enthought.com/mayavi/mayavi/auto/mlab_figure.html

Note that as far as I know, the .mtl file associated with a given .obj file is not handled properly - all your colors will be white. Personally, I export in .vrml which suits my needs better, as it does handle colors in a satisfactory way.

Cheers,
Fréd

···

On 27/03/2012, at 11:24 AM, klo uo wrote:

Does someone maybe knows of a project that allows exporting MPL 3D plot (mpl_toolkits.mplot3d.Axes3D) to 3D file format, like OBJ, 3DS, BLEND ... any kind?
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Ah mayavi… I find it complicated for building, and in Ubuntu repository (or launchpad) there is some old version
I’ll try later today to build it

Thanks for your suggestion,
Cheers

···

On Tue, Mar 27, 2012 at 11:25 PM, Frédéric Vogt <fvogt@…2991…> wrote:

Is the savefig function what you’re looking for ?

http://github.enthought.com/mayavi/mayavi/auto/mlab_figure.html

Note that as far as I know, the .mtl file associated with a given .obj file is not handled properly - all your colors will be white. Personally, I export in .vrml which suits my needs better, as it does handle colors in a satisfactory way.

With the way matplotlib is designed and structured, it may be a while before that would be possible. It wouldn’t be impossible, mind you, but I just haven’t thought about that. Could you file a wishlist item on Github? Maybe I could steal some code from Mayavi for this idea…

In the meantime, Mayavi would be your best bet, though.

Thanks,
Ben Root

···

On Tue, Mar 27, 2012 at 5:39 PM, klo uo <klonuo@…287…> wrote:

Ah mayavi… I find it complicated for building, and in Ubuntu repository (or launchpad) there is some old version
I’ll try later today to build it

Thanks for your suggestion,
Cheers

On Tue, Mar 27, 2012 at 11:25 PM, Frédéric Vogt <fvogt@…2991…> wrote:

Is the savefig function what you’re looking for ?

http://github.enthought.com/mayavi/mayavi/auto/mlab_figure.html

Note that as far as I know, the .mtl file associated with a given .obj file is not handled properly - all your colors will be white. Personally, I export in .vrml which suits my needs better, as it does handle colors in a satisfactory way.

Yes, Mayavi seem very nice for 3D and also runs very smooth

I would expect that exporting is available by underlying VTK, but don’t know

I opened issue anyway, as suggested: https://github.com/matplotlib/matplotlib/issues/816

Cheers

···

On Thu, Apr 5, 2012 at 3:53 AM, Benjamin Root <ben.root@…3176…> wrote:

With the way matplotlib is designed and structured, it may be a while before that would be possible. It wouldn’t be impossible, mind you, but I just haven’t thought about that. Could you file a wishlist item on Github? Maybe I could steal some code from Mayavi for this idea…

In the meantime, Mayavi would be your best bet, though.