- Posts: 319
- Thank you received: 90
Error in tool_offsetview.py
- MarkoPolo
- Offline
- Elite Member
-
Less
More
3 years 2 months ago #278312
by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
I made the button icons of the remaining letters, see if it can be like that or change something.
Please Log in or Create an account to join the conversation.
- MarkoPolo
- Offline
- Elite Member
-
Less
More
- Posts: 319
- Thank you received: 90
3 years 2 months ago #278403
by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
Some more tweaks to the 4th and 5th axis buttons.
Please Log in or Create an account to join the conversation.
- MarkoPolo
- Offline
- Elite Member
-
Less
More
- Posts: 319
- Thank you received: 90
3 years 2 months ago #278496
by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
I like hole_enlarge.py a lot, but I found two problems.
1. In my system, I can't type a period and if I type a comma it lights up red as an error. The problem is with the validator. We've dealt with this before. After using the regular expression based validator, everything is ok. I corrected these lines and it works fine.
# self.lineEdit_tool.setValidator(QtGui.QIntValidator(0, 19999))
# self.lineEdit_spindle.setValidator(QtGui.QIntValidator(0, 99999))
# self.lineEdit_feed.setValidator(QtGui.QIntValidator(0, 9999))
# self.lineEdit_tool_dia.setValidator(QtGui.QDoubleValidator(0, 99.9, 4))
# self.lineEdit_start_dia.setValidator(QtGui.QDoubleValidator(0.0, 999.9, 4))
# self.lineEdit_final_dia.setValidator(QtGui.QDoubleValidator(0.0, 999.9, 4))
# self.lineEdit_loops.setValidator(QtGui.QIntValidator(0, 99))
# self.lineEdit_cut_depth.setValidator(QtGui.QDoubleValidator(0.0, 99.9, 4))
# self.lineEdit_z_safe.setValidator(QtGui.QDoubleValidator(0.0, 999.9, 4))
self.lineEdit_tool.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,5}')))
self.lineEdit_spindle.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,5}')))
self.lineEdit_feed.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,4}')))
self.lineEdit_tool_dia.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,3}[.][0-9]{0,4}')))
self.lineEdit_start_dia.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,5}[.][0-9]{0,4}')))
self.lineEdit_final_dia.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,5}[.][0-9]{0,4}')))
self.lineEdit_loops.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,2}')))
self.lineEdit_cut_depth.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,4}[.][0-9]{0,4}')))
self.lineEdit_z_safe.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,4}')))
2. The second problem is that if I enter the "start diameter" value smaller than the "tool" value, then the last pass is in the wrong place, as in the screenshot.
If the values are equal, that's also a problem, but a little different.
It would be good to make a security that only an entry greater than the value of "tool" is allowed
1. In my system, I can't type a period and if I type a comma it lights up red as an error. The problem is with the validator. We've dealt with this before. After using the regular expression based validator, everything is ok. I corrected these lines and it works fine.
# self.lineEdit_tool.setValidator(QtGui.QIntValidator(0, 19999))
# self.lineEdit_spindle.setValidator(QtGui.QIntValidator(0, 99999))
# self.lineEdit_feed.setValidator(QtGui.QIntValidator(0, 9999))
# self.lineEdit_tool_dia.setValidator(QtGui.QDoubleValidator(0, 99.9, 4))
# self.lineEdit_start_dia.setValidator(QtGui.QDoubleValidator(0.0, 999.9, 4))
# self.lineEdit_final_dia.setValidator(QtGui.QDoubleValidator(0.0, 999.9, 4))
# self.lineEdit_loops.setValidator(QtGui.QIntValidator(0, 99))
# self.lineEdit_cut_depth.setValidator(QtGui.QDoubleValidator(0.0, 99.9, 4))
# self.lineEdit_z_safe.setValidator(QtGui.QDoubleValidator(0.0, 999.9, 4))
self.lineEdit_tool.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,5}')))
self.lineEdit_spindle.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,5}')))
self.lineEdit_feed.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,4}')))
self.lineEdit_tool_dia.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,3}[.][0-9]{0,4}')))
self.lineEdit_start_dia.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,5}[.][0-9]{0,4}')))
self.lineEdit_final_dia.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,5}[.][0-9]{0,4}')))
self.lineEdit_loops.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,2}')))
self.lineEdit_cut_depth.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,4}[.][0-9]{0,4}')))
self.lineEdit_z_safe.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp('[0-9]{0,4}')))
2. The second problem is that if I enter the "start diameter" value smaller than the "tool" value, then the last pass is in the wrong place, as in the screenshot.
If the values are equal, that's also a problem, but a little different.
It would be good to make a security that only an entry greater than the value of "tool" is allowed
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
3 years 2 months ago #278504
by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
Thank you for quick feedback - Jim made the utility for me - he is very good at them!
I pushed a start diameter check and the QValidator changes you posted.
Chris
I pushed a start diameter check and the QValidator changes you posted.
Chris
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
3 years 2 months ago #278506
by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
Great, I tested it quickly and it works fine.
Just one more really small thing before I go to sleep.
In the "facing" tool, program startup almost always starts in imperial units, as shown in the picture.
The bolt hole circle tool does not have this problem. You would have to make "facing" run in the units in which the machine is, because you can make a mistake with the dimensions..
(or that only the right button is active, but I don't know if that's a good idea)
Just one more really small thing before I go to sleep.
In the "facing" tool, program startup almost always starts in imperial units, as shown in the picture.
The bolt hole circle tool does not have this problem. You would have to make "facing" run in the units in which the machine is, because you can make a mistake with the dimensions..
(or that only the right button is active, but I don't know if that's a good idea)
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
3 years 2 months ago #278525
by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
Try replacing the original facing program with this one.
Ultimately maybe the utilities should all just follow the current g20/g21 for consistency?
Ultimately maybe the utilities should all just follow the current g20/g21 for consistency?
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.356 seconds