By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,885 Members | 1,205 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,885 IT Pros & Developers. It's quick & easy.

3D geometry module?

P: n/a
Hi,

Is there a general purpose 3D geometry module for Python? I would like
to be able to read / write 3D models and perform per vertex / per face
operations on them.

Failing that, are there vector / matrix / quaternion classes I can make
use of?

Thanks..

Will McGugan
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Will McGugan wrote:
Hi,

Is there a general purpose 3D geometry module for Python? I would like
to be able to read / write 3D models and perform per vertex / per face
operations on them.
Pivy gives you an Inventor mechanism for loading .iv and .wrl (VRML97)
files, not sure how it handles exposing faces/points, but I'd imagine
it's fairly straightforward.

OpenGLContext will read/write VRML97 files, and (though it's not set up
for it as an API feature) let you process the vertices/faces (there's
code in there that will tessellate the faces, for instance, though you
need an OpenGL context to do it), see the IndexedFaceSet implementation
for example code.

There is at least one module that loads 3DS files.

You could use Blender's in-program scripting support for any format it
supports.

I think the U of Waterloo people have a .obj loader, but I'm not sure if
it's open-source or not.

Don't think anyone has a 3DSMax .ASC loader, (which would be really nice).
Failing that, are there vector / matrix / quaternion classes I can
make use of?


I tend to use Numpy for vector and matrix. Both PyOpenGL and
OpenGLContext have quaternion classes available, there's a few more in
various other packages.

Have fun,
Mike

________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com

Jul 18 '05 #2

P: n/a
On Thu, 26 Aug 2004 17:01:20 +0100, Will McGugan wrote:
Hi,

Is there a general purpose 3D geometry module for Python? I would like to
be able to read / write 3D models and perform per vertex / per face
operations on them.

Failing that, are there vector / matrix / quaternion classes I can make
use of?


cgkit has 3d/4d matrix/vector classes.. and it's fast, if you need that.

Simon.

Jul 18 '05 #3

P: n/a
>>>>> "Will" == Will McGugan <ne**@NOwillmcguganSPAM.com> writes:

Will> Hi, Is there a general purpose 3D geometry module for
Will> Python? I would like to be able to read / write 3D models
Will> and perform per vertex / per face operations on them.

Will> Failing that, are there vector / matrix / quaternion classes
Will> I can make use of?

VTK is absolutely astounding in depth, breadth and quality, and has a
full python wrapper. For win32, the enthought edition of python has
VTK built in.

Can take years to wrap your head around, though, in my experience.
It's that big.

JDH
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.