RoboDK Forum
创造e graphics by code- Printable Version

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+ - - -论坛:通用RoboDK问题(//www.sinclairbody.com/forum/Forum-General-questions-about-RoboDK)
+--- Thread: Create graphics by code (/Thread-Create-graphics-by-code)



创造e graphics by code-Londoneye-06-25-2016

Hello.

I would like to draw a line in the graphic view that moves with the robot tool. This is to simulate a Laser tracker that is following the robot movement.

Is it possible to get this feature by phyton script or other way in RoboDK?

Is there any plan on adding basic graphic creatilon like cubes, cilindres.....

Also I would like to know if it is possible to extend the GUI so that you can make you own toolbars, windows, etc, for dealing with your phyton scripts.

Thank you in advance


Jorge


RE: Create graphics by code-RoboDK-08-13-2016

Helo Jorge,


It is possible to add your own objects and place them where you want, including tool objects. You can also create object shapes and curves/lines with the API using the following Python methods:

RDK = Robolink() # establish connection to the simulator (it will open a new instance of RoboDK or use an existing one)
newobject1 = RDK.AddShape(triangle_points)
newobject2 = RDK.AddCurve(curve_points)

I recommend you to take a look at the Python API:
//www.sinclairbody.com/doc/PythonAPI/