@@ -42,6 +42,7 @@ import Draft_rc
|
||||
from draftguitools import gui_base_original
|
||||
from draftguitools import gui_tool_utils
|
||||
from draftmake import make_fillet
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
from draftutils.messages import _err, _toolmsg
|
||||
from draftutils.translate import translate
|
||||
@@ -73,9 +74,9 @@ class Fillet(gui_base_original.Creator):
|
||||
super().Activated(name=name)
|
||||
|
||||
if self.ui:
|
||||
self.rad = 100
|
||||
self.chamfer = False
|
||||
self.delete = False
|
||||
self.rad = params.get_param("FilletRadius")
|
||||
self.chamfer = params.get_param("FilletChamferMode")
|
||||
self.delete = params.get_param("FilletDeleteMode")
|
||||
label = translate("draft", "Fillet radius")
|
||||
tooltip = translate("draft", "Radius of fillet")
|
||||
|
||||
@@ -127,10 +128,12 @@ class Fillet(gui_base_original.Creator):
|
||||
def set_delete(self):
|
||||
"""Execute as a callback when the delete checkbox changes."""
|
||||
self.delete = self.ui.check_delete.isChecked()
|
||||
params.set_param("FilletDeleteMode", self.delete)
|
||||
|
||||
def set_chamfer(self):
|
||||
"""Execute as a callback when the chamfer checkbox changes."""
|
||||
self.chamfer = self.ui.check_chamfer.isChecked()
|
||||
params.set_param("FilletChamferMode", self.chamfer)
|
||||
|
||||
def numericRadius(self, rad):
|
||||
"""Validate the entry radius in the user interface.
|
||||
@@ -139,6 +142,7 @@ class Fillet(gui_base_original.Creator):
|
||||
when a valid radius has been entered in the input field.
|
||||
"""
|
||||
self.rad = rad
|
||||
params.set_param("FilletRadius", self.rad)
|
||||
self.draw_arc(rad, self.chamfer, self.delete)
|
||||
|
||||
def draw_arc(self, rad, chamfer, delete):
|
||||
|
||||
@@ -390,6 +390,9 @@ def _get_param_dictionary():
|
||||
"DefaultPrintColor": ("unsigned", 255),
|
||||
"Draft_array_fuse": ("bool", False),
|
||||
"Draft_array_Link": ("bool", True),
|
||||
"FilletRadius": ("float", 100.0),
|
||||
"FilletChamferMode": ("bool", False),
|
||||
"FilletDeleteMode": ("bool", False),
|
||||
"fillmode": ("bool", True),
|
||||
"GlobalMode": ("bool", False),
|
||||
"GridHideInOtherWorkbenches": ("bool", True),
|
||||
|
||||
Reference in New Issue
Block a user