[x3d-public] Sample X3D Python API; examples published for continuing improvement
John Carlson
yottzumm at gmail.com
Tue Apr 16 08:20:02 PDT 2019
One idea is to edit reflect.py and remove getSuperclass call.
On Tue, Apr 16, 2019 at 10:08 AM John Carlson <yottzumm at gmail.com> wrote:
> I think what we must try to do is duplicate autoclass functionality
> without abstract classes. I suggest a separate version of X3DJSAIL????
> Any other suggestions? Please review/modify my generated code for any
> other suggestion?
>
> A prior suggestion was to add casting? Should we create a third
> serializer for this?
>
> John
> John
>
> On Mon, Apr 15, 2019 at 8:32 PM Brutzman, Donald (Don) (CIV) <
> brutzman at nps.edu> wrote:
>
>> OK thanks for feedback John.
>>
>> Sorry but no tossing in the towel yet, please! Not ready for a reset on
>> this end yet. Am optimistic that close scrutiny of your pyjnius code -
>> which has gotten so far - will continue to inform progress. We're not far
>> from an initial implementation. More study of python will help (at least
>> for me).
>>
>> ... and in any case, we now have a nice build harness to test and improve
>> language-binding progress against all available example scenes.
>>
>>
>> On 4/15/2019 12:19 PM, John Carlson wrote:
>> > 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 <mailto: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 <mailto: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
>> >
>>
>>
>> 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/20190416/734c58a7/attachment-0001.html>
More information about the x3d-public
mailing list