qtvismach, a axis toolpath

More
2 years 7 months ago #295529 by MarkoPolo
Thanks a lot Aciera, this code example and xyzac-trt-gui.py simulation file helped me a lot.
Now it works the way I wanted.
 

Attachment not found



I would also like to achieve transparency.
After basing the axis, the cone is filled with color, without transparency.
Where would I use "BLEND"?

Please Log in to join the conversation.

More
2 years 7 months ago #295553 by cmorley
Replied by cmorley on topic qtvismach, a axis toolpath
blend is the code that I added to primitives.py

Please Log in to join the conversation.

More
2 years 7 months ago #295584 by MarkoPolo
I made a small modification to the code and now it works properly.
Code:
class Color(Collection):     def __init__(self, color, parts):         self.color = color         Collection.__init__(self, parts)     def apply(self):         GL.glPushAttrib(GL.GL_LIGHTING_BIT)         GL.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE, self.color)         GL.glEnable(GL.GL_BLEND)         GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA)     def unapply(self):         GL.glPopAttrib()         GL.glDisable(GL.GL_BLEND)
 

Attachment not found



I was hoping that the toolpath would be visible inside the solid, but this is not the case...


 

Please Log in to join the conversation.

More
2 years 7 months ago #295585 by Aciera
Replied by Aciera on topic qtvismach, a axis toolpath
Interesting, the tool seems to be cut off too.

Please Log in to join the conversation.

More
2 years 7 months ago #295588 by Aciera
Replied by Aciera on topic qtvismach, a axis toolpath
May have something to do with 'depth testing' as seen in this image where some of the background scene is not visible through the red tinted glass:

 

Attachment not found



The above image comes from this article which may be useful:
drennonowereve.blogspot.com/2022/03/how-...color-in-opengl.html

[edit]
Just noticed the spelling in the article is a tad strange.

Please Log in to join the conversation.

More
2 years 7 months ago #295594 by MarkoPolo
I just used this article today.

I positioned the two pieces for the test behind the workpiece and only the actual head and countertop are visible.
I don't know much about opengl, I guess it can be configured somehow...
 

Attachment not found

Please Log in to join the conversation.

More
2 years 7 months ago #295712 by cmorley
Replied by cmorley on topic qtvismach, a axis toolpath
Maybe the order of the parts can do it.
I see you can see the base and chuck through the material but not the column or other chuck.

probably there is a opengl command to directly set Zdepth but like you i know just enough to get it to mostly work :)

Please Log in to join the conversation.

More
2 years 7 months ago #295793 by MarkoPolo
I will leave the topic of transparency for later, I have an idea how to solve it differently.
Please tell me how to easily read the x and y movement values from the "setup/properties" tab? I need these values to automatically generate the dimensions of the workpiece in the A-axis holder.

The second problem is the disappearing tool path in qtvismach. The same thing happens as in the preview window in qtdragon. A longer toolpath history is needed, or it doesn't disappear at all.
 

Attachment not found

Please Log in to join the conversation.

More
2 years 7 months ago #295797 by cmorley
Replied by cmorley on topic qtvismach, a axis toolpath
You can get them from STATUS, as long as the preview window is in the same python context.
Meaning you would need to have the vismach window embedded in, or loaded from, qtdragon.
The normal qtvcp embedding should work, getting a separate window is custom work.

then:
STATUS.connect('graphics-gcode-properties', lambda w, d: self.update_gcode_properties(d))
would give you the raw information in the function update_gcode_properties().
You can see how it was done in qtdragon_handler.py, but something like this:
Code:
def update_gcode_properties(self,props):         print(props.get('x'))         print(props.get('y'))         print(props.get('z'))
 

Please Log in to join the conversation.

More
1 year 10 months ago #316134 by MarkoPolo
That's what you suggested, using STATUS.connect.. I can control the position of the A-axis tailstock.

After reloading the next file, the tailstock is positioned in the appropriate place depending on the dimension of the project in the X axis.

Another thing I want is to re-build the dimensions of the workpiece.

Qt_vismach can update the position of an already built object, but I can't do it to re-build a new workpiece.

I tried adding a new class in primitives.py, analogous to HalTranslate, but it doesn't work.

It would also be interesting to be able to change the colors of some elements, depending on the values ​​of different pins.

How to do it?

Please Log in to join the conversation.

Time to create page: 2.519 seconds
Powered by Kunena Forum