Menu

#91 Apparently, this is an invalid way to specify an Interpolator in X3DPSAIL Python app code

X3D4
wont-fix
None
2026-02-08
2026-02-08
No

Apparently, the key and keyValue are not maintained in output X3D encodings, using this:

CoordinateInterpolator24 = x3d.CoordinateInterpolator()
CoordinateInterpolator24.DEF = "ci"
CoordinateInterpolator24.key = [0,0.5,1]
CoordinateInterpolator24.keyValue = [(-23.495, 90.55, -8.13),(-28.825, 91.31, 0),(9.77497, 126.11, 0[snip]
Scene9.children.append(CoordinateInterpolator24)

I guess I'll have to revisit my Python Serializer.

Hmm!

Related

Tickets: #91

Discussion

  • John W Carlson

    John W Carlson - 2026-02-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -3,8 +3,8 @@
     CoordinateInterpolator24 = x3d.CoordinateInterpolator()
     CoordinateInterpolator24.DEF = "ci"
     CoordinateInterpolator24.key = [0,0.5,1]
    -CoordinateInterpolator24.keyValue = [(-23.495, 90.55, -8.13),(-28.825, 91.31, 0),(9.77497, 126.11, 0
    -Scene9.children.append(CoordinateInterpolator24)[snip]
    +CoordinateInterpolator24.keyValue = [(-23.495, 90.55, -8.13),(-28.825, 91.31, 0),(9.77497, 126.11, 0[snip]
    +Scene9.children.append(CoordinateInterpolator24)
    
     I guess I'll have to revisit my Python Serializer.
    
     
  • John W Carlson

    John W Carlson - 2026-02-08

    This also fails:

    $ grep Interpolator flipp.py|cut -c1-100
    ScalarInterpolator23 = x3d.ScalarInterpolator(key=[], keyValue=[])
    ScalarInterpolator23.DEF = "si"
    ScalarInterpolator23.key = [0,0.5,1]
    ScalarInterpolator23.keyValue = [0,1,0]
    Scene9.children.append(ScalarInterpolator23)
    CoordinateInterpolator24 = x3d.CoordinateInterpolator(key=[], keyValue=[])
    CoordinateInterpolator24.DEF = "ci"
    CoordinateInterpolator24.key = [0,0.5,1]
    CoordinateInterpolator24.keyValue = [(-23.495, 90.55, -8.13),(-28.825, 91.31, 0),(9.77497, 126.11, 0[snip]
    Scene9.children.append(CoordinateInterpolator24)

    I don't get it. Clueless at this point.

     
  • John W Carlson

    John W Carlson - 2026-02-08

    I've been looking at x3d.py. Nothing pops out.

     
  • John W Carlson

    John W Carlson - 2026-02-08

    Here's a fairly short program that shows the issue. Feel free to truncate the keyValue a bit.

     
  • John W Carlson

    John W Carlson - 2026-02-08

    For example, interp2.py, attached, works.

     
  • John W Carlson

    John W Carlson - 2026-02-08

    It's got something to do with the DEF. When I take out the DEF from the Interpolators, I do get key and keyValue.

    Hmm

     

    Last edit: John W Carlson 2026-02-08
  • John W Carlson

    John W Carlson - 2026-02-08

    This seems like a half decent solution.

     
  • Don Brutzman

    Don Brutzman - 2026-02-08
    • status: open --> wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB