[x3d-public] FreeWRL line 999 DEF/USE mismatch,

Joe D Williams joedwil at earthlink.net
Fri Jan 26 00:57:26 PST 2024


Hi All,
Last week I found something as interesting as coding route as a field of a node.
I defined a transform which is just a collection of transforms containing collections of shapes then used it as a shape in a transform.  
This was OK everywhere I used it until I tried FreeWRL and was rewarded with this:  

  line 999 DEF/USE mismatch, 'BorderFlower01',  
    Transform != ShapeWarning,  

That is right. The sequence  
  Transform DEF='BorderFlower01' .../  
then  
  Transform DEF='rFlowerSpecial' ...  
    Shape USE='BorderFlower01'/  
/  

Is very emphatically != So very bad and must fail. 

Shape is expecting geometry not a transform.  
Shape and Transform both are Bounded Object, but Shape is not a Grouping Node.  
So, the most simple fix that John immediately suggested, works as expected everywhere so far is just:  

Transform DEF='rFlowerSpecial' ...  
  Transform USE='BorderFlower01'/  
/  

And that fix makes it work everywhere so far. 

So, is this a possible specification, validation, and conformance issue, and a possible security issue?

Maybe not in this harmless case, when I didn't think much and extended what I was using just pasted it up and it happened to work where I ran it. In a sense, very friendly. No harm, no foul. Everything needed to make the shape was in there.  

But then x3d is everywhere strongly typed from fields to nodes.   
In this case Shape must not accept a Grouping node in Authortime or Runtime.   
There should be No way to misuse the def-use.

Thanks for the help,
Joe

-----Original Message-----
From: Extensible 3D (X3D) Graphics public discussion <x3d-public at web3d.org>
Sent: Jan 22, 2024 6:57 PM
To: <x3d-public at web3d.org>
Cc: Joe D Williams <joedwil at earthlink.net>
Subject: [x3d-public] FreeWRL line 999 DEF/USE mismatch,

Hey FreeWRL, my little flower animation thing has error(s) I never get anywhere else.
Can you please help me figure this out?

Attached is zip of FlowerSet1010.x3d

(In the following, when xml, the [ is substituted for the
[Transform DEF='BorderFlower01' scale='1 1 1'>
[Transform translation='0.5 0 0' >
[Shape USE='Stem1'/>
[/Transform>
... shortened by some petals added not shown
[Transform translation='0.5 0.01 0' scale='1 1.5 1'>
[Shape USE='FlowerCenter'/>
[/Transform>
[/Transform>

Now all three of the first flowers, including BorderFlower01, show up fine with  animation working no problem.

Then I USE BorderFlower01 to build another set of one Special flower and 20 border flowers.

[Transform DEF='rFlowerSpecial' scale='2 2 2' rotation='0 0 1 0' translation='7 0.35 0'>
[Shape USE='BorderFlower01'/>
[/Transform>
[Transform DEF='rFlower01' rotation='0 0 1 0' translation='9.198902 0.25 -0.863062'>
[Shape USE='BorderFlower01'/>
[/Transform>
. . . plus 18 r and l flowers
[Transform DEF='lFlower10' rotation='0 0 1 0' translation='18.515152 0.25 30.003242'>
[Shape USE='BorderFlower01'/>
[/Transform>

When I run it I get error and I don't see why.
Thanks for looking.
Joe

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org





More information about the x3d-public mailing list