qtvismach, a axis toolpath
Does anyone have a qtvismach file with a similar configuration as an example that would help me configure it properly?
The second problem is the transparency of the solid.
e.g. "solid = Color([1, 0.6, 0.6, 0.5],[solid])" I think the third parameter 0.5 should be the color opacity or transparency value, but it doesn't work.
Is it possible to make semi-transparent objects in qtvismach?
Marek
Attachments:
Please Log in or Create an account to join the conversation.
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)
if self.color[3] < 1:
GL.glEnable(GL.GL_BLEND)
GL.glBlendColor(0, 0, 0, self.color[3]) # rgba
def unapply(self):
GL.glPopAttrib()
GL.glDisable(GL.GL_BLEND)
The the alpha setting is honoured.
Does mill turn not help with the A axis?
Please Log in or Create an account to join the conversation.
If you mean the tool path to be drawn wrapped around a zylinder, this is currently not possible. All the logger, that is used to draw the toolpath history, does is collect collect coordinate values. It has no concept of a rotational center at all.I would like the entire tool path to rotate around the A axis, which would result in drawing a milled solid.
Does anyone have a qtvismach file with a similar configuration as an example that would help me configure it properly?
Please Log in or Create an account to join the conversation.
As for the tool trace, the lathe configuration does not change anything either.
In this video you can see that the tool path rotates around the C axis, so I think it can be done.
Please Log in or Create an account to join the conversation.
that does seem back wards so you could change the code a bit to do the opposite.:
if self.color[3] < 1:
GL.glEnable(GL.GL_BLEND)
GL.glBlendColor(0, 0, 0, 1 - self.color[3]) # rgba
You can see the A axis spindle is see through.
Attachments:
Please Log in or Create an account to join the conversation.
I check on two virtual machines and one real machine, but it doesn't work on either of them.
This is not a fourth value problem, because I have different values entered in different objects.
In the /usr/bin/millturngui simulation I also changed the fourth value, with no effect.
I don't know what the problem could be
edition
Yes, /usr/bin/millturngui is in TK, but qtvcp vismach_millturn doesn't work either
Please Log in or Create an account to join the conversation.
try this - it sets everything half alpha:
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.glBlendColor(0, 0, 0, .5) # rgba
Tk doesn't support alpha color either (it's why the qt version didn't)
Please Log in or Create an account to join the conversation.
Yes, I thought you wanted a straight line to wrap around a cylinder (ie a synchronized AX move to be shown as a helix).In this video you can see that the tool path rotates around the C axis, so I think it can be done.
What you want is quite standard, you just need to attach 'work' to your rotary table.
This is an example from '/src/hal/user_comps/vismach/xyzac-trt-gui.py'
work = Capture()
ctable = Collection([
work,
CylinderZ(-18, 50, 0, 50),
# cross
Color([1,1,1,0], [CylinderX(-50,1,50,1)]),
Color([1,1,1,0], [CylinderY(-50,1,50,1)]),
# lump on one side
Color([1,1,1,0], [Box(42, -4, -20, 51, 4, 5)])
])
ctable = HalRotate([ctable],c,"rotate-c",1,0,0,1)
Examples can be found in all the vismach models with work side rotation (eg xyzac-trt-gui.py, xyzbc-trt-gui-py, xyzab-tdr-gui-py)
Please Log in or Create an account to join the conversation.
I tried on different systems, without success.
edition
I just noticed the reply.
Thanks Aciera for the code, I will try to use it.
I'll let you know if it works
Please Log in or Create an account to join the conversation.
As cmorley said, the alpha channel is broken and you have to use 'BLEND' and affiliated functions. I find it terribly confusing and I usually end having it where I did not want it.
To check if it works on your system you could just start the 'axis' simulation config and home the machine, Then look at the tool cone (which should be transparent):
I know it's not in vismach or qt but it's all opengl in the background:
Attachments:
Please Log in or Create an account to join the conversation.