X3D Python Language Binding
From Web3D.org
The X3D Working Group has started to work on this important potential addition to the suite of X3D-capable programming languages and file encodings.
Contents
Motivation
X3D supports multiple language bindings and file encodings, each providing equivalent implementations of X3D Architecture. The X3D Specification Relationships diagram shows how the various programming-language bindings and file encodings are related.
Why Python:
- X3D Python Language Binding ISO/IEC 19777-6) will directly implement X3D Scene Access Interface (SAI) Specification, which in turn accesses the X3D Architecture Specification
- Python is widely used, so many tools and applications might then easily create/use/produce X3D
- We are not afraid of programming languages that depend on whitespace!
Resources
- Python script interfaces
- H3DAPI has a Python Interface (which includes most of X3D) http://www.h3dapi.org/modules/judoc/
- Blender has an independent interface
- NIH has written a series of Python scripts that exercise Blender
- pyOCC python interface to Open Cascasde geometry kernel
John Carlson has produced
Deliverables
- Draft 19777-6 specification added in GitHub
- Follow examples of other X3D language bindings
- Reach proof-of-capability initial draft
- New Work Item Proposal (NWIP) by Web3D Consortium for ISO
- Example scenes
- Test scenes to demonstrate design patterns
- Implementations
- Conversion stylesheet, X3dToPython.xslt
- PyJnius cross-compilation conversion of X3DJSAIL java classes
- Possibly another library, X3DPSAIL or X3DPYSAIL perhaps?
- Validation by compilation
- are special tests needed, written in Python, to test program validity?
- Compatible with X3D Unified Object Model (X3DUOM)
- Plan of Action Milestones (POAM)
TBD
To Be Determined:
- Is it possible to run Python scripts in a Web browser?
- Python support for DOM?
- Masaki Aono produced some speculative code a few years ago