[x3d-public] How should CAD -shape containerField be expressed in X3DJSAIL

yottzumm at gmail.com yottzumm at gmail.com
Wed Feb 22 19:58:40 PST 2017


Here is the JSON that is produced from the Java (I can help you create a program to compile the Java code if you like).  This is what should be validated.   Sorry I didn’t get it to you sooner.  Java is attached as well.  I believe the problem is with the intermediate XML that is translated by X3dToJson.xlst.  I will test against my 3.1 schema.  I believe the XML is the problem because the X3DJSAIL API has no way of specifying shape as  a containerField in the intermediate XML.  But X3DJSAIL comes from the Object Model and the XML Schema and I think the problem stems from the latter two.   Either the Object Model or XML Schema needs to allow the containerField to become shape, or force it somehow, in certain cases.  I think this may be a deficiency in the XML schema or object model.  But somehow JSON schema has it, so where did it come from?  Are you still hand generating the JSON schema, or am I missing something in the XML Schema or object model?  Can we incorporate something from the autogeneration of the JSON schema into the X3DJSAIL generation?  Thanks!

Don can tell us how to keep around the intermediate XML file?  I am getting so frustrated with this I may start issuing code patches.  Or otherwise tell us how to specify containerField in the intermediate XML (should I do it with an set attribute method, I am beginning to think)—There is no setContainerField in X3DJSAIL.

Basically I am beginning to spew here, and I need a reasonable, principled person to step in now, look over everything and tell me what needs fixing.  If you want to use the Java in your own folder structure, you will have to edit the package name.

This is what I get running the output JSON through JSON Schema:



I will send a total workflow in my next message.

John
Sent from Mail for Windows 10

From: Roy Walmsley
Sent: Wednesday, February 22, 2017 7:08 PM
To: yottzumm at gmail.com; 'X3D Graphics public mailing list'
Subject: RE: How should CAD -shape containerField be expressed in X3DJSAIL

Thanks John.

You are right, I don’t have a 3.1 schema for JSON.

I manually inspected the examples. They seem fine to me, and the JSON validates against the V3.3 JSON schema. This can only mean that I don’t understand your problem. To my eyes, all the examples and schemas are fine. So to clarify, please give me a step-by-step account of what you are doing. What are you starting from? What tools to you use to do what with it? Etc..

Sorry not to be more instantly helpful,

Roy

From: yottzumm at gmail.com [mailto:yottzumm at gmail.com] 
Sent: 22 February 2017 23:12
To: Roy Walmsley <roy.walmsley at ntlworld.com>; X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: FW: How should CAD -shape containerField be expressed in X3DJSAIL

Here are the examples I am referring to.   The ones with the shape container that supposedly are supposed to validate properly.  However, there is some comments in the meta stuff that you may want to check:.  I hope I am not chasing a red herring again.  I don’t see how you could validate it against the JSON schema, unless you have a 3.1 schema. (can I have a copy?)

www.web3d.org/x3d/content/examples/Basic/CAD/{attachments}

John

Sent from Mail for Windows 10

From: yottzumm at gmail.com
Sent: Tuesday, February 21, 2017 1:38 AM
To: Don Brutzman; Roy Walmsley; X3D Graphics public mailing list
Subject: How should CAD -shape containerField be expressed in X3DJSAIL

Attached input JSON and converted Java.  The Java does not produce -shape in the output JSON.json file [ not provided—compile and run the Java ].  Is this OK?  I am currently using setShape in the Java.  Why doesn’t the JSON.json have the containerField?  Thanks!

John



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170222/534d819a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CADPartChildTransformationAlternativeA.java
Type: application/octet-stream
Size: 13729 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170222/534d819a/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CADPartChildTransformationAlternativeA.json
Type: application/json
Size: 11292 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170222/534d819a/attachment-0001.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 81BE933683304BD489E8E476B25E9841.png
Type: image/png
Size: 35479 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170222/534d819a/attachment-0001.png>


More information about the x3d-public mailing list