[x3d-public] Possible extensions to x3d.py (subclassing, etc)

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Tue Oct 31 21:09:47 PDT 2023


[snip: 4 attachment in large mailing-list message]

 

1.	John, as explained many times, the way to change one of the converters (such as X3dToPython.xslt or X3duomToX3dPythonPackage.xslt or x3d.py) is to provide an example input file with a repeatable error.  It is usually not practical for more than one person to make changes at a time.

 

What you have provided here requires elaborate reconstruction with no clearly stated goal.

 

2.	For your file JoeKick.x3d, the authoritative version is online at

 

*	https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Skin/JoeKick.x3d
*	https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Skin/JoeKickIndex.html

 

If you have a change to that, please get Joe to agree as author first.  If you don’t have a change to that, there is no need to send it.

 

I suggested a very clear start with an LOA 0 and then LOA 1 model.  Not understanding why you don’t try that instead of continued circling and (for me at least) confusion.

 

One step at a time please.  Hope this helps.

 

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: John Carlson <yottzumm at gmail.com> 
Sent: Tuesday, October 31, 2023 7:08 PM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
Cc: GPU Group <gpugroup at gmail.com>; Joe D Williams <joedwil at earthlink.net>; X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Re: [x3d-public] Possible extensions to x3d.py (subclassing, etc)

 

Don, 

 

Attached are JoeKick.x3d, JoeKick.py, the python program produced by my version of X3dToPython.xslt, my X3dToPython.xslt, and the result .x3d and wrl (it really is VRML, despite the JSON in the name) files.  Please view the two .x3d files to see the differences. To me, Joe in JoeKickPythonToX3d.x3d (the output from JoeKick.py+x3d.py) is totally missing.  There are 198 warnings in view3dscene for the file.  If you can produce a better python program than my JoeKick.py using your X3dToPython.xslt, that produces a better .x3d result than mine, by all means, let's see it.  I expect for you to be forthcoming with equivalent files for me to confirm for myself.

 

If you want to see my X3duomToX3dPythonPackage.xslt please say so (anyone can ask).  I also have a JoeKick.py prior to my modifications, but it doesn't output anything.

 

Joe, don't say anything stupid.  We know what's happening.  If you want something to do, fix JoeKick.x3d so view3dscene doesn't spew tons of errors, then we'll reconvert to python, and revisit.

 

I've checked out another version of sourceforge, so I should have a golden copy of X3duomToX3dPythonPackage.xslt, x3d.py, etc.  We can revisit that if needed.

 

Thanks!

 

John

 

On Tue, Oct 31, 2023 at 4:27 PM Brutzman, Donald (Don) (CIV) <brutzman at nps.edu <mailto:brutzman at nps.edu> > wrote:

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 <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpypi.org%2Fproject%2Fx3d&data=05%7C01%7Cbrutzman%40nps.edu%7C51d6689e94354aef643a08dbda7f6cc5%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638344013102359618%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=20GjwzRlIAwt0wQitTNZZgyMLeFdlSIg6sQ28d0EnPA%3D&reserved=0> 


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 <mailto: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 <mailto: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 <mailto:gpugroup at gmail.com> >; Joe D Williams <joedwil at earthlink.net <mailto:joedwil at earthlink.net> >
Cc: X3D Graphics public mailing list <x3d-public at web3d.org <mailto: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/20231101/230d2014/attachment-0001.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/20231101/230d2014/attachment-0001.p7s>


More information about the x3d-public mailing list