473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

3D geometry module?

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
3 3001
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
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
>>>>> "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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dennis Benzinger | last post by:
Hi! Does anyone know of Python bindings for the Computational Geometry Algorithms Library (http://www.cgal.org/)?
0
by: Gabriel B. | last post by:
i'm using almost every widget property from my pyTk programs in the form of resources, like: self.tk.option_add ( "*InputClass*background", "White" ) In the widget creation i have only the Class...
5
by: Jon | last post by:
Hello all, I'm certain this question has been asked before; I was unsure what terms to search for within the newsgroup archive to find the proper answer I wanted. Hopefully someone can point me...
7
by: Maxim Shemanarev | last post by:
I'd like to announce my project called Anti-Grain Geometry. http://www.antigrain.com Anti-Grain Geometry (AGG) is an Open Source, free of charge graphic library, written in industrially standard...
3
by: Otavio Macedo | last post by:
Hi, I am working with MySQL 4.1 and I got a table with a point field. I need to do an "offset" in all the points, that is, adding some deltaX to the X coordinate and a deltaY to the Y...
7
by: Chris | last post by:
Hi, If a user resizes a Toplevel window, or I set a Toplevel's geometry using the geometry() method*, is there any way to have the geometry reset to that required for all the widgets? I think...
2
by: =?Utf-8?B?QXRoZW5hQw==?= | last post by:
Hi, I have tried to draw a big long curve line with more than 10 thousands data sample using Geometry in WPF, and put it into the Scrollviewer. But the performace for scrolling is so poor. Does...
12
by: gsal | last post by:
What would be the easiest way to go about offering 3D graphics for the purpose of rendering geometry? Suppose engineers (my co-workes) have to design some enclosure, nozzle, bracket, or whatever...
3
by: =?ISO-8859-1?Q?Norbert_P=FCrringer?= | last post by:
Hello, do you know an URL for me where to find a sample for an abstract Geometry class, where classes like Point, Line, Area are inherited. This sample should explain OOP (what is inheritance,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.