<div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:12pt"><p style="margin: 0.1rem 0; line-height: 1.0;"><span style="color: #000000; font-family: 'Times New Roman'; font-size: medium; white-space: normal; float: none; display: inline;">> Can nodes really contain both a DEF and a USE?</span></p>
<p style="margin: 0.1rem 0; line-height: 1.0;"> </p>
<p style="margin: 0.1rem 0; line-height: 1.0;">  <Transform translation='0.5 0.01 0' scale='1 1.5 1'><br>    <Shape DEF='Example3' USE='FlowerCenter'/> </p>
<p style="margin: 0.1rem 0; line-height: 1.0;"> </p>
<p style="margin: 0.1rem 0; line-height: 1.0;">Joe</p>
<p style="margin: 0.1rem 0; line-height: 1.0;"> </p>
<p style="margin: 0.1rem 0; line-height: 1.0;"> </p>
</div>
<div class="elnk-inline-message-container" style="border-left: 1px solid #aaa; box-sizing: border-box; padding: 10px 0 10px 15px; margin: 0;">
<p>-----Original Message-----<br>From: John Carlson <yottzumm@gmail.com><br>Sent: Oct 16, 2023 6:31 PM<br>To: Joe D Williams <joedwil@earthlink.net><br>Cc: Brutzman Donald (Don) (CIV) <brutzman@nps.edu>, GPU Group <gpugroup@gmail.com>, Peitso Loren (CIV) <lepeitso@nps.edu>, X3D Graphics public mailing list <x3d-public@web3d.org><br>Subject: Re: Thoughts for x3d.py str() calls</p>
<p style="margin: 0.1rem 0; line-height: 1.0;"> </p>
<div dir="auto">Can nodes really contain both a DEF and a USE?</div>
<div dir="auto"> </div>
<div dir="auto">John </div>
<div>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Mon, Oct 16, 2023 at 8:27 PM Joe D Williams <<a href="mailto:joedwil@earthlink.net">joedwil@earthlink.net</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; padding-left: 1ex; border-left-color: #cccccc;">
<div style="font-family: arial,sans-serif; font-size: 12pt; color: #000000;">> Is the author doing the wrong thing?How can you tell right or wrong from that example? If building a scene, why not use X3D SAI features. If you are simply inventing away to build good user code, then this should fail. In general, why invent an append, and what is this supposed to append. Please check x3d SAI for this type of functionality.
<p style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 1px; text-decoration: none; font-family: -apple-system,'Helvetica Neue'; font-size: 1rem; font-style: normal; font-variant-caps: normal; font-weight: 400; margin: 0.1rem 0px; line-height: 1; background-color: rgba(0,0,0,0); border-color: #313131; color: #313131;">trans = Transform(DEF='C')  # probably need to set other fields</p>
<p style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 1px; text-decoration: none; font-family: -apple-system,'Helvetica Neue'; font-size: 1rem; font-style: normal; font-variant-caps: normal; font-weight: 400; margin: 0.1rem 0px; line-height: 1; background-color: rgba(0,0,0,0); border-color: #313131; color: #313131;">grpb.children.append(Transform(<span style="font-family: arial,sans-serif; font-size: 12pt; color: #000000;">DEF='D' </span>USE='C')</p>
<p style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 1px; text-decoration: none; font-family: -apple-system,'Helvetica Neue'; font-size: 1rem; font-style: normal; font-variant-caps: normal; font-weight: 400; margin: 0.1rem 0px; line-height: 1; background-color: rgba(0,0,0,0); border-color: #313131; color: #313131;">grpa.children.append(Transform(<span style="font-family: arial,sans-serif; font-size: 12pt; color: #000000;">DEF='E' </span>USE='C')</p>
<p style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 1px; text-decoration: none; font-family: -apple-system,'Helvetica Neue'; font-size: 1rem; font-style: normal; font-variant-caps: normal; font-weight: 400; margin: 0.1rem 0px; line-height: 1; background-color: rgba(0,0,0,0); border-color: #313131; color: #313131;"> </p>
<p style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 1px; text-decoration: none; font-family: -apple-system,'Helvetica Neue'; font-size: 1rem; font-style: normal; font-variant-caps: normal; font-weight: 400; margin: 0.1rem 0px; line-height: 1; background-color: rgba(0,0,0,0); border-color: #313131; color: #313131;">or something, but look at SAI for this kind of stuff</p>
</div>
<div style="font-family: arial,sans-serif; font-size: 12pt; color: #000000;">Joe
<div style="border-left-width: 1px; border-left-style: solid; box-sizing: border-box; padding: 10px 0px 10px 15px; margin: 0px; font-family: arial,sans-serif; border-left-color: #aaaaaa;">
<p style="font-family: arial,sans-serif;">-----Original Message-----<br>From: John Carlson <<a style="font-family: arial,sans-serif;" href="mailto:yottzumm@gmail.com" target="_blank" rel="noopener">yottzumm@gmail.com</a>><br>Sent: Oct 16, 2023 5:41 PM<br>To: Joe D Williams <<a style="font-family: arial,sans-serif;" href="mailto:joedwil@earthlink.net" target="_blank" rel="noopener">joedwil@earthlink.net</a>><br>Cc: Brutzman Donald (Don) (CIV) <<a style="font-family: arial,sans-serif;" href="mailto:brutzman@nps.edu" target="_blank" rel="noopener">brutzman@nps.edu</a>>, GPU Group <<a style="font-family: arial,sans-serif;" href="mailto:gpugroup@gmail.com" target="_blank" rel="noopener">gpugroup@gmail.com</a>>, Peitso Loren (CIV) <<a style="font-family: arial,sans-serif;" href="mailto:lepeitso@nps.edu" target="_blank" rel="noopener">lepeitso@nps.edu</a>>, X3D Graphics public mailing list <<a style="font-family: arial,sans-serif;" href="mailto:x3d-public@web3d.org" target="_blank" rel="noopener">x3d-public@web3d.org</a>><br>Subject: Re: Thoughts for x3d.py str() calls</p>
<p style="margin: 0.1rem 0px; line-height: 1; font-family: arial,sans-serif;"> </p>
<div dir="auto" style="font-family: arial,sans-serif;">Here’s a python example from Doug:</div>
<div dir="auto" style="font-family: arial,sans-serif;"> </div>
<div dir="auto" style="font-family: arial,sans-serif;"> </div>
<div dir="auto" style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<div style="font-family: -apple-system,'Helvetica Neue'; font-size: 1rem; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 1px; text-decoration: none; background-color: rgba(0,0,0,0); border-color: #313131; color: #313131;">trans = Transform(DEF='C')</div>
<div style="font-family: -apple-system,'Helvetica Neue'; font-size: 1rem; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 1px; text-decoration: none; background-color: rgba(0,0,0,0); border-color: #313131; color: #313131;">grpb.children.append(trans)</div>
<div style="font-family: -apple-system,'Helvetica Neue'; font-size: 1rem; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 1px; text-decoration: none; background-color: rgba(0,0,0,0); border-color: #313131; color: #313131;">grpa.children.append(trans)</div>
</div>
</div>
<div dir="auto" style="font-family: arial,sans-serif;">Is the author doing the wrong thing?</div>
<div dir="auto" style="font-family: arial,sans-serif;"> </div>
<div dir="auto" style="font-family: arial,sans-serif;">John </div>
<div style="font-family: arial,sans-serif;"><br>
<div class="gmail_quote" style="font-family: arial,sans-serif;">
<div class="gmail_attr" dir="ltr" style="font-family: arial,sans-serif;">On Mon, Oct 16, 2023 at 7:37 PM John Carlson <<a style="font-family: arial,sans-serif;" href="mailto:yottzumm@gmail.com" target="_blank" rel="noopener">yottzumm@gmail.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; padding-left: 1ex; font-family: arial,sans-serif; border-left-color: #cccccc;">
<div dir="auto" style="font-family: arial,sans-serif;">If we keep a reference around to place in both skin coordinate and skinCoord, will x3d.py be smart enough to output DEF in the first case and USE in the second case, or will it just output whatever DEF or USE is currently stored for the node?  Will it gladly print out both USE and DEF plus all the fields along with USE and DEF?  A simple python example would use a a reference more than once.  I don’t have that yet, but it should be easy to create one.</div>
<div dir="auto" style="font-family: arial,sans-serif;"> </div>
<div dir="auto" style="font-family: arial,sans-serif;">No, I don’t want to override the str function, because my new function will use it.</div>
<div style="font-family: arial,sans-serif;"><br>
<div class="gmail_quote" style="font-family: arial,sans-serif;">
<div class="gmail_attr" dir="ltr" style="font-family: arial,sans-serif;">On Mon, Oct 16, 2023 at 5:32 PM Joe D Williams <<a style="font-family: arial,sans-serif;" href="mailto:joedwil@earthlink.net" target="_blank" rel="noopener">joedwil@earthlink.net</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; padding-left: 1ex; font-family: arial,sans-serif; border-left-color: #cccccc;">
<div style="font-family: arial,sans-serif; font-size: 12pt; color: #000000;">
<p style="margin: 0.1rem 0px; line-height: 1; font-family: arial,sans-serif;">I don't know if this helps, but just from memory, every loader I have ever seen that deep into will assign a unique def if a DEFable field does not have a DEF. I think a DEF always helps the runtime. The SAI can discover the assignment if you need it.   </p>
</div>
<div style="font-family: arial,sans-serif; font-size: 12pt; color: #000000;">
<p style="margin: 0.1rem 0px; line-height: 1; font-family: arial,sans-serif;">Joe</p>
<p style="margin: 0.1rem 0px; line-height: 1; font-family: arial,sans-serif;"> </p>
</div>
<div style="border-left-width: 1px; border-left-style: solid; box-sizing: border-box; padding: 10px 0px 10px 15px; margin: 0px; font-family: arial,sans-serif; border-left-color: #aaaaaa;">
<p style="font-family: arial,sans-serif;">-----Original Message-----<br>From: GPU Group <<a style="font-family: arial,sans-serif;" href="mailto:gpugroup@gmail.com" target="_blank" rel="noopener">gpugroup@gmail.com</a>><br>Sent: Oct 16, 2023 2:36 PM<br>To: Brutzman, Donald (Don) (CIV) <<a style="font-family: arial,sans-serif;" href="mailto:brutzman@nps.edu" target="_blank" rel="noopener">brutzman@nps.edu</a>><br>Cc: John Carlson <<a style="font-family: arial,sans-serif;" href="mailto:yottzumm@gmail.com" target="_blank" rel="noopener">yottzumm@gmail.com</a>>, Joe D Williams <<a style="font-family: arial,sans-serif;" href="mailto:joedwil@earthlink.net" target="_blank" rel="noopener">joedwil@earthlink.net</a>>, Peitso, Loren (CIV) <<a style="font-family: arial,sans-serif;" href="mailto:lepeitso@nps.edu" target="_blank" rel="noopener">lepeitso@nps.edu</a>>, X3D Graphics public mailing list <<a style="font-family: arial,sans-serif;" href="mailto:x3d-public@web3d.org" target="_blank" rel="noopener">x3d-public@web3d.org</a>><br>Subject: Re: Thoughts for x3d.py str() calls</p>
<p style="margin: 0.1rem 0px; line-height: 1; font-family: arial,sans-serif;"> </p>
<div dir="ltr" style="font-family: arial,sans-serif;">Don,
<div style="font-family: arial,sans-serif;">Q1. Do you acknowledge x3d.py makes no attempt to conjugate DEF and USE of the same name?</div>
<div style="font-family: arial,sans-serif;">Q2. Do you acknowledge some nodes in x3d can have multiple fields using the same node?</div>
<div style="font-family: arial,sans-serif;">Q3. Do you acknowledge x3d.py controls the order fields of a node are exported?</div>
<div style="font-family: arial,sans-serif;">Q4. Do you acknowledge there may be use-cases when a script using x3d.py will instance DEF and USE x3d.py nodes of the same name in a different order than x3d.py may export?</div>
<div style="font-family: arial,sans-serif;">In HAnimHumanoid 2 fields take the same Coordinate node: a) .coordinate b) .skin (in descendent nodes)</div>
<div style="font-family: arial,sans-serif;">The blender exporter traverses the blender scenegraph in a systematic order convenient to that script. The first time it encounters the Coordinate node it instances an x3d.py Coordinate node with a DEF. The subsequent times it encounters the same node it instances an x3d.py node with a USE of the same name.</div>
<div style="font-family: arial,sans-serif;">x3d.py exports the HAnimHumanoid.coordinate field before .skin. That's a different order than the user script visits blender nodes.</div>
<div style="font-family: arial,sans-serif;">That 2-field-same-node scenario may not occur frequently in web3d, or a using-script may be lucky in its case to instance the DEF and USE in the same order as x3d.py happens to export. So many successful Examples don't help this case.</div>
<div style="font-family: arial,sans-serif;">-Doug</div>
<div style="font-family: arial,sans-serif;"> </div>
</div>
<br>
<div class="gmail_quote" style="font-family: arial,sans-serif;">
<div class="gmail_attr" dir="ltr" style="font-family: arial,sans-serif;">On Mon, Oct 16, 2023 at 2:47 PM Brutzman, Donald (Don) (CIV) <<a style="font-family: arial,sans-serif;" href="mailto:brutzman@nps.edu" target="_blank" rel="noopener">brutzman@nps.edu</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; padding-left: 1ex; font-family: arial,sans-serif; border-left-color: #cccccc;">
<div style="font-family: arial,sans-serif;">
<div lang="EN-US" style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">The x3d.py makes no effort to correct author errors.  That is up to the author.  Trying to “fix” things further can lead to further problems and a corrupted model.<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;">There are a great many models in X3D Examples with DEF and USE which run properly in unit tests.<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;">There are several diagnostics built in for reporting errors.  Have you tested your erroneous scene to see what you get?  If a further error diagnostic is needed, we can add it to the  X3DPSAIL TODO list.  If you write a python method to do that, we can test it further and possibly integrate it.<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<ul style="margin-top: 0in; font-family: arial,sans-serif;" type="disc">
<li style="margin-left: 0in; font-family: arial,sans-serif;">X3D Python Scene Access Interface Library (X3DPSAIL), TODO<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></li>
<li style="margin-left: 0in; font-family: arial,sans-serif;"><a style="font-family: arial,sans-serif;" href="https://www.web3d.org/x3d/stylesheets/python/python.html#TODO" target="_blank" rel="noopener">https://www.web3d.org/x3d/stylesheets/python/python.html#TODO</a><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></li>
</ul>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;">If a correct model is getting exported into another form incorrectly, then we can diagnose and fix the conversion.  As ever, use-case examples of such errors are essential to continuing progress.<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;">Thanks for all efforts with X3D Python.<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><span style="font-size: 9pt; font-family: 'Courier New';"><u style="font-family: 'Courier New';"></u> <u style="font-family: 'Courier New';"></u></span></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><span style="font-size: 9pt; font-family: 'Courier New';">all the best, Don<u style="font-family: 'Courier New';"></u><u style="font-family: 'Courier New';"></u></span></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><span style="font-size: 9pt; font-family: 'Courier New';">-- <u style="font-family: 'Courier New';"></u><u style="font-family: 'Courier New';"></u></span></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><span style="font-size: 9pt; font-family: 'Courier New';">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a style="font-family: 'Courier New';" href="mailto:brutzman@nps.edu" target="_blank" rel="noopener">brutzman@nps.edu</a><u style="font-family: 'Courier New';"></u><u style="font-family: 'Courier New';"></u></span></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><span style="font-size: 9pt; font-family: 'Courier New';">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u style="font-family: 'Courier New';"></u><u style="font-family: 'Courier New';"></u></span></p>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><span style="font-size: 9pt; font-family: 'Courier New';">X3D graphics, virtual worlds, navy robotics <a style="font-family: 'Courier New';" href="https://faculty.nps.edu/brutzman" target="_blank" rel="noopener">https://faculty.nps.edu/brutzman</a><u style="font-family: 'Courier New';"></u><u style="font-family: 'Courier New';"></u></span></p>
</div>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<div style="border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; font-family: arial,sans-serif; border-color: #e1e1e1 currentcolor currentcolor;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><strong style="font-family: arial,sans-serif;">From:</strong> GPU Group <<a style="font-family: arial,sans-serif;" href="mailto:gpugroup@gmail.com" target="_blank" rel="noopener">gpugroup@gmail.com</a>> <br><strong style="font-family: arial,sans-serif;">Sent:</strong> Monday, October 16, 2023 9:49 AM<br><strong style="font-family: arial,sans-serif;">To:</strong> John Carlson <<a style="font-family: arial,sans-serif;" href="mailto:yottzumm@gmail.com" target="_blank" rel="noopener">yottzumm@gmail.com</a>><br><strong style="font-family: arial,sans-serif;">Cc:</strong> Brutzman, Donald (Don) (CIV) <<a style="font-family: arial,sans-serif;" href="mailto:brutzman@nps.edu" target="_blank" rel="noopener">brutzman@nps.edu</a>>; Joe D Williams <<a style="font-family: arial,sans-serif;" href="mailto:joedwil@earthlink.net" target="_blank" rel="noopener">joedwil@earthlink.net</a>>; Peitso, Loren (CIV) <<a style="font-family: arial,sans-serif;" href="mailto:lepeitso@nps.edu" target="_blank" rel="noopener">lepeitso@nps.edu</a>>; X3D Graphics public mailing list <<a style="font-family: arial,sans-serif;" href="mailto:x3d-public@web3d.org" target="_blank" rel="noopener">x3d-public@web3d.org</a>><br><strong style="font-family: arial,sans-serif;">Subject:</strong> Re: Thoughts for x3d.py str() calls<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">correction first output is <u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">  <Scene><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    <Group DEF='A'><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">      <Transform DEF='C'/><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    </Group><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    <Group DEF='B'><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">      <Transform DEF='C'/><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    </Group><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">On Mon, Oct 16, 2023 at 10:32 AM GPU Group <<a style="font-family: arial,sans-serif;" href="mailto:gpugroup@gmail.com" target="_blank" rel="noopener">gpugroup@gmail.com</a>> wrote:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in; font-family: arial,sans-serif; border-color: currentcolor currentcolor currentcolor #cccccc;">
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">That may relate to the DEF USE issue with X3D.py: <u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">x x3d.py makes no effort to conjugate DEF and USE and properly order DEF before USE in its export stream<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">- not a common problem unless a node has 2 fields that take the same node (directly SF or indirectly in MFNode descendent field)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">x it's a problem with HAnimHumanoid which has coordinate and skin fields, which typically involve the same Coordinate node<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">- tinkering can be done in the blender exporter, to do a USE before a DEF,  but with inconvenience and messy code<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">If a call can be made in x3d.py before exporting a DEF or USE, then that function can be over-ridden to take responsibility for DEF USE conjugation and correct output ordering something like this:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">node = getDefOrUse(node, node.DEF, node.USE)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">and for the x3d.py default it would just return the same element (or node), and overrides can do something more sophisticated.<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">more..<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">DEF USE NON-CONJUGATION IN X3D.PY<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">test_def.py<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">x3d = X3D()<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">scene = Scene()<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">x3d.Scene = scene<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">grpa = Group(DEF='A')<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">grpb = Group(DEF='B')<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">scene.children.append(grpa)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">scene.children.append(grpb)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">trans = Transform(DEF='C')<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">grpb.children.append(trans)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">grpa.children.append(trans)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">blob = x3d.XML()<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">fp = open("dump.x3d","w+")<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">fp.write(blob)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">fp.close()<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">output:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><?xml version="1.0" encoding="UTF-8"?><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "<a style="font-family: arial,sans-serif;" href="https://www.web3d.org/specifications/x3d-4.0.dtd" target="_blank" rel="noopener">https://www.web3d.org/specifications/x3d-4.0.dtd</a>"><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><X3D profile='Full' version='4.0' xmlns:xsd='<a style="font-family: arial,sans-serif;" href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=05%7C01%7Cbrutzman%40nps.edu%7C5c09532fc6784acf636108dbce67ceb2%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638330717470356414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yglIKBZsT6BoJS9%2BDnaKptd%2FEdy4pnjHp4KFFEuFFLQ%3D&reserved=0" target="_blank" rel="noopener">http://www.w3.org/2001/XMLSchema-instance</a>' xsd:noNamespaceSchemaLocation='<a style="font-family: arial,sans-serif;" href="https://www.web3d.org/specifications/x3d-4.0.xsd" target="_blank" rel="noopener">https://www.web3d.org/specifications/x3d-4.0.xsd</a>'><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">  <Scene><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    <Group DEF='A'><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">      <Transform USE='C'/><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    </Group><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    <Group DEF='B'><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">      <Transform DEF='C'/><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    </Group><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">  </Scene><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"></X3D><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">test_def_use.py<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">from x3d import *<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">x3d = X3D()<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">scene = Scene()<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">x3d.Scene = scene<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">grpa = Group(DEF='A')<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">grpb = Group(DEF='B')<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">scene.children.append(grpa)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">scene.children.append(grpb)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">trans = Transform(DEF='C')<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">grpb.children.append(trans)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">grpa.children.append(trans)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">blob = x3d.XML()<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">fp = open("dump.x3d","w+")<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">fp.write(blob)<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">fp.close()<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">output:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><?xml version="1.0" encoding="UTF-8"?><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "<a style="font-family: arial,sans-serif;" href="https://www.web3d.org/specifications/x3d-4.0.dtd" target="_blank" rel="noopener">https://www.web3d.org/specifications/x3d-4.0.dtd</a>"><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><X3D profile='Full' version='4.0' xmlns:xsd='<a style="font-family: arial,sans-serif;" href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=05%7C01%7Cbrutzman%40nps.edu%7C5c09532fc6784acf636108dbce67ceb2%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638330717470512654%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=C1CiwnRN22BrRL7097t92ojvanIkKyb8xlQeolJXaGc%3D&reserved=0" target="_blank" rel="noopener">http://www.w3.org/2001/XMLSchema-instance</a>' xsd:noNamespaceSchemaLocation='<a style="font-family: arial,sans-serif;" href="https://www.web3d.org/specifications/x3d-4.0.xsd" target="_blank" rel="noopener">https://www.web3d.org/specifications/x3d-4.0.xsd</a>'><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">  <Scene><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    <Group DEF='A'><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">      <Transform USE='C'/><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    </Group><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    <Group DEF='B'><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">      <Transform DEF='C'/><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    </Group><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">  </Scene><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"></X3D><u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">On Mon, Oct 16, 2023 at 10:09 AM GPU Group <<a style="font-family: arial,sans-serif;" href="mailto:gpugroup@gmail.com" target="_blank" rel="noopener">gpugroup@gmail.com</a>> wrote:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in; font-family: arial,sans-serif; border-color: currentcolor currentcolor currentcolor #cccccc;">
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">It seems possible to override functions in python, if there are just a few to override. <u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">And one suggestion for x3d.py imperfections is to apply fixes at runtime in some initialization function.<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">- that assumes/requires just a few target functions, not 480 functions that need to be repaired<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">- so for some fixes it may be helpful to change the upstream x3d.py to call a function that can be easily replaced.<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">-Doug<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">Example:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">file myclass.py <u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">class Wonky:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">  def __init__(self):<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    self.color = "Red"<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">  def func1(self, color :str) -> bool:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    if color == self.color:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">      return True<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    return False<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">file override.py<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">from myclass import *<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">mc = Wonky()<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">print("match with Blue? "+str(mc.func1("Blue")))<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">def func2(self, color: str) -> bool:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">  if self.color != color:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">    return True<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">  return False<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">Wonky.func1 = func2 # <<<<<<<<<<<< OVERRIDE<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">print("don't match with Blue? "+str(mc.func1("Blue")))<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">output:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">match with Blue? False<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">don't match with Blue? True<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">-Doug<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">On Mon, Oct 16, 2023 at 9:55 AM John Carlson <<a style="font-family: arial,sans-serif;" href="mailto:yottzumm@gmail.com" target="_blank" rel="noopener">yottzumm@gmail.com</a>> wrote:<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in; font-family: arial,sans-serif; border-color: currentcolor currentcolor currentcolor #cccccc;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">Instead of calling str() to print out a value, call a function that does precision floating point formatting on floats according to a user’s wishes.  If the value is a list, call the function recursively with a list comprehension, otherwise, call str. <u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">I think this is doable by mere humans.<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">Thanks,<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;"><u style="font-family: arial,sans-serif;"></u> <u style="font-family: arial,sans-serif;"></u></p>
</div>
<div style="font-family: arial,sans-serif;">
<p class="MsoNormal" style="font-family: arial,sans-serif;">John<u style="font-family: arial,sans-serif;"></u><u style="font-family: arial,sans-serif;"></u></p>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
<p style="margin: 0.1rem 0px; line-height: 1; font-family: arial,sans-serif;"> </p>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<p style="margin: 0.1rem 0px; line-height: 1; font-family: arial,sans-serif;"> </p>
</div>
</blockquote>
</div>
</div>
</div>

<p style="margin: 0.1rem 0; line-height: 1.0;"> </p>