- Posts: 7368
- Thank you received: 2181
qtvismach, a axis toolpath
- cmorley
- Offline
- Moderator
-
Less
More
2 years 7 months ago #295486
by cmorley
Replied by cmorley on topic qtvismach, a axis toolpath
Could be an opengui issue - all linuxcnc's opengl code uses ancient code libraries.
try this - it sets everything half alpha:
If it doesn't work then I would guess openGl problem.
Tk doesn't support alpha color either (it's why the qt version didn't)
try this - it sets everything half alpha:
Code:
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)
The following user(s) said Thank You: MarkoPolo
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
-
Less
More
- Posts: 4819
- Thank you received: 2177
2 years 7 months ago #295494
by Aciera
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'
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)
Replied by Aciera on topic qtvismach, a axis toolpath
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'
Code:
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.
- MarkoPolo
- Offline
- Elite Member
-
Less
More
- Posts: 319
- Thank you received: 90
2 years 7 months ago - 2 years 7 months ago #295495
by MarkoPolo
Replied by MarkoPolo on topic qtvismach, a axis toolpath
it doesn't work with this code either. I've also tried entering a static value there before, but why does it work for you?
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
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
Last edit: 2 years 7 months ago by MarkoPolo.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
-
Less
More
- Posts: 4819
- Thank you received: 2177
2 years 7 months ago #295497
by Aciera
Replied by Aciera on topic qtvismach, a axis toolpath
As for open glTransparency:
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:
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:
The following user(s) said Thank You: MarkoPolo
Please Log in or Create an account to join the conversation.
- MarkoPolo
- Offline
- Elite Member
-
Less
More
- Posts: 319
- Thank you received: 90
2 years 7 months ago #295529
by MarkoPolo
Replied by MarkoPolo on topic qtvismach, a axis toolpath
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
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 or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 3.359 seconds