[x3d-public] Sample X3D Python API; examples published for continuing improvement

John Carlson yottzumm at gmail.com
Mon Apr 15 12:19:18 PDT 2019


You are welcome to produce an X3dToPy.xslt or otherwise manipulate the
python files to eliminate any abstract classes.   I am not aware of using
abstract classes in the *.future.py files, and would have to be shown an
example, thanks.  You may also move the org/Web3d/X3D/sai pyjnius folder
out of the way for a test.

I do know ignoring the return value from the setters seems to work for
pyjnius, so perhaps we should explore why that works in the context of
abstract classes.

Also, please explore what I am doing with declaring abstract classes under
the pyjnius folder and how that might be improved.

I need an example before I can move forward.

Thanks,

John

On Mon, Apr 15, 2019 at 11:23 AM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:

> Am happy to report that both versions of your .py programs are now being
> produced and published for all models in X3D Examples Archives.
>
> BLUF: these should greatly help us in continued improvement of X3D Python
> language-binding syntax.
>
> Build log (now 10MB) includes X3D validation of RoundTrip scenes and
> remains updated at
>
> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/
>
> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/build.python.all.log.txt
>
> A zip of all autogenerated python models is at
>
>
> http://www.web3d.org/x3d/content/examples/X3dExampleArchivesPythonScenes.zip
>
> http://www.web3d.org/x3d/content/examples/X3dExampleArchivesPythonScenes.zip.MD5
>
> Example links to python source _.pyv1_ and _.pyv2_ are provided for each
> scene, for example
>
> http://x3dgraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes/
>
> http://x3dgraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldIndex.html
>
> As before the .future.py versions fail pyjnius because of use of abstract
> classes.
>
> On 4/11/2019 6:35 PM, John Carlson wrote:
> > This versions is much cleaner than the previous version. Attached zip.
> >
> > Please review.  We will get comments soon I hope.
> >
> > John
>
> John, do you think we should pursue changes to pyJNIus to support abstract
> classes?
>
> Or... we could instead eliminate them and fully elaborate each node.  Not
> convinced that Python programmers might want or need abstract classes in
> the first place.  Certainly we don't need to implement them in this
> initial-design phase.
>
> This is kind of configuration preparation is automatable using X3DUOM, of
> course.  Excerpts from your zip follows.  You appear to be there already,
> fully elaborating methods for all fields in all nodes?  Perhaps we should
> simply test with abstract classes omitted, or defined second?
>
> [...]
> class X3DAppearanceChildNode(X3DNode):
>      def __init__(self, **kwargs):
>      def metadata(self):
>      def metadata(self, value = None):
>      def setMetadata(self, metadata = None):
>      def addMetadata(self, metadata = None):
>      def removeMetadata(self, metadata):
>      def getMetadata(self, metadata = None):
>      def metadata_changed(self, metadata = None):
>      def DEF(self):
>      def DEF(self, value = None):
>      def setDEF(self, DEF = None):
>      def addDEF(self, DEF = None):
>      def removeDEF(self, DEF):
>      def getDEF(self, DEF = None):
>      def DEF_changed(self, DEF = None):
>      def USE(self):
>      def USE(self, value = None):
>      def setUSE(self, USE = None):
>      def addUSE(self, USE = None):
>      def removeUSE(self, USE):
>      def getUSE(self, USE = None):
>      def USE_changed(self, USE = None):
>      def class_(self):
>      def class_(self, value = None):
>      def setClass(self, class_ = None):
>      def addClass(self, class_ = None):
>      def removeClass(self, class_):
>      def getClass(self, class_ = None):
>      def class_changed(self, class_ = None):
>      def comments(self):
>      def comments(self, value = None):
>      def setComments(self, comments = None):
>      def addComments(self, comments = None):
>
> [...]
> class StringSensor(X3DKeyDeviceSensorNode):
>      def __init__(self, **kwargs):
>      def deletionAllowed(self):
>      def deletionAllowed(self, value = True):
>      def setDeletionAllowed(self, deletionAllowed = True):
>      def addDeletionAllowed(self, deletionAllowed = True):
>      def removeDeletionAllowed(self, deletionAllowed):
>      def isDeletionAllowed(self, deletionAllowed = True):
>      def enabled(self):
>      def enabled(self, value = True):
>      def setEnabled(self, enabled = True):
>      def addEnabled(self, enabled = True):
>      def removeEnabled(self, enabled):
>      def isEnabled(self, enabled = True):
>      def removeEnteredText(self, enteredText):
>      def getEnteredText(self, enteredText = None):
>      def enteredText_changed(self, enteredText = None):
>      def removeFinalText(self, finalText):
>      def getFinalText(self, finalText = None):
>      def finalText_changed(self, finalText = None):
>      def isActive(self, Active = None):
>      def metadata(self):
>      def metadata(self, value = None):
>      def setMetadata(self, metadata = None):
>      def addMetadata(self, metadata = None):
>      def removeMetadata(self, metadata):
>      def getMetadata(self, metadata = None):
>      def metadata_changed(self, metadata = None):
>      def DEF(self):
>      def DEF(self, value = None):
>      def setDEF(self, DEF = None):
>      def addDEF(self, DEF = None):
>      def removeDEF(self, DEF):
>      def getDEF(self, DEF = None):
>      def DEF_changed(self, DEF = None):
>      def USE(self):
>      def USE(self, value = None):
>      def setUSE(self, USE = None):
>      def addUSE(self, USE = None):
>      def removeUSE(self, USE):
>      def getUSE(self, USE = None):
>      def USE_changed(self, USE = None):
>      def class_(self):
>      def class_(self, value = None):
>      def setClass(self, class_ = None):
>      def addClass(self, class_ = None):
>      def removeClass(self, class_):
>      def getClass(self, class_ = None):
>      def class_changed(self, class_ = None):
>      def comments(self):
>      def comments(self, value = None):
>      def setComments(self, comments = None):
>      def addComments(self, comments = None):
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190415/ddecde8d/attachment.html>


More information about the x3d-public mailing list