[x3d-public] x3d.py SFVec3f toXML keeps parens

Don Brutzman brutzman at nps.edu
Sat Apr 25 09:05:33 PDT 2020


[cc: x3d-public with permission]

Andreas thank you for another helpful issue report.

On 4/23/2020 7:40 PM, Andreas Plesch wrote:
> Sorry but I keep coming across these (with 0.0.27):

No really thanks, my regression testing so far only checks for exceptions, haven't done any round-trip tests which will take some nontrivial work.

>>>> import x3d.x3d as x
> x3d.py package loaded, have fun with X3D Graphics!
>>>> x.Viewpoint(position=(1,1,1)).toXML()
> "<Viewpoint position='(1, 1, 1)'/>\n"
>>>>
> 
> The output should be <Viewpoint position='1, 1, 1'/> .

This is common problem/correction for all SFVec3f and similarly all numeric types and most MF types.  Will need to be extra careful (as usual) with SFString and MFString.

TODO, hopefully this weekend: will be changing output to match X3D canonical form, <Viewpoint position='1, 1, 1'/>

Additional error patterns also welcome.  Strict typing of X3D scene graph plus Pythonic strictness plus Quality Assurance (QA) will lead us to a really robust pipeline, suitable even for Big Data information flows.  Java has this rigor already, XML is similarly strong, when JSON Schema is finally standardized/deployed then that alternative dataflow will be ready for "prime time" application chains as well.

p.s. motivation: the worst errors are those you don't know about because they fail silently.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list