|
From: Petr S. <pet...@gm...> - 2008-02-10 19:51:25
|
Hi,
is there any new version planned during Q1 of 2008?
I like how PyODE module is done, but as a typical user I want more :)
I would appreciate any functionality on XODE file handling, such as
easier access to GEOM primitives.
It seems developement on this field has been stopped a bit.
Currently I solve problem with missing features via own modifications of
PyODE core files, but I feel this is not the best thing to do.
What I miss most is parsing more info from XODE geoms ( exact
dimensions, not just AABB bounding box ) and loading of cylinders.
To load cylinders I added following to
--- XODE\geom.py:
[code]
def _parseGeomCylinder(self, attrs):
def start(name, attrs):
if (name == 'ext'):
pass
else:
raise errors.ChildError('cylinder', name)
def end(name):
if (name == 'cylinder'):
self._parser.pop()
radius = float(attrs['radius'])
length = float(attrs['length'])
self._setObject(ode.GeomCylinder, radius=radius, length=length)
self._parser.push(startElement=start, endElement=end)
print "Remark: XODE/Mass/Cylinder - Supported only in unofficial
extension..."
[/code]
In _startElement:
[code]
elif (name == 'cylinder'):
self._parseGeomCylinder(attrs)
[/code]
--- XODE\body.py ( in _parseMassShape ):
[code]
elif (name == 'cylinder'):
# -- My mod
print "Remark: XODE/Mass/Cylinder - Supported only in
unofficial extension..."
radius = float(attrs['radius'])
length = float(attrs['length'])
if (density is not None):
mass.setCylinder(float(density), 3, radius, length)
[/code]
I must admit I am very far from being Python or ODE master, so I would
appreciate any addition on this from the "pros".
I will make appropriate post in "feature requests", but I am curious
when new official release is planned, what are your future plans with
this module...
Thanks,
Petr
|