[x3d-public] Possible extensions to x3d.py (subclassing, etc)
Brutzman, Donald (Don) (CIV)
brutzman at nps.edu
Tue Oct 31 14:27:01 PDT 2023
John, you are free to experimentally subclass or inject as you wish but there is no guarantee that such work will be maintainable.
The way to upgrade x3d.py is to
* Show an erroneous output, or
* Provide example code showing a broadly useful utility method of some sort.
Such corrections and improvements can then get autogenerated from X3DUOM into x3d.py and then regression tested against X3D Examples. If successfully working they can become part of a future x3d.py release, which is entirely open source.
* Python package x3d
* https://pypi.org/project/x3d
Thanks in advance for all improvements to X3D and x3d.py python library.
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman
From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of John Carlson
Sent: Tuesday, October 31, 2023 1:53 PM
To: GPU Group <gpugroup at gmail.com>; Joe D Williams <joedwil at earthlink.net>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: [x3d-public] Possible extensions to x3d.py (subclassing, etc)
I’m going to take the approach that x3d.py cannot be modified, and instead use subclasses of x3d.py classes to provide order of fields as necessary for the Blender X3DV exporter. In particular, HAnimHumanoid XML, VRML and JSON methods will be overridden to provide containerField, field ordering, etc.
x3d.py might take a dependency injection approach in the future, such that one or more delegates can be replaced. I believe dependency injection is preferred to inheritance or monkey-patching, but X3D is pretty heavy into inheritance, or at least interfaces. Any dependency injection should make any changes to output as desired. I do not agree with totally replacing methods, as that is a maintenance nightmare.
I apologize for all the emails over the last many days. My mind is not as nimble as it could be. I do not know if I could have arrived at a agreeable solution without all the emails.
Now you know why technical interviews terrify me.
Thanks everyone for being teddy bears.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231031/7c81bd22/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231031/7c81bd22/attachment.p7s>
More information about the x3d-public
mailing list