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 |
From: Matthias B. <mb...@us...> - 2008-03-16 19:24:52
|
Hi Petr, sorry for the late reply. You might have figured yourself by now that unfortunately we don't have that much time anymore that we can spend on updating the wrappers. It's quite a while now since I've last used PyODE myself which is why I haven't done any major improvements other than applying patches that were sent to the list. There is no "roadmap" or similar such thing and there are currently no plans about a new release. Sorry. As to your XODE questions, this module was written by Timothy Stranex and I'm not familiar with the code at all. So I can't really help you on that one. If you (or anybody else here) wants to get involved in the development and can spend some time on updating the wrappers, then let me know. I think the wrappers could do with an overhaul anyway. Meanwhile Pyrex supports weak references which could be used inside the code. Alternatively, it might be worth considering if switching to ctypes-based wrappers wouldn't be a better approach anyway. - Matthias - Petr Schreiber wrote: > 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 > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user > |