[x3d-public] X3dToPython.xslt warnings and errors produced from Holger's examples

John Carlson yottzumm at gmail.com
Fri Jul 1 19:28:50 PDT 2022


Oops second to last paragraph.

On Fri, Jul 1, 2022 at 9:26 PM John Carlson <yottzumm at gmail.com> wrote:

> The last paragraph  is the most important.
>
> Thanks, Don, for aptly applying a fix.   I’m hoping the patches applied
> will lead us to a pattern for JSON to _____ load and export, both for your
> python validation and your XML/VRML/Other generation, as used by people
> using x3d.py and JSON.   Using JSON and x3d.py on the web is a compelling
> use case right now.   Hopefully we can get to a place where x3djsonld.py
> can generate python to be loaded into jupyter.
>
> I do not know if XML or VRML loading is or will be supported by x3d.py.
> We might discuss if we want to use stylesheets for a core feature,
> generating subclasses of x3d.py, or x3dxmlld.py for generating python.
> We’ve already spoken a tiny bit about this.   I believe the first was
> tossed out, so I'm assuming the Python SAI keeps some Browser def’s outside
> the x3d.py package,  createX3DFromString() comes to mind.  I have not
> checked this.
>
> I am not ready to submit x3djsonld.py to Pypl or whatever the python
> package distribution site is, but I’m hoping to copy the breadcrumbs left
> by x3d.py and apply them to x3djsonld.py distribution.
>
> While a example advanced use of shadows would be useful, I have pretty
> minimal experience with Lights.  Maybe I can add something in X3D4.1
> timeframe.  Perhaps getting some experience with Blender’s lighting would
> be good.
>
> We have this X3DUOM which might be used for other things, like generating
> x3djsonld.py using a stylesheet, generating  X3dTo*.xslt, and generating
> JavaScript serializers for X3DJSONLD.
>
> Ideally, a single change to XML Schema would ripple through the whole
> codebase easily.
>
> John
>
> On Fri, Jul 1, 2022 at 7:33 PM Brutzman, Donald (Don) (CIV) <
> brutzman at nps.edu> wrote:
>
>> Thank you for noting that type for the X3DLightNode field ‘shadows’
>> (DirectionalLight, PointLight, SpotLight) was not being checked by the
>> converters.
>>
>>
>>
>> Now fixed.  I have added it to several stylesheets (X3dTo.xslt X3dTo.xslt
>> X3dTo.xslt X3dTo.xslt X3dTo.xslt) and also added a validation test in
>> HelloWorldX3D4.x3d, adding a fancier example scene to archives is welcome.
>>
>>
>>
>> All checked in at
>>
>>    -
>>    https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets
>>    -
>>    https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling
>>
>>
>>
>> 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:* Friday, July 1, 2022 2:36 PM
>> *To:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
>> *Cc:* Holger Seelig <holger.seelig at yahoo.de>; X3D Graphics public
>> mailing list <x3d-public at web3d.org>
>> *Subject:* Re: [x3d-public] X3dToPython.xslt warnings and errors
>> produced from Holger's examples
>>
>>
>>
>> No "shadows" in Savage.  So unless Don has something in SavageDefense,
>> we'll have to roll our own example, or find someone else's (Holger's).
>>
>>
>>
>> It looks like the attribute type for "shadows" the shadows field is not
>> being found in X3dToPython.xslt.
>>
>>
>>
>> I'm wanting to do code coverage analysis again.
>>
>>
>>
>> On Fri, Jul 1, 2022 at 4:23 PM John Carlson <yottzumm at gmail.com> wrote:
>>
>> Here are rereported issues.
>>
>>
>>
>> One can download the create3000 Library with:
>>
>>
>>
>> git clone https://github.com/create3000/Library
>> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcreate3000%2FLibrary&data=05%7C01%7Cbrutzman%40nps.edu%7C2d61febca1d64ef57a1b08da5ba9a998%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637923081677633994%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BuY8E%2FRFAETrfC3CeL9c2G2BUR6z80Mga4%2F%2Fi8k1N14%3D&reserved=0>
>>
>>
>>
>> Then use X3dToPython.xslt in Library/Tests/Components/ParticleSystems/.
>>
>>
>>
>> translating to python
>> BEGIN ../Library/Tests/Components/ParticleSystems/Bubbles.x3d > py, ***
>> Warning: X3dToPython.xslt attribute type not found for DirectionalLight
>> field 'shadows'
>> *** Error: tuple-size not found for type '' (type value missing)
>> END ../Library/Tests/Components/ParticleSystems/Bubbles.x3d
>>
>> BEGIN ../Library/Tests/Components/ParticleSystems/Fire.x3d > py, ***
>> Warning: X3dToPython.xslt attribute type not found for DirectionalLight
>> field 'shadows'
>> *** Error: tuple-size not found for type '' (type value missing)
>> END ../Library/Tests/Components/ParticleSystems/Fire.x3d
>>
>>
>>
>> Since shadows is an SFBool, there is no tuple-size, perhaps?
>>
>>
>>
>> The above errors show that type is '', not SFBool.  I can't figure out
>> the XSLT yet.
>>
>>
>>
>> I will look at the XML.
>>
>>
>>
>> Here's one example from Bubbles.x3d:
>>
>>
>>
>>         <MetadataSet DEF='Selection' containerField='value'
>>             name='Selection'
>>             reference='http://titania.create3000.de
>> <https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftitania.create3000.de%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C2d61febca1d64ef57a1b08da5ba9a998%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637923081677633994%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=l85nKgb4QKdpprKFUR%2BRyp%2Bb0svk1w%2BROEXrISRxfAw%3D&reserved=0>
>> '>
>>           <MetadataSet DEF='previous' containerField='value'
>>               name='previous'
>>               reference='http://titania.create3000.de
>> <https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftitania.create3000.de%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C2d61febca1d64ef57a1b08da5ba9a998%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637923081677633994%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=l85nKgb4QKdpprKFUR%2BRyp%2Bb0svk1w%2BROEXrISRxfAw%3D&reserved=0>
>> '/>
>>           <MetadataSet DEF='children' containerField='value'
>>               name='children'
>>               reference='http://titania.create3000.de
>> <https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftitania.create3000.de%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C2d61febca1d64ef57a1b08da5ba9a998%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637923081677633994%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=l85nKgb4QKdpprKFUR%2BRyp%2Bb0svk1w%2BROEXrISRxfAw%3D&reserved=0>
>> '>
>>             <DirectionalLight DEF='_1' containerField='value'
>>                 direction='-0.372556 -3.8217e-05 -0.92801'
>>                 shadows='true'
>>                 shadowIntensity='0.518717'/>
>>           </MetadataSet>
>>         </MetadataSet>
>>       </MetadataSet>
>>
>>
>>
>> Here's another from Fire.x3d:
>>
>>
>>
>>     <DirectionalLight DEF='_1'
>>         direction='-0.531638 -0.672816 -0.51447'
>>         shadows='true'
>>         shadowIntensity='0.605'/>
>>
>>
>>
>> Hope this helps.  I'm bamboozled until I can find  a better XSLT
>> debugger.  We're a bit over budget the last few months.
>>
>>
>>
>> Looks like everything is up-to-date.
>>
>>
>>
>> I'd like to make sure Fire.py works before proceeding to further debug
>> x3djsonld.py, so I know I have a good example python to pull ideas from.
>>
>>
>>
>> There are no examples of DirectionalLight and attribute shadows in the
>> X3D Examples on sourceforge.  Perhaps it's time to add an example?
>>
>>
>>
>> I'm presently downloading Savage.  Maybe we'll get lucky.
>>
>>
>>
>> Thanks!
>>
>>
>>
>> John
>>
>>
>>
>> On Fri, Jul 1, 2022 at 3:48 PM John Carlson <yottzumm at gmail.com> wrote:
>>
>> Background for what I’m going to test. I’m in-line with your analysis of
>> this one issue.  I don’t recall if ‘shadows’ in DirectionalLight is still
>> an issue (see thread).  I’ve been able to address the gzip issue on my own
>> system.   There may be more issues to address.
>>
>>
>>
>> Here’s how i test in X3DJSONLD:
>>
>>
>>
>> X3DJSONLD/src/main/shell $ bash don.sh
>> ../Library/Tests/Components/ParticleSystems/*.x3d
>>
>>
>>
>> You may use a single .x3d file.
>>
>>
>>
>> I’m going to run downstairs to run the test.
>>
>>
>>
>> On Fri, Jul 1, 2022 at 9:16 AM Brutzman, Donald (Don) (CIV) <
>> brutzman at nps.edu> wrote:
>>
>> Nor is particleElasticity (or the word “elasticity”) found in X3D4
>> specification.  Thus not in any other validation tools.
>>
>>
>>
>>    -
>>    https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/components/particleSystems.html
>>
>>
>>
>> And so, looking around, wondering what is being talked about.  Presumably
>> a browser-specific extension, building on the X in X3D.
>>
>>
>>
>> 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:* Sunday, June 26, 2022 1:46 PM
>> *To:* Holger Seelig <holger.seelig at yahoo.de>; X3D Graphics public
>> mailing list <x3d-public at web3d.org>
>> *Subject:* Re: [x3d-public] X3dToPython.xslt warnings and errors
>> produced from Holger's examples
>>
>>
>>
>> Holger's example:
>>
>>
>>
>> translating to json
>> BEGIN ../Library/Tests/Components/ParticleSystems/Waterfall.x3d > json,
>> Warning: X3dToJson.xslt attribute type not found for ParticleSystem
>> particleElasticity
>> END ../Library/Tests/Components/ParticleSystems/Waterfall.x3d
>>
>>
>>
>> particleElasticity not found in X3DUOM
>>
>>
>>
>> So specific to Holger's use case, I guess.
>>
>>
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220701/eef5a7c6/attachment-0001.html>


More information about the x3d-public mailing list