[x3d-public] Replacing USE in X3DPSAIL.

John Carlson yottzumm at gmail.com
Fri Mar 27 20:45:46 PDT 2026


Luckily, I have a lot of Python code which uses X3DPSAIL which might be
used for a starting sample code for an X3dToPython.xslt rewrite, which
could be rewritten to use variables instead of USE= parameters.

https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/python/net/coderextreme/data

I can likely create something for the whole archive.

But my code itself uses USE= because I want VRML and XML to have USE, a
limitation of X3DPSAIL.  X3DPSAIL could track when a DEF is output, and
output USE after the first DEF when a variable/object/node is reused in a
SFNode or MFNode.  The containing node would know what containerField or
container field to use.

If only someone had paid attention all the times people talked about
DEF/USE.

I’m thinking Vince may be working on something though.  X3DPSAIL 5.0?

Anyway, so much for X3D being a directed acyclic graph.  I recognize it
would be very easy to construct a cyclic graph using my style of
programming, and I guess we don’t want graphics systems to do that.

Note, if you want setters and adders to return this in SAI 4.0 C++, so
hierarchical coding is possible, I suggest having Myeong start work on
that.   And provide a standards annexes that are actually compilable would
be great.  And X3D JSON needs a schema?

If anyone is interested in applications involving cyclic graphs, like file
systems, organizational hierarchies, and the like, we can discuss.  Of
course, the hyperlinks create cyclic graphs, and those are handled by X3D.
I imagine something similar.  I realize they are not great when garbage
collection is used.  Often links are persistent, though.  If we’re going to
have RenderedTexture…

Yes, I understand that directed acyclic graphs and cyclic graphs are turned
into trees to simplify memory management.   The object to DEF value map has
the information you need to do the memory management, on directed graphs,
AFAIK.

A binding is more capable than an encoding.

Says the guy who built information systems user interfaces.

Obviously, at this point,  no one is paying attention.  I realize my social
skills suck.

John

On Fri, Mar 27, 2026 at 9:01 PM John Carlson <yottzumm at gmail.com> wrote:

> In X3DJSAIL, why do we use different objects for calling setUSE() and
> setDEF() of the same DEF value?  Should setUSE(“foo”) be disallowed after
> a setDEF(“foo”)?
>
> Think about it.  I personally would just remove setUSE(), since it
> violates the specification, apparently.  setUSE should only be used to
> specify multiple parents.  We have add… and set… which should already do
> that.
>
> This also has massive implications for X3dToJava.xslt and X3dToPython.xslt
> as well.
>
> If we hadn’t fallen into using a hierarchy for Java and Python generated
> code, this would have been extremely simple…
>
> John
>
> On Fri, Mar 27, 2026 at 8:22 PM Don Brutzman <don.brutzman at gmail.com>
> wrote:
>
>> It is not possible to avoid USE, it is fully integrated functionality in
>> the specification.  No need to reengineer the specification.
>>
>> Again recommend working on one very simple case at a time, to narrow down
>> each problem and fix it.  Complexity obscures diagnosis.
>>
>> all the best, Don
>> --
>> X3D Graphics, Maritime Robotics, Distributed Simulation
>> Relative Motion Consulting  https://RelativeMotion.info
>>
>>
>> On Fri, Mar 27, 2026 at 6:08 PM John Carlson via x3d-public <
>> x3d-public at web3d.org> wrote:
>>
>>> Replacing USE with DEF would massively improve the JSON schema.   I vote
>>> for that!   It would massively improve the error reporting as well.
>>>
>>> What does FreeWRL think?
>>>
>>> No need for two attributes for the same meaning.
>>>
>>> USE and DEF code be used interchangeably, and container fields could
>>> specify parents.
>>>
>>> The only problem I see is when USE and DEF are used together, but that’s
>>> already an issue.
>>>
>>> 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/20260327/8438ef8f/attachment-0001.html>


More information about the x3d-public mailing list