| | |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | """Provides GUI tools to create parametric Array objects. Grouping command.""" |
| | |
| | |
| | |
| |
|
| | |
| | |
| | from PySide.QtCore import QT_TRANSLATE_NOOP |
| |
|
| | import FreeCADGui as Gui |
| | from draftutils import gui_utils |
| |
|
| | import draftguitools.gui_circulararray |
| | import draftguitools.gui_orthoarray |
| | import draftguitools.gui_patharray |
| | import draftguitools.gui_pointarray |
| | import draftguitools.gui_polararray |
| | import draftguitools.gui_pathtwistedarray |
| |
|
| | |
| | bool(draftguitools.gui_circulararray.__name__) |
| | bool(draftguitools.gui_orthoarray.__name__) |
| | bool(draftguitools.gui_patharray.__name__) |
| | bool(draftguitools.gui_pointarray.__name__) |
| | bool(draftguitools.gui_polararray.__name__) |
| | bool(draftguitools.gui_pathtwistedarray.__name__) |
| |
|
| |
|
| | class ArrayGroup: |
| | """Gui command for the group of array tools.""" |
| |
|
| | def GetCommands(self): |
| | """Tuple of array commands.""" |
| | return ( |
| | "Draft_OrthoArray", |
| | "Draft_PolarArray", |
| | "Draft_CircularArray", |
| | "Draft_PathArray", |
| | "Draft_PathLinkArray", |
| | "Draft_PointArray", |
| | "Draft_PointLinkArray", |
| | "Draft_PathTwistedArray", |
| | "Draft_PathTwistedLinkArray", |
| | ) |
| |
|
| | def GetResources(self): |
| | """Set icon, menu and tooltip.""" |
| |
|
| | return { |
| | "Pixmap": "Draft_Array", |
| | "MenuText": QT_TRANSLATE_NOOP("Draft_ArrayTools", "Array Tools"), |
| | "ToolTip": QT_TRANSLATE_NOOP( |
| | "Draft_ArrayTools", |
| | "Tools to create various types of arrays, including rectangular, polar, circular, path, and point arrays", |
| | ), |
| | } |
| |
|
| | def IsActive(self): |
| | """Return True when this command should be available.""" |
| | return bool(gui_utils.get_3d_view()) |
| |
|
| |
|
| | Gui.addCommand("Draft_ArrayTools", ArrayGroup()) |
| |
|
| | |
| |
|