GeometryEditorPrefGroupUI.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. from flatcamGUI.preferences.OptionUI import *
  2. from flatcamGUI.preferences.OptionsGroupUI import OptionsGroupUI2
  3. import gettext
  4. import FlatCAMTranslation as fcTranslate
  5. import builtins
  6. fcTranslate.apply_language('strings')
  7. if '_' not in builtins.__dict__:
  8. _ = gettext.gettext
  9. class GeometryEditorPrefGroupUI(OptionsGroupUI2):
  10. def __init__(self, decimals=4, **kwargs):
  11. self.decimals = decimals
  12. super().__init__(**kwargs)
  13. self.setTitle(str(_("Geometry Editor")))
  14. def build_options(self) -> [OptionUI]:
  15. return [
  16. HeadingOptionUI(label_text="Parameters"),
  17. SpinnerOptionUI(
  18. option="geometry_editor_sel_limit",
  19. label_text="Selection limit",
  20. label_tooltip="Set the number of selected geometry\n"
  21. "items above which the utility geometry\n"
  22. "becomes just a selection rectangle.\n"
  23. "Increases the performance when moving a\n"
  24. "large number of geometric elements.",
  25. min_value=0, max_value=9999, step=1
  26. ),
  27. RadioSetOptionUI(
  28. option="geometry_editor_milling_type",
  29. label_text="Milling Type",
  30. label_tooltip="Milling type:\n"
  31. "- climb / best for precision milling and to reduce tool usage\n"
  32. "- conventional / useful when there is no backlash compensation",
  33. choices=[{'label': _('Climb'), 'value': 'cl'},
  34. {'label': _('Conventional'), 'value': 'cv'}]
  35. )
  36. ]