In the last push I noticed the pythonengine integration embryo in glscene.
Really interesting.
What are the desired goals with this technology?
Currently I already use, in some way, python scripts, with GLScene to "manage" some 3D objects that are not directly affected by the machine kinematics.
To date, I do this using a script launched by a separate process that communicates via TCP packets with the process in which GLScene runs.
Digital inputs are read in Python script, then Python script send new colors and position to GLScene objects to go UP/DOWN and color them.
Just a test for a possibile customer script.
I look forward to the developments of the python engine integration :)
Best Regards
Silverio
Last edit: shine world 2022-02-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Salute Silverio,
The goals are to use Python scripts the same as DWS and also more to get access to many other pylibs for GLScene. You know that Python now has the first position at Tiobe. There are components https://github.com/pyscripter/python4delphi and controls https://github.com/Embarcadero/DelphiVCL4Python and https://github.com/Embarcadero/DelphiFMX4Python now but our GLS's python engine integration should be upgraded with the above tools improvements. Alas, I don't have concern and time to continue development and further intergation, so all hopes to you.
It would be useful to prepare a pare of examples with like on your video to add in our scripts demos.
PW
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I will do something in next weeks.
At first I've added to my GLScene using program a server tcp to manage request/response in JSON format so an external python program can ask for graphics objects by name and then change proprerties (xyz placement, color, rotation, etc) and backing changes to server it change properties of GLScene objects.
It a simple try to use pyhton script to manage GLScene object.
I've tried also to execute a python code directly on GLScene project and works.
In other words with the program I create the scene tree with objects where any object has a string UID, then the script can change GLScene properties addressing it with an UID.
The only limit is that script start and end for any update timer so I need to run it in a loop on a thread so is persistant and can maintain its variable values.
My goal is:
Create a GLScene env which represent a CNC Machine (axes, motors, base, tool loaders, doors, etc).
Main program manages core movements of kinematics linked axes, etc
Extra objects as like as doors, covers, etc are managed by end-customer with a textual script so the entire virtual machine of CNC can be automatized and personalized.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
shine world,
Well, if you wish ...to add to GLScene using program a server tcp to manage request/response in JSON format... then take in account that there is https://sourceforge.net/p/glscene/code/HEAD/tree/trunk/Source/PasJSON.pas and glTF by Benjamin Rosseaux (benjamin@rosseaux.de), he is in the list of developers of GLScene, but with zlib licence instead of our Mozilla. I don't know if they could be compatible together in your very interesting project, so try to contact him by email or at github if it's necessary not to rely on standard embarcadero 11 tools.
Pavel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the last push I noticed the pythonengine integration embryo in glscene.
Really interesting.
What are the desired goals with this technology?
Currently I already use, in some way, python scripts, with GLScene to "manage" some 3D objects that are not directly affected by the machine kinematics.
To date, I do this using a script launched by a separate process that communicates via TCP packets with the process in which GLScene runs.
It would be interesting to integrate the scripts directly into the process with GLScene.
Current example: https://www.youtube.com/watch?v=FNkpN1eCgdI
Digital inputs are read in Python script, then Python script send new colors and position to GLScene objects to go UP/DOWN and color them.
Just a test for a possibile customer script.
I look forward to the developments of the python engine integration :)
Best Regards
Silverio
Last edit: shine world 2022-02-22
Salute Silverio,
The goals are to use Python scripts the same as DWS and also more to get access to many other pylibs for GLScene. You know that Python now has the first position at Tiobe. There are components https://github.com/pyscripter/python4delphi and controls https://github.com/Embarcadero/DelphiVCL4Python and https://github.com/Embarcadero/DelphiFMX4Python now but our GLS's python engine integration should be upgraded with the above tools improvements. Alas, I don't have concern and time to continue development and further intergation, so all hopes to you.
It would be useful to prepare a pare of examples with like on your video to add in our scripts demos.
PW
I will do something in next weeks.
At first I've added to my GLScene using program a server tcp to manage request/response in JSON format so an external python program can ask for graphics objects by name and then change proprerties (xyz placement, color, rotation, etc) and backing changes to server it change properties of GLScene objects.
It a simple try to use pyhton script to manage GLScene object.
I've tried also to execute a python code directly on GLScene project and works.
In other words with the program I create the scene tree with objects where any object has a string UID, then the script can change GLScene properties addressing it with an UID.
The only limit is that script start and end for any update timer so I need to run it in a loop on a thread so is persistant and can maintain its variable values.
My goal is:
shine world,
Well, if you wish ...to add to GLScene using program a server tcp to manage request/response in JSON format... then take in account that there is
https://sourceforge.net/p/glscene/code/HEAD/tree/trunk/Source/PasJSON.pas and glTF by Benjamin Rosseaux (benjamin@rosseaux.de), he is in the list of developers of GLScene, but with zlib licence instead of our Mozilla. I don't know if they could be compatible together in your very interesting project, so try to contact him by email or at github if it's necessary not to rely on standard embarcadero 11 tools.
Pavel