Retrieving Parametric Information for Each Geometry Type

I am asking a student to work on an X3D exporter for Blender
(note: X3D is an XML-based successor to VRML 2.0). In doing this, the
Python API would appear to be the logical choice, but I have
a very basic question: can one get parametric information for
all geometry objects in Blender? By “parametric,” I am referring
to the ability to extract algebraic parameters for the curves,
surfaces and other geometric objects that happen to have them.
Clearly, some objects will be pure mesh at very beginning, but
for other objects, one would hope that the parameters used to
define the objects would be saved with the objects, and would then
be retrievable through the Python API. In looking through the
Blender 2.0 book, though, I don’t see much evidence of retrieving
anything except vertex/face sets. Unfortunately, this information
is too low level and lengthy to be of any real use to other modeling or
display packages (such as X3D/VRML clients).

For simple geometry, such as a Sphere, I would expect to be able
to extract the center and the radius. The same goes for other Blender
objects such as the Cube, Torus and Grid. For NURBS, I would hope
to extra the spline paramters. For subdivision surfaces, I am not
sure what type of data structure is expected? Anyway, if you can
point me to something that goes beyond the Blender 2.0 book’s
description of the Python Geometry API, I’d appreciate your pointers.
Thanks! :slight_smile:

We hope to get a solid X3D exporter by the end of semester, and
then we’ll feed this back into the open source Blender for adoption.