<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>X3DJSONLD does the following conversions:</p><p class=MsoNormal> JSON->DOM</p><p class=MsoNormal> DOM->XML (borrowed)</p><p class=MsoNormal> XML->DOM (borrowed)</p><p class=MsoNormal> DOM->JSON</p><p class=MsoNormal> DOM->Java</p><p class=MsoNormal> DOM->Python</p><p class=MsoNormal> DOM->JavaScript</p><p class=MsoNormal> PLY->JSON</p><p class=MsoNormal> STL->JSON</p><p class=MsoNormal> JSON->STL (not done, not always triangles, needs someone who wants to do tessellation, or can provide a JavaScript library)</p><p class=MsoNormal> JSON->EXI</p><p class=MsoNormal> EXI->JSON</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>XD3JSAIL/SourceForge X3D does the following conversions that were added by me</p><p class=MsoNormal> JSON->DOM (Java version of X3DJSONLD)</p><p class=MsoNormal> X3DJSAIL->JavaScript </p><p class=MsoNormal> DOM->Python (X3DPSAIL)</p><p class=MsoNormal> DOM->Python (Pure Python—doesn’t do anything)</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>X3DJSAIL does:</p><p class=MsoNormal> X3DJSAIL->XML</p><p class=MsoNormal> X3DJSAIL->JSON</p><p class=MsoNormal> X3DJSAIL->X3D</p><p class=MsoNormal> X3DJSAIL->ClassicVRML</p><p class=MsoNormal> X3DJSAIL->VRML97</p><p class=MsoNormal> X3DJSAIL->HTML</p><p class=MsoNormal> X3DJSAIL->Java</p><p class=MsoNormal> X3DJSAIL->ModelMetaMarkdown</p><p class=MsoNormal> X3DJSAIL->X3dTidy</p><p class=MsoNormal> X3DJSAIL->X3DOM</p><p class=MsoNormal> X3DJSAIL->X_ITE</p><p class=MsoNormal> X3DJSAIL->Cobweb</p><p class=MsoNormal> X3DJSAIL->EXI</p><p class=MsoNormal> X3DJSAIL->GZIP</p><p class=MsoNormal> X3DJSAIL->ZIP</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Don will likely add toFileJavaScript (replacing my work—I think there may already be a start on a stylesheet) and toFilePython stylesheet conversions to X3DJSAIL. Is that OK, Don?</p><p class=MsoNormal>Probably I will retain maintenance of all JSON->DOM conversions (JavaScript, Java, C++, X3DJSAIL, X3DOM, X_ITE). (Don uses a stylesheet or strings to generate XML). I am open to developing JSON->DOM for other languages and improving the C++ version if people are interested. You should be willing to provide example JSON files (possibly converted with X3D-Edit). Recommend you use Everit or Ajv for JSON Schema validation, if not X3DJSONLD’s validator (based on Ajv).</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Ideally I think, Don will take over all serializers, except my DOM->JSON serializer. I also use a javascript serializer on my web page.</p><p class=MsoNormal>================================================================================================================</p><p class=MsoNormal>What X3DJSONLD could provide for X3DJSAIL and X3DPSAIL (JavaScript)</p><p class=MsoNormal> PLY->JSON</p><p class=MsoNormal> STL->JSON</p><p class=MsoNormal> JSON->STL</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>These conversions are stored under ~/X3DJSONLD/src/main/node:</p><p class=MsoNormal>convertJsonToStl.js</p><p class=MsoNormal>convertPlyToJson.js</p><p class=MsoNormal>convertStlToJson.js</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The JSON to STL conversion looks at the following X3D JSON indexes</p><p class=MsoNormal> IndexedFaceSet : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> Group : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> Shape : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> Box : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> IndexedTriangleSet : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> IndexedTriangleStripSet : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> IndexedTriangleFanSet : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> IndexedLineSet : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> Normal : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> Coordinate : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> Transform : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@scale" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@rotation" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@translation" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@normalPerVertex" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@size" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@vector" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@point" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@normalIndex" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@coordIndex" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal> "@index" : function(obj, LDNode) {<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Note: There are no colors or textures.<o:p></o:p></p><p class=MsoNormal>Note: Sometimes I create more complex polygons than triangles. This is not in the STL “specification”<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Suggestions for additional shapes to translate are welcome:<o:p></o:p></p><p class=MsoNormal>Arc2D ArcClose2D Circle2D Disk2D Polyline2D Polypoint2D Rectangle2D TriangleSet2D<o:p></o:p></p><p class=MsoNormal>Cone, Cylinder, ElevationGrid,Extrusion,Sphere,Text,GeoElevationGrid (why?),QuadSet,IndexedQuadSet<o:p></o:p></p><p class=MsoNormal>LineSet PointSet TriangleFanSet TriangleSet TriangleStripSet HAnim<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I won’t translate the 2D geometry, I think. I will not translate Points or Lines<o:p></o:p></p><p class=MsoNormal>I don’t yet know how to translate Cone, Cylinder,*ElevationGrid,Extrusion,Sphere,Text,HAnim (will the standard help?) Help! I can probably handle the other ones. Volunteers are welcome! Pull requests are welcome! Suggestions for JavaScript libraries accepted.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#548235;mso-style-textfill-fill-color:#548235;mso-style-textfill-fill-alpha:100.0%'>The ones I can handle, I think are QuadSet, IndexedQuadSet, TriangleFanSet, TriangleSet and TriangleStripSet.<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Would it be better to take a scenegraph from X3DOM or X_ITE? Is there documentation for the scenegraphs?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The STL to JSON creates a single IndexedFaceSet for all polygons found in the STL file. No color is handled from the STL file<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The PLY to JSON file creates IndexedFaceSets and IndexedLineSets. Any more suggestions or PLY files you want translated?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Is there any requirement for JSON -> PLY?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Note: I just discovered <a href="https://cadexchanger.com/x3d">https://cadexchanger.com/x3d</a> for X3D to STL conversions. Add to X3D resources? I haven’t tried it yet. CADExchanger already mentioned here: <a href="http://www.web3d.org/wiki/index.php/STEP_X3D_Translation#Open_Cascade_and_PythonOCC">http://www.web3d.org/wiki/index.php/STEP_X3D_Translation#Open_Cascade_and_PythonOCC</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Is there any need for STL conversion beyond CADExchanger (And others)? I will delete my STL conversions.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>For my JSON->DOM converter, should I create a python version.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I believe I will start work (we probably already have) on Java->DOM, Python->DOM, C/C#/C++->DOM and JavaScript->DOM transpilers. For people who don’t want a full weight of X3DJSAIL or X3DPSAIL. This will be a valuable addition to X3DJSAIL, should it choose to accept it. I will call it “PRESAIL” for now.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>