[x3d-public] JSON to STL. Function bounties.
Christoph Valentin
christoph.valentin at gmx.at
Wed Dec 21 08:20:37 PST 2022
Thanks, I think I am now understanding your request.
While I am not knowing much about your STL efforts, I can tell you about what I think to know about X3D networking, which might be interesting for you.
1) There are really many ways to implement networking together with multiuser 3D scenes
2) If we want to achieve full re-usability of multiuser capable models and scenes (without any rebasing to different network technologies), then we MUST use APIs that are native to X3D/VRML.
3) Such APIs are (according to my knowledge), the DIS (Distributed Interactive Simulation) nodes and the (still emerging) Network Sensor nodes (I call them NSN, for fun).
4) If we want to implement the NSN on the basis of Web Technology (together with X3D4), then we should base it on some existing Web APIs.
5) My approach would be to implement a JavaScript library as an abstraction layer above those Web APIs. This library should have already as much of the behavior of the X3D Network Sensor as possible, yet it need not support specialized X3D data types like SFVec3f or similar, so it can also be used in W3C pages without 3D graphics.
6) Crucial Decisions -> those Web APIs and the JavaScript Library should be compatible with classic Web3D Browsers (which are not based on Web Technology) and even with HLA/DIS installations. This to support full re-usability of legacy models and scenes and to support interoperability of legacy user equipment within a multiuser session.
7) While I have started my ALPES project in order to analyse all these questions, on the other hand the project has not made any progress last year, unfortunately-
Does this answer your question?
Happy holidays,
Christoph Peter VALENTIN (CP/V)
Gesendet: Mittwoch, 21. Dezember 2022 um 01:26 Uhr
Von: "John Carlson" <yottzumm at gmail.com>
An: "Christoph Valentin" <christoph.valentin at gmx.at>
Cc: "Kevin" <klw71 at yahoo.com>, "X3D Graphics public mailing list" <x3d-public at web3d.org>
Betreff: Re: JSON to STL. Function bounties.
The way I remember things is I remember who I heard it from, in many cases. That way, i can funnel info to you if it seems relevant.
I do not think what I’m discussing is necessarily an X3D issue, and more of a generic communication/synchronization issue.
But yeah, getting into a routed node would be neat.
John
On Tue, Dec 20, 2022 at 5:34 PM Christoph Valentin <christoph.valentin at gmx.at[mailto:christoph.valentin at gmx.at]> wrote:Hi John, long no contact :-)
May I respond to your question?
>>> Christoph Valentin, what’s the preferred multiuser web software for X3D?
Well, I really feel deeply honoured, to be asked questions like that.
Unfortunately, I am not in the position to issue any hint, I am not even sure, if I understand the connection to your current subject.
First, I am currently really busy with the duties in connection with my job, which has NOTHING to do with Web3D Graphics (however, this being busy might move to the background a little bit during holiday season).
Second, I really did nothing more than playing around a little bit with the Network Sensor in my SrrTrains v0.01 project. Maybe I have disclosed/encountered/discovered a few very interesting topics, true, but I have written all my findings to my blogs, GitHub account and sourceforge account, nothing hidden.
I have even promised that I will start my "Fiat A" project as a kind of indicative "lighthouse project" to indicate, when I will have got positive evidence about such Web3D multiuser projects having started at the industry (this does NOT mean that such projects have NOT been started at the industry, when I do NOT start the "Fiat A" project).
If you think I can help in any further way that does not consume lots of staff hours, please tell me.
Have a nice holiday season
CP/V
Gesendet: Dienstag, 20. Dezember 2022 um 22:36 Uhr
Von: "John Carlson" <yottzumm at gmail.com[mailto:yottzumm at gmail.com]>
An: "Christoph Valentin" <christoph.valentin at gmx.at[mailto:christoph.valentin at gmx.at]>, "X3D Graphics public mailing list" <x3d-public at web3d.org[mailto:x3d-public at web3d.org]>
Betreff: Re: JSON to STL. Function bounties.
Current code is here:
https://github.com/coderextreme/JsonToStl[https://github.com/coderextreme/JsonToStl]
It’s a pretty clean project, no real build script (make.sh), needs more test cases.
If you want to be a contributor, send me your email and specify your license of choice. Code you work on should include your license in each source file you modify and the main LICENSE file. If you want to create a python blender scripts to go from X3D to STL, that will be cool too. I don’t want a lot of confusion about which IDE to use. I use vim. Use what you like, but don’t create a lot of dependencies, instead use some you didn’t install like easy to read make.bat file to pair with make.sh.
Remember there’s Git Bash, so you can assume bash will be on the system that git uses.
My approach i am considering taking is: first, choosing a set of flat meshes to cover sphere, cone, cylinder, generically. After that, we can cover more complicated meshes like extrusions, 2D geometry and NURBS geometry
So i think that sphere might be a grid mesh, cylinder would be 3 meshes, and cone is 3 meshes.
My plan is to do sphere first, since that will cover my use case.
John
On Tue, Dec 20, 2022 at 2:58 PM John Carlson <yottzumm at gmail.com[mailto:yottzumm at gmail.com][mailto:yottzumm at gmail.com[mailto:yottzumm at gmail.com]]> wrote:
Wondering, is an X3dToStl.xslt code development planned soon?
The other thing i can work on is continuing JSON to Python conversion.
Is there something i can write that i will use on a regular basis?
Christoph Valentin, what’s the preferred multiuser web software for X3D?
Would syntax highlighting for vim and/or neovim be useful?
John
On Tue, Dec 20, 2022 at 6:17 AM John Carlson <yottzumm at gmail.com[mailto:yottzumm at gmail.com][mailto:yottzumm at gmail.com[mailto:yottzumm at gmail.com]]> wrote:
Here are the functions that are planned or implemented in JsonToStl. Please express which ones you'd like to see implemented next.
Thanks!
Also, please discuss what type of LICENSE would be required. If at all possible, I'd like to make some money off this, perhaps by setting up a conversion website or patreon.
Yes, I'm aware of the STL output in Blender! I'm working on this to enhance X3DJSONLD. Is conversion to STL still desired?
Thanks,
John
function convertJsonToStl(json) {
function initializeLDNode(json, obj) {
function findLDNodeInList(use, LDNodeList) {
function toNormals(json, LDNodeList, ParentNode) {
IndexedFaceSet : function(obj, LDNode) {
Group : function(obj, LDNode) {
Shape : function(obj, LDNode) {
Box : function(obj, LDNode) {
IndexedTriangleSet : function(obj, LDNode) {
IndexedTriangleStripSet : function(obj, LDNode) {
IndexedTriangleFanSet : function(obj, LDNode) {
IndexedLineSet : function(obj, LDNode) {
Normal : function(obj, LDNode) {
Coordinate : function(obj, LDNode) {
Transform : function(obj, LDNode) {
"@scale" : function(obj, LDNode) {
"@rotation" : function(obj, LDNode) {
"@translation" : function(obj, LDNode) {
"@normalPerVertex" : function(obj, LDNode) {
"@size" : function(obj, LDNode) {
"@vector" : function(obj, LDNode) {
"@point" : function(obj, LDNode) {
"@normalIndex" : function(obj, LDNode) {
"@coordIndex" : function(obj, LDNode) {
"@index" : function(obj, LDNode) {
function vector_product(u, v) {
function normalize(v) {
function triangle_normal(a, b, c) {
function printNormal(prefix, x, y, z, output, transform) {
function printSFVec3f(prefix, x, y, z, output, transform) {
function IndexedTriangle(LDNode, output, transform) {
function transformLDNodesToTriangles(LDNode, output, parentTransform) {
IndexedFaceSet: function(LDNode, output, transform) {
Box: function(LDNode, output, transform) {
SixSided: function(LDNode, output, transform, x, y, z) {
Square: function(LDNode, output, transform, square) {
Triangle: function(LDNode, output, transform, coords) {
More information about the x3d-public
mailing list