[x3d-public] FW: X3DJSAIL Python: setShape() Method not found on CollidableShapeparent interface, cannot find in returned object. Need cast.

John Carlson yottzumm at gmail.com
Sun Nov 25 06:13:16 PST 2018


Dear Dr. Aono.  Thank you for all your assistant in the past.   We are trying to convert X3D python X3DJSAIL code to a single expression for the scenegraph, but we get this error.  I am basically stumped by this:

➢ set PYTHONPATH=C:\x3d-code\www.web3d.org\x3d\stylesheets\java\src\python\pyjinus

➢ cd %PYTHONPATH%

➢ python ../../../../../content/examples/Basic/RigidBodyPhysics/UniversalJointfuture.py
Traceback (most recent call last):
  File "../../../../../content/examples/Basic/RigidBodyPhysics/UniversalJointfuture.py", line 73, in <module>
    .setDEF("BOX-GEOM-1") \
AttributeError: 'org.web3d.x3d.sai.RigidBodyPhysics.X3DNBodyCollida' object has no attribute 'setShape'

This works:

➢ python ../../../../../content/examples/Basic/RigidBodyPhysics/UniversalJoint.py
Warning: /x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/UniversalJoint.new.x3d does not meet suggested X3D naming conventions, output serialization continuing...
Warning: toFileX3D() is overwriting prior file /x3d-code/www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/UniversalJoint.new.x3d


The python files are attached and may be dropped in the checked out sourceforge folder.   The ant build.xml in pyjnius folder will create python files from X3D XML and overwrite the python files in www.web3d.org/x3d/content/examples/…


Thank you for all the help you can give.

I am using python 3.6.7 and npm 6.4.1.

Jeff, if you want to catch up, you can check out my python and JavaScript code in pyjnius from https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/, then set PYTHONPATH as above, … You’ll probably need to build X3DJSAIL (can you provide instructions for building Don?) or modify the classpath in the python file to refer to the full jar path

I am trying to make it so you don’t have to run ant/build.xml by providing python files.  There are many more similar errors in the ant build.

I am a python beginner for the most part.

Don, please copy from this anything you see that will help people bootstrap into python.

My apologies that this is not organized as well as it could be.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20181125/3af012ee/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UniversalJoint.py
Type: application/octet-stream
Size: 4519 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20181125/3af012ee/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UniversalJointfuture.py
Type: application/octet-stream
Size: 3859 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20181125/3af012ee/attachment-0003.obj>


More information about the x3d-public mailing list