4 axis foam cutter configuration
21 Jul 2024 16:49 #305800
by stirra
4 axis foam cutter configuration was created by stirra
I have a rebuilt 4-axis foam cutter working with 2.9.3, but I would like to change how it is displayed in Axis. The default display is XY; UV, with the wire vertical. In reality, the axes are YZ; VW, with the wire horizontal. I have tried changing all occurrences of XYUV to YZVW in the axis_foam.ini simulation, which does not give any error messages, but no change is visible in the Axis preview. It still shows the UV plane above the XY plane with the wire between.
Any suggestions on how to achieve this?
Thanks,
-- Ralph
Any suggestions on how to achieve this?
Thanks,
-- Ralph
Please Log in or Create an account to join the conversation.
21 Jul 2024 18:55 #305805
by andypugh
Replied by andypugh on topic 4 axis foam cutter configuration
Don't try to fix this by shuffling the axes. Leave the system set up as XYUV.
As far as I can tell your issue is purely with the display on the screen?
Try editing glnav.py around line 444. (on a very slow connection on a train, can't check where the file is, but probably /usr/share/linuxcnc
The self.lat and self.lon numbers set the view in sperical coordinates. So set htese to alter the orientation of the default perspective view.
It's a Python file, so no need to recompile. Thogh you may need to restart linuxcnc.
As far as I can tell your issue is purely with the display on the screen?
Try editing glnav.py around line 444. (on a very slow connection on a train, can't check where the file is, but probably /usr/share/linuxcnc
The self.lat and self.lon numbers set the view in sperical coordinates. So set htese to alter the orientation of the default perspective view.
It's a Python file, so no need to recompile. Thogh you may need to restart linuxcnc.
The following user(s) said Thank You: my1987toyota
Please Log in or Create an account to join the conversation.
- my1987toyota
- Offline
- Platinum Member
Less
More
- Posts: 814
- Thank you received: 331
21 Jul 2024 20:22 - 21 Jul 2024 21:21 #305816
by my1987toyota
Replied by my1987toyota on topic 4 axis foam cutter configuration
I was wondering about this myself, so glad it was made a topic. Foam cutters seem to be seeing an increase
in interest. ( Me included ) I am also curious about it showing a 5th axis.
in interest. ( Me included ) I am also curious about it showing a 5th axis.
Last edit: 21 Jul 2024 21:21 by my1987toyota. Reason: adding info
Please Log in or Create an account to join the conversation.
21 Jul 2024 22:31 #305821
by stirra
Replied by stirra on topic 4 axis foam cutter configuration
Well, the file seems to be /usr/lib/python3/dist-packages/glnav.py , but I find my intuition for spherical coordinates is severely lacking. Setting the lat/lon to 0,0 gets the wire into the horizontal plane, but rotating it around in a desirable fashion is proving difficult. Is there a way to overload this set_view_p function somewhere downstream so I don't have to edit a python3 package, creating problems with future system software updates?
Thanks again.
-- Ralph
Thanks again.
-- Ralph
Please Log in or Create an account to join the conversation.
22 Jul 2024 01:10 #305823
by phillc54
Replied by phillc54 on topic 4 axis foam cutter configuration
You could create a
USER_COMMAND_FILE
in your config directory with a copy of the method from glnav.py like below. You do need to restart LinuxCNC to apply each change.
Warning: Spoiler!
def set_view_p():
o.reset()
o.perspective = True
mid, size = o.extents_info()
glTranslatef(-mid[0], -mid[1], -mid[2])
size = (size[0] ** 2 + size[1] ** 2 + size[2] ** 2) ** .5
if size > 1e99: size = 5. # in case there are no moves in the preview
w = o.winfo_width()
h = o.winfo_height()
fovx = o.fovy if h == 0 else o.fovy * w / h
fov = min(fovx, o.fovy)
o.set_eyepoint((size * 1.1 + 1.0) / 2 / math.sin ( fov * math.pi / 180 / 2))
o.lat = -60
o.lon = 335
glRotateScene(o, 1.0, mid[0], mid[1], mid[2], 0, 0, 0, 0)
o._redraw()
o.set_view_p = set_view_p
o.set_view_p()
The following user(s) said Thank You: stirra, my1987toyota
Please Log in or Create an account to join the conversation.
22 Jul 2024 03:59 #305828
by stirra
Replied by stirra on topic 4 axis foam cutter configuration
That was very helpful.
I still am having trouble coming up with lat and lon values that show the X/U and Y/V planes as vertical. It seems to me that changing the viewpoint through the lat and lon values never gets to such an orientation. Lat = -45 and lon = 0 almost looks like vertical X/U and Y/V planes, but I think it is an optical illusion.
I still am having trouble coming up with lat and lon values that show the X/U and Y/V planes as vertical. It seems to me that changing the viewpoint through the lat and lon values never gets to such an orientation. Lat = -45 and lon = 0 almost looks like vertical X/U and Y/V planes, but I think it is an optical illusion.
Please Log in or Create an account to join the conversation.
Time to create page: 0.129 seconds