File tree Expand file tree Collapse file tree
lib/python/qtvcp/lib/gcode_utility Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,6 +224,14 @@ def validate(self):
224224 except :
225225 self .valid = False
226226
227+ try :
228+ angle = (180 / self .num_holes )
229+ chord_length = (2 * self .radius ) * math .sin (math .radians (angle ))
230+ self .label_chord_length .setText ('{:.3f}' .format (chord_length ))
231+ except Exception as e :
232+ print (e )
233+ self .label_chord_length .setText ('' )
234+
227235 try :
228236 self .first = float (self .lineEdit_first .text ())
229237 if self .first < 360.0 :
Original file line number Diff line number Diff line change 11891189 <property name =" alignment" >
11901190 <set >Qt::AlignCenter</set >
11911191 </property >
1192- <layout class =" QVBoxLayout" name =" layout_gb_preview" stretch =" 1,0" >
1192+ <layout class =" QVBoxLayout" name =" layout_gb_preview" stretch =" 1,0,0 " >
11931193 <property name =" spacing" >
11941194 <number >4</number >
11951195 </property >
12151215 </property >
12161216 </layout >
12171217 </item >
1218+ <item >
1219+ <layout class =" QHBoxLayout" name =" horizontalLayout_14" >
1220+ <item >
1221+ <widget class =" QLabel" name =" label_2" >
1222+ <property name =" text" >
1223+ <string >CHORD LENGTH</string >
1224+ </property >
1225+ </widget >
1226+ </item >
1227+ <item >
1228+ <widget class =" QLabel" name =" label_chord_length" >
1229+ <property name =" text" >
1230+ <string />
1231+ </property >
1232+ </widget >
1233+ </item >
1234+ </layout >
1235+ </item >
12181236 <item alignment =" Qt::AlignBottom" >
12191237 <widget class =" QWidget" name =" widget_macro" native =" true" >
12201238 <property name =" maximumSize" >
You can’t perform that action at this time.
0 commit comments