Adding simple graphics objects to GladeVCP?

More
7 years 4 months ago #136054 by RetrofitTools
Replied by RetrofitTools on topic Adding simple graphics objects to GladeVCP?
Chris
I don't think the toolpath viewer would be particularly useful in this application.

Envision if you will a display showing a box full of cans. Each can's position would be either an outline circle (location defined but not used) or a filled circle (location filled).

This is not the actual application, but it gives you the idea. My thought is that use of G-code would be completely obscured, and the user would only have UI controls with X & Y dimensions, number of items to place, etc.

Further input appreciated!

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #136055 by RetrofitTools
Replied by RetrofitTools on topic Adding simple graphics objects to GladeVCP?
Andy
That's pretty elegant and impressive. I wish it were possible to dynamically generate a 3D graphic like that, but it's probably beyond my pay grade :)

Basically I want to do the same thing you are... set some parameters via the gui and the operations take place with no worries about G-code.

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #136056 by andypugh
Replied by andypugh on topic Adding simple graphics objects to GladeVCP?

RetrofitTools wrote: I wish it were possible to dynamically generate a 3D graphic like that, but it's probably beyond my pay grade.


It very much is possible, but might not be considered trivial.

Generating SVG is pretty easy, it's a human-legible format. However you probably wouldn't do that for a GUI, you would use Cairo (maybe OpenGL) or similar.

The Wikipedia page on Cairo has a fairly illustrative example:
en.wikipedia.org/wiki/Cairo_(graphics)

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #136157 by cmorley
Replied by cmorley on topic Adding simple graphics objects to GladeVCP?

RetrofitTools wrote: Chris
I don't think the toolpath viewer would be particularly useful in this application.

Envision if you will a display showing a box full of cans. Each can's position would be either an outline circle (location defined but not used) or a filled circle (location filled).

This is not the actual application, but it gives you the idea. My thought is that use of G-code would be completely obscured, and the user would only have UI controls with X & Y dimensions, number of items to place, etc.

Further input appreciated!


That sounds a lot like an LED - a two state, custom drawn object.
If you want to be able to 'click it' that can be done too.
put a 'box' type static back ground and it sounds similar to your example idea.

rewriting the LED widget to draw something else would be a relatively easy project.
Depends on what you you wish to draw and how detailed.

As Andy says SVG is another way to display different static images.
Would work fine if there isn't a lot of different objects.

Chris M

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #136483 by andypugh
Replied by andypugh on topic Adding simple graphics objects to GladeVCP?

cmorley wrote: [As Andy says SVG is another way to display different static images.
Would work fine if there isn't a lot of different objects.


It''s worth noting that SVG supports layers, and you can turn layers on and off in Python, so a single SVG file can be quite a responsive graphic.
Code:
self.svg.render_cairo(cr = cr, id = '#layer%i' % tab_num)
is the magic incantation I used.

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago #136721 by RetrofitTools
Replied by RetrofitTools on topic Adding simple graphics objects to GladeVCP?
Unfortunately, each run could have a completely different configuration. I'm not sure how I could effective generate an svg for each. That seems like more of a task than I want to handle!

Thanks... good to know about the layers in svg.

Please Log in or Create an account to join the conversation.

Moderators: HansU
Time to create page: 0.150 seconds
Powered by Kunena Forum