[x3d-public] Results for today with x3d.py, _X3DField

John Carlson yottzumm at gmail.com
Mon Dec 6 02:42:53 PST 2021


Main issues in output JSON seem to include

1. Missing arrays

2. Missing keys with a leading "-", like "-appearance", "-material", 
"-children", "-geometry", "-texture", "-fontStyle"

3.  I don't do comments yet.

Attached JSON import/export module attached, with sample JSON input.


I will dig a bit into the x3d.py code to see what's happening.


John


On 12/6/21 04:13, John Carlson wrote:
>
> I was able to install the 4.0.44 release after uninstalling 4.0.43
>
> I hope good reports now.
>
> !!
>
> On 12/6/21 00:08, Brutzman, Donald (Don) (CIV) wrote:
>>
>> Thanks for reports and correct diagnosis.  I did take out the three 
>> “object” inheritances earlier today, pylint says it is no longer 
>> required in Python 3, no ill effects noted.
>>
>> I have tried to follow X3D4 Architecture exactly, and am keen to 
>> avoid overwriting!  Hopefully tonight’s build looks a bit better.
>>
>> The specification does not show X3DField inheriting from anything.
>>
>>   * X3D4 Architecture, 5.2.3 X3DField
>>   * https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/fieldTypes.html#X3DField
>>
>>   * X3D4 Architecture, 54.4.2.3 Interface hierarchy
>>   * (looks like first line of Figure 4.2 needs more whitespace)
>>   * https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/concepts.html#InterfaceHierarchy
>>
>> Sure enough, searching for “class _ X3DField” in x3d.py reveals two 
>> abstract class definitions, ouch!  That’s more like multiple 
>> personalities that multiple inheritance…
>>
>> Will work on fixing the autogeneration of offending version.
>>
>> 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:* vmarchetti at kshell.com <vmarchetti at kshell.com>
>> *Sent:* Sunday, December 5, 2021 3:59 AM
>> *To:* John Carlson <yottzumm at gmail.com>
>> *Cc:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>; X3D-Public 
>> <x3d-public at web3d.org>
>> *Subject:* Re: [x3d-public] Results for today with x3d.py, _X3DField
>>
>> Python does support multiple inheritance, but these fragments are not 
>> an example of a multiple-inheritance situation -- rather, the later 
>> class definition -- where _X3DField is a subclass of _X3DNode, 
>> overwrites the earlier class definition.
>>
>> In the x3d.py file, only three classes are defined as direct 
>> subclasses of object:
>>
>> class _X3DField
>>
>> class _X3DNode
>>
>> class _X3DStatement
>>
>> So I think the operative question is whether it is a design intent 
>> that _X3DField also should be a subclass of _X3DNode.  I judge the 
>> answer is no, since that would include support for DEF, USE, and 
>> metadata. In that light, the second class defintion for _X3DField 
>> would be regarded as a bug, to be corrected by modifying 
>> the X3duomToX3dPythonPackage.xslt stylesheet.
>>
>>
>>
>>     On Dec 4, 2021, at 11:40 PM, John Carlson <yottzumm at gmail.com> wrote:
>>
>>     Two declarations of _X3DField?
>>
>>     $ grep "class _X3DField" x3d.py
>>
>>     *class _X3DField*(object):
>>
>>     *class _X3DField*(_X3DNode):
>>
>>     Is there a pylint?
>>
>>     Isn't multiple inheritance possible?
>>
>>     Thanks!
>>
>>     John
>>
>>     _______________________________________________
>>     x3d-public mailing list
>>     x3d-public at web3d.org
>>     http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211206/17b1a2cc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JSONImport2.zip
Type: application/zip
Size: 3065 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211206/17b1a2cc/attachment-0001.zip>


More information about the x3d-public mailing list