Commit 0544c30d authored by sumpfralle's avatar sumpfralle

added categories to all plugins


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1160 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent dcfc6c0f
...@@ -33,6 +33,7 @@ class Bounds(pycam.Plugins.ListPluginBase): ...@@ -33,6 +33,7 @@ class Bounds(pycam.Plugins.ListPluginBase):
UI_FILE = "bounds.ui" UI_FILE = "bounds.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Bounds"]
COLUMN_REF, COLUMN_NAME = range(2) COLUMN_REF, COLUMN_NAME = range(2)
LIST_ATTRIBUTE_MAP = {"ref": COLUMN_REF, "name": COLUMN_NAME} LIST_ATTRIBUTE_MAP = {"ref": COLUMN_REF, "name": COLUMN_NAME}
......
...@@ -40,6 +40,7 @@ class Clipboard(pycam.Plugins.PluginBase): ...@@ -40,6 +40,7 @@ class Clipboard(pycam.Plugins.PluginBase):
UI_FILE = "clipboard.ui" UI_FILE = "clipboard.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["System"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -36,6 +36,7 @@ class Fonts(pycam.Plugins.PluginBase): ...@@ -36,6 +36,7 @@ class Fonts(pycam.Plugins.PluginBase):
UI_FILE = "fonts.ui" UI_FILE = "fonts.ui"
DEPENDS = ["Clipboard"] DEPENDS = ["Clipboard"]
CATEGORIES = ["Fonts"]
def setup(self): def setup(self):
self._fonts_cache = pycam.Utils.FontCache.FontCache(get_font_dir(), self._fonts_cache = pycam.Utils.FontCache.FontCache(get_font_dir(),
......
...@@ -31,6 +31,7 @@ class Log(pycam.Plugins.PluginBase): ...@@ -31,6 +31,7 @@ class Log(pycam.Plugins.PluginBase):
UI_FILE = "log.ui" UI_FILE = "log.ui"
DEPENDS = ["Clipboard"] DEPENDS = ["Clipboard"]
CATEGORIES = ["System"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -38,6 +38,7 @@ class ModelExtrusion(pycam.Plugins.PluginBase): ...@@ -38,6 +38,7 @@ class ModelExtrusion(pycam.Plugins.PluginBase):
UI_FILE = "model_extrusion.ui" UI_FILE = "model_extrusion.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Model"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -28,6 +28,7 @@ class ModelPlaneMirror(pycam.Plugins.PluginBase): ...@@ -28,6 +28,7 @@ class ModelPlaneMirror(pycam.Plugins.PluginBase):
UI_FILE = "model_plane_mirror.ui" UI_FILE = "model_plane_mirror.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Model"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -28,6 +28,7 @@ class ModelPolygons(pycam.Plugins.PluginBase): ...@@ -28,6 +28,7 @@ class ModelPolygons(pycam.Plugins.PluginBase):
UI_FILE = "model_polygons.ui" UI_FILE = "model_polygons.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Model"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -28,6 +28,7 @@ class ModelPosition(pycam.Plugins.PluginBase): ...@@ -28,6 +28,7 @@ class ModelPosition(pycam.Plugins.PluginBase):
UI_FILE = "model_position.ui" UI_FILE = "model_position.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Model"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -30,6 +30,7 @@ class ModelProjection(pycam.Plugins.PluginBase): ...@@ -30,6 +30,7 @@ class ModelProjection(pycam.Plugins.PluginBase):
UI_FILE = "model_projection.ui" UI_FILE = "model_projection.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Model"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -29,6 +29,7 @@ class ModelRotation(pycam.Plugins.PluginBase): ...@@ -29,6 +29,7 @@ class ModelRotation(pycam.Plugins.PluginBase):
UI_FILE = "model_rotation.ui" UI_FILE = "model_rotation.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Model"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -28,6 +28,7 @@ class ModelScaling(pycam.Plugins.PluginBase): ...@@ -28,6 +28,7 @@ class ModelScaling(pycam.Plugins.PluginBase):
UI_FILE = "model_scaling.ui" UI_FILE = "model_scaling.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Model"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -28,6 +28,7 @@ class ModelSupport(pycam.Plugins.PluginBase): ...@@ -28,6 +28,7 @@ class ModelSupport(pycam.Plugins.PluginBase):
UI_FILE = "model_support.ui" UI_FILE = "model_support.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Model", "Support bridges"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -28,6 +28,7 @@ class ModelSupportDistributed(pycam.Plugins.PluginBase): ...@@ -28,6 +28,7 @@ class ModelSupportDistributed(pycam.Plugins.PluginBase):
UI_FILE = "model_support_distributed.ui" UI_FILE = "model_support_distributed.ui"
DEPENDS = ["Models", "ModelSupport"] DEPENDS = ["Models", "ModelSupport"]
CATEGORIES = ["Model", "Support bridges"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -30,6 +30,7 @@ class ModelSupportGrid(pycam.Plugins.PluginBase): ...@@ -30,6 +30,7 @@ class ModelSupportGrid(pycam.Plugins.PluginBase):
UI_FILE = "model_support_grid.ui" UI_FILE = "model_support_grid.ui"
DEPENDS = ["Models", "ModelSupport"] DEPENDS = ["Models", "ModelSupport"]
CATEGORIES = ["Model", "Support bridges"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -28,6 +28,7 @@ class ModelSwapAxes(pycam.Plugins.PluginBase): ...@@ -28,6 +28,7 @@ class ModelSwapAxes(pycam.Plugins.PluginBase):
UI_FILE = "model_swap_axes.ui" UI_FILE = "model_swap_axes.ui"
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Model"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -31,6 +31,7 @@ _GTK_COLOR_MAX = 65535.0 ...@@ -31,6 +31,7 @@ _GTK_COLOR_MAX = 65535.0
class Models(pycam.Plugins.ListPluginBase): class Models(pycam.Plugins.ListPluginBase):
UI_FILE = "models.ui" UI_FILE = "models.ui"
CATEGORIES = ["Model"]
COLUMN_REF, COLUMN_NAME, COLUMN_VISIBLE, COLUMN_COLOR, COLUMN_ALPHA = range(5) COLUMN_REF, COLUMN_NAME, COLUMN_VISIBLE, COLUMN_COLOR, COLUMN_ALPHA = range(5)
LIST_ATTRIBUTE_MAP = {"name": COLUMN_NAME, "visible": COLUMN_VISIBLE, LIST_ATTRIBUTE_MAP = {"name": COLUMN_NAME, "visible": COLUMN_VISIBLE,
"color": COLUMN_COLOR, "alpha": COLUMN_ALPHA} "color": COLUMN_COLOR, "alpha": COLUMN_ALPHA}
......
...@@ -27,6 +27,7 @@ from pycam.Geometry.utils import number ...@@ -27,6 +27,7 @@ from pycam.Geometry.utils import number
class OpenGLViewAxes(pycam.Plugins.PluginBase): class OpenGLViewAxes(pycam.Plugins.PluginBase):
DEPENDS = ["OpenGLWindow"] DEPENDS = ["OpenGLWindow"]
CATEGORIES = ["Visualization", "OpenGL"]
def setup(self): def setup(self):
import OpenGL.GL import OpenGL.GL
......
...@@ -26,6 +26,7 @@ import pycam.Plugins ...@@ -26,6 +26,7 @@ import pycam.Plugins
class OpenGLViewBounds(pycam.Plugins.PluginBase): class OpenGLViewBounds(pycam.Plugins.PluginBase):
DEPENDS = ["OpenGLWindow", "Bounds"] DEPENDS = ["OpenGLWindow", "Bounds"]
CATEGORIES = ["Bounds", "Visualization", "OpenGL"]
def setup(self): def setup(self):
import OpenGL.GL import OpenGL.GL
......
...@@ -30,6 +30,7 @@ GTK_COLOR_MAX = 65535.0 ...@@ -30,6 +30,7 @@ GTK_COLOR_MAX = 65535.0
class OpenGLViewModel(pycam.Plugins.PluginBase): class OpenGLViewModel(pycam.Plugins.PluginBase):
DEPENDS = ["OpenGLWindow", "Models"] DEPENDS = ["OpenGLWindow", "Models"]
CATEGORIES = ["Model", "Visualization", "OpenGL"]
def setup(self): def setup(self):
import gtk import gtk
...@@ -96,6 +97,7 @@ class OpenGLViewModel(pycam.Plugins.PluginBase): ...@@ -96,6 +97,7 @@ class OpenGLViewModel(pycam.Plugins.PluginBase):
class OpenGLViewModelTriangle(pycam.Plugins.PluginBase): class OpenGLViewModelTriangle(pycam.Plugins.PluginBase):
DEPENDS = ["OpenGLViewModel"] DEPENDS = ["OpenGLViewModel"]
CATEGORIES = ["Model", "Visualization", "OpenGL"]
def setup(self): def setup(self):
import OpenGL.GL import OpenGL.GL
...@@ -150,6 +152,7 @@ class OpenGLViewModelTriangle(pycam.Plugins.PluginBase): ...@@ -150,6 +152,7 @@ class OpenGLViewModelTriangle(pycam.Plugins.PluginBase):
class OpenGLViewModelGeneric(pycam.Plugins.PluginBase): class OpenGLViewModelGeneric(pycam.Plugins.PluginBase):
DEPENDS = ["OpenGLViewModel"] DEPENDS = ["OpenGLViewModel"]
CATEGORIES = ["Model", "Visualization", "OpenGL"]
def setup(self): def setup(self):
self.core.register_chain("draw_models", self.draw_generic_model, 100) self.core.register_chain("draw_models", self.draw_generic_model, 100)
......
...@@ -26,6 +26,7 @@ import pycam.Plugins ...@@ -26,6 +26,7 @@ import pycam.Plugins
class OpenGLViewToolpath(pycam.Plugins.PluginBase): class OpenGLViewToolpath(pycam.Plugins.PluginBase):
DEPENDS = ["OpenGLWindow", "Toolpaths"] DEPENDS = ["OpenGLWindow", "Toolpaths"]
CATEGORIES = ["Toolpath", "Visualization", "OpenGL"]
def setup(self): def setup(self):
import OpenGL.GL import OpenGL.GL
......
...@@ -73,6 +73,7 @@ class OpenGLWindow(pycam.Plugins.PluginBase): ...@@ -73,6 +73,7 @@ class OpenGLWindow(pycam.Plugins.PluginBase):
UI_FILE = "opengl.ui" UI_FILE = "opengl.ui"
# TODO: drop the dependecy on "Models" as soon as the calls for get("models") are gone # TODO: drop the dependecy on "Models" as soon as the calls for get("models") are gone
DEPENDS = ["Models"] DEPENDS = ["Models"]
CATEGORIES = ["Visualization", "OpenGL"]
def setup(self): def setup(self):
if not GL_ENABLED: if not GL_ENABLED:
......
...@@ -31,6 +31,7 @@ import pycam.Plugins ...@@ -31,6 +31,7 @@ import pycam.Plugins
class ParallelProcessing(pycam.Plugins.PluginBase): class ParallelProcessing(pycam.Plugins.PluginBase):
UI_FILE = "parallel_processing.ui" UI_FILE = "parallel_processing.ui"
CATEGORIES = ["System"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -26,6 +26,8 @@ import pycam.Plugins ...@@ -26,6 +26,8 @@ import pycam.Plugins
class ParameterGroupManager(pycam.Plugins.PluginBase): class ParameterGroupManager(pycam.Plugins.PluginBase):
CATEGORIES = ["Plugins"]
def setup(self): def setup(self):
self._groups = {} self._groups = {}
self.core.set("get_parameters", self.get_parameters) self.core.set("get_parameters", self.get_parameters)
......
...@@ -29,6 +29,7 @@ import pycam.Toolpath.MotionGrid ...@@ -29,6 +29,7 @@ import pycam.Toolpath.MotionGrid
class PathParamOverlap(pycam.Plugins.PluginBase): class PathParamOverlap(pycam.Plugins.PluginBase):
DEPENDS = ["Processes"] DEPENDS = ["Processes"]
CATEGORIES = ["Process", "Parameter"]
def setup(self): def setup(self):
# configure the input/output converter # configure the input/output converter
...@@ -50,6 +51,7 @@ class PathParamOverlap(pycam.Plugins.PluginBase): ...@@ -50,6 +51,7 @@ class PathParamOverlap(pycam.Plugins.PluginBase):
class PathParamStepDown(pycam.Plugins.PluginBase): class PathParamStepDown(pycam.Plugins.PluginBase):
DEPENDS = ["Processes"] DEPENDS = ["Processes"]
CATEGORIES = ["Process", "Parameter"]
def setup(self): def setup(self):
widget = pycam.Gui.ControlsGTK.InputNumber(lower=0.01, upper=1000, widget = pycam.Gui.ControlsGTK.InputNumber(lower=0.01, upper=1000,
...@@ -67,6 +69,7 @@ class PathParamStepDown(pycam.Plugins.PluginBase): ...@@ -67,6 +69,7 @@ class PathParamStepDown(pycam.Plugins.PluginBase):
class PathParamMaterialAllowance(pycam.Plugins.PluginBase): class PathParamMaterialAllowance(pycam.Plugins.PluginBase):
DEPENDS = ["Processes"] DEPENDS = ["Processes"]
CATEGORIES = ["Process", "Parameter"]
def setup(self): def setup(self):
widget = pycam.Gui.ControlsGTK.InputNumber(start=0, lower=0, upper=100, widget = pycam.Gui.ControlsGTK.InputNumber(start=0, lower=0, upper=100,
...@@ -84,6 +87,7 @@ class PathParamMaterialAllowance(pycam.Plugins.PluginBase): ...@@ -84,6 +87,7 @@ class PathParamMaterialAllowance(pycam.Plugins.PluginBase):
class PathParamMillingStyle(pycam.Plugins.PluginBase): class PathParamMillingStyle(pycam.Plugins.PluginBase):
DEPENDS = ["Processes"] DEPENDS = ["Processes"]
CATEGORIES = ["Process", "Parameter"]
def setup(self): def setup(self):
input_control = pycam.Gui.ControlsGTK.InputChoice( input_control = pycam.Gui.ControlsGTK.InputChoice(
...@@ -104,6 +108,7 @@ class PathParamMillingStyle(pycam.Plugins.PluginBase): ...@@ -104,6 +108,7 @@ class PathParamMillingStyle(pycam.Plugins.PluginBase):
class PathParamGridDirection(pycam.Plugins.PluginBase): class PathParamGridDirection(pycam.Plugins.PluginBase):
DEPENDS = ["Processes"] DEPENDS = ["Processes"]
CATEGORIES = ["Process", "Parameter"]
def setup(self): def setup(self):
input_control = pycam.Gui.ControlsGTK.InputChoice( input_control = pycam.Gui.ControlsGTK.InputChoice(
...@@ -124,6 +129,7 @@ class PathParamGridDirection(pycam.Plugins.PluginBase): ...@@ -124,6 +129,7 @@ class PathParamGridDirection(pycam.Plugins.PluginBase):
class PathParamRadiusCompensation(pycam.Plugins.PluginBase): class PathParamRadiusCompensation(pycam.Plugins.PluginBase):
DEPENDS = ["Processes"] DEPENDS = ["Processes"]
CATEGORIES = ["Process", "Parameter"]
def setup(self): def setup(self):
widget = pycam.Gui.ControlsGTK.InputCheckBox( widget = pycam.Gui.ControlsGTK.InputCheckBox(
...@@ -141,6 +147,7 @@ class PathParamRadiusCompensation(pycam.Plugins.PluginBase): ...@@ -141,6 +147,7 @@ class PathParamRadiusCompensation(pycam.Plugins.PluginBase):
class PathParamTraceModel(pycam.Plugins.PluginBase): class PathParamTraceModel(pycam.Plugins.PluginBase):
DEPENDS = ["Processes", "Models"] DEPENDS = ["Processes", "Models"]
CATEGORIES = ["Process", "Parameter"]
def setup(self): def setup(self):
self.input_control = pycam.Gui.ControlsGTK.InputTable([], self.input_control = pycam.Gui.ControlsGTK.InputTable([],
......
...@@ -30,7 +30,7 @@ import pycam.Plugins ...@@ -30,7 +30,7 @@ import pycam.Plugins
class PluginSelector(pycam.Plugins.PluginBase): class PluginSelector(pycam.Plugins.PluginBase):
UI_FILE = "plugin_selector.ui" UI_FILE = "plugin_selector.ui"
CATEGORIES = ["Plugins"]
COLUMN_NAME, COLUMN_DESCRIPTION, COLUMN_ENABLED, COLUMN_DEPENDS, \ COLUMN_NAME, COLUMN_DESCRIPTION, COLUMN_ENABLED, COLUMN_DEPENDS, \
COLUMN_DEPENDS_OK, COLUMN_SOURCE = range(6) COLUMN_DEPENDS_OK, COLUMN_SOURCE = range(6)
......
...@@ -27,6 +27,7 @@ from pycam.Exporters.GCodeExporter import GCodeGenerator ...@@ -27,6 +27,7 @@ from pycam.Exporters.GCodeExporter import GCodeGenerator
class PostprocessorEMC2(pycam.Plugins.PluginBase): class PostprocessorEMC2(pycam.Plugins.PluginBase):
DEPENDS = ["ToolpathExport"] DEPENDS = ["ToolpathExport"]
CATEGORIES = ["Postprocessor"]
def setup(self): def setup(self):
self.core.get("register_postprocessor")("emc2", "EMC2", GCodeGenerator) self.core.get("register_postprocessor")("emc2", "EMC2", GCodeGenerator)
......
...@@ -32,6 +32,7 @@ class ProcessStrategySlicing(pycam.Plugins.PluginBase): ...@@ -32,6 +32,7 @@ class ProcessStrategySlicing(pycam.Plugins.PluginBase):
DEPENDS = ["ParameterGroupManager", "PathParamOverlap", DEPENDS = ["ParameterGroupManager", "PathParamOverlap",
"PathParamStepDown", "PathParamMaterialAllowance", "PathParamStepDown", "PathParamMaterialAllowance",
"PathParamMillingStyle", "PathParamGridDirection"] "PathParamMillingStyle", "PathParamGridDirection"]
CATEGORIES = ["Process"]
def setup(self): def setup(self):
parameters = {"overlap": 0.1, parameters = {"overlap": 0.1,
...@@ -69,6 +70,7 @@ class ProcessStrategyContour(pycam.Plugins.PluginBase): ...@@ -69,6 +70,7 @@ class ProcessStrategyContour(pycam.Plugins.PluginBase):
DEPENDS = ["Processes", "PathParamStepDown", DEPENDS = ["Processes", "PathParamStepDown",
"PathParamMaterialAllowance", "PathParamMillingStyle"] "PathParamMaterialAllowance", "PathParamMillingStyle"]
CATEGORIES = ["Process"]
def setup(self): def setup(self):
parameters = {"step_down": 1.0, parameters = {"step_down": 1.0,
...@@ -92,6 +94,7 @@ class ProcessStrategySurfacing(pycam.Plugins.PluginBase): ...@@ -92,6 +94,7 @@ class ProcessStrategySurfacing(pycam.Plugins.PluginBase):
DEPENDS = ["ParameterGroupManager", "PathParamOverlap", DEPENDS = ["ParameterGroupManager", "PathParamOverlap",
"PathParamMaterialAllowance", "PathParamMillingStyle", "PathParamMaterialAllowance", "PathParamMillingStyle",
"PathParamGridDirection"] "PathParamGridDirection"]
CATEGORIES = ["Process"]
def setup(self): def setup(self):
parameters = {"overlap": 0.6, parameters = {"overlap": 0.6,
...@@ -130,6 +133,7 @@ class ProcessStrategyEngraving(pycam.Plugins.PluginBase): ...@@ -130,6 +133,7 @@ class ProcessStrategyEngraving(pycam.Plugins.PluginBase):
DEPENDS = ["ParameterGroupManager", "PathParamStepDown", DEPENDS = ["ParameterGroupManager", "PathParamStepDown",
"PathParamMillingStyle", "PathParamRadiusCompensation", "PathParamMillingStyle", "PathParamRadiusCompensation",
"PathParamTraceModel"] "PathParamTraceModel"]
CATEGORIES = ["Process"]
def setup(self): def setup(self):
parameters = {"step_down": 1.0, parameters = {"step_down": 1.0,
......
...@@ -26,7 +26,7 @@ import pycam.Plugins ...@@ -26,7 +26,7 @@ import pycam.Plugins
class Processes(pycam.Plugins.ListPluginBase): class Processes(pycam.Plugins.ListPluginBase):
DEPENDS = ["ParameterGroupManager"] DEPENDS = ["ParameterGroupManager"]
CATEGORIES = ["Process"]
UI_FILE = "processes.ui" UI_FILE = "processes.ui"
COLUMN_REF, COLUMN_NAME = range(2) COLUMN_REF, COLUMN_NAME = range(2)
LIST_ATTRIBUTE_MAP = {"ref": COLUMN_REF, "name": COLUMN_NAME} LIST_ATTRIBUTE_MAP = {"ref": COLUMN_REF, "name": COLUMN_NAME}
......
...@@ -30,6 +30,7 @@ import pycam.Plugins ...@@ -30,6 +30,7 @@ import pycam.Plugins
class ProgressBar(pycam.Plugins.PluginBase): class ProgressBar(pycam.Plugins.PluginBase):
UI_FILE = "progress_bar.ui" UI_FILE = "progress_bar.ui"
CATEGORIES = ["System"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -28,6 +28,7 @@ import pycam.Gui.ControlsGTK ...@@ -28,6 +28,7 @@ import pycam.Gui.ControlsGTK
class TaskParamCollisionModels(pycam.Plugins.PluginBase): class TaskParamCollisionModels(pycam.Plugins.PluginBase):
DEPENDS = ["Models", "Tasks"] DEPENDS = ["Models", "Tasks"]
CATEGORIES = ["Model", "Task", "Parameter"]
def setup(self): def setup(self):
self.input_control = pycam.Gui.ControlsGTK.InputTable([], self.input_control = pycam.Gui.ControlsGTK.InputTable([],
...@@ -69,6 +70,7 @@ class TaskParamCollisionModels(pycam.Plugins.PluginBase): ...@@ -69,6 +70,7 @@ class TaskParamCollisionModels(pycam.Plugins.PluginBase):
class TaskParamTool(pycam.Plugins.PluginBase): class TaskParamTool(pycam.Plugins.PluginBase):
DEPENDS = ["Tools", "Tasks"] DEPENDS = ["Tools", "Tasks"]
CATEGORIES = ["Tool", "Task", "Parameter"]
def setup(self): def setup(self):
self.input_control = pycam.Gui.ControlsGTK.InputChoice([], self.input_control = pycam.Gui.ControlsGTK.InputChoice([],
...@@ -96,6 +98,7 @@ class TaskParamTool(pycam.Plugins.PluginBase): ...@@ -96,6 +98,7 @@ class TaskParamTool(pycam.Plugins.PluginBase):
class TaskParamProcess(pycam.Plugins.PluginBase): class TaskParamProcess(pycam.Plugins.PluginBase):
DEPENDS = ["Processes", "Tasks"] DEPENDS = ["Processes", "Tasks"]
CATEGORIES = ["Process", "Task", "Parameter"]
def setup(self): def setup(self):
self.input_control = pycam.Gui.ControlsGTK.InputChoice([], self.input_control = pycam.Gui.ControlsGTK.InputChoice([],
...@@ -123,6 +126,7 @@ class TaskParamProcess(pycam.Plugins.PluginBase): ...@@ -123,6 +126,7 @@ class TaskParamProcess(pycam.Plugins.PluginBase):
class TaskParamBounds(pycam.Plugins.PluginBase): class TaskParamBounds(pycam.Plugins.PluginBase):
DEPENDS = ["Bounds", "Tasks"] DEPENDS = ["Bounds", "Tasks"]
CATEGORIES = ["Bounds", "Task", "Parameter"]
def setup(self): def setup(self):
self.input_control = pycam.Gui.ControlsGTK.InputChoice([], self.input_control = pycam.Gui.ControlsGTK.InputChoice([],
......
...@@ -28,6 +28,7 @@ class TaskTypeMilling(pycam.Plugins.PluginBase): ...@@ -28,6 +28,7 @@ class TaskTypeMilling(pycam.Plugins.PluginBase):
DEPENDS = ["Tasks", "TaskParamCollisionModels", "TaskParamTool", DEPENDS = ["Tasks", "TaskParamCollisionModels", "TaskParamTool",
"TaskParamProcess", "TaskParamBounds"] "TaskParamProcess", "TaskParamBounds"]
CATEGORIES = ["Task"]
def setup(self): def setup(self):
parameters = {"collision_models": [], parameters = {"collision_models": [],
......
...@@ -30,6 +30,7 @@ from pycam.Exporters.GCodeExporter import GCodeGenerator ...@@ -30,6 +30,7 @@ from pycam.Exporters.GCodeExporter import GCodeGenerator
class Tasks(pycam.Plugins.ListPluginBase): class Tasks(pycam.Plugins.ListPluginBase):
UI_FILE = "tasks.ui" UI_FILE = "tasks.ui"
CATEGORIES = ["Task"]
COLUMN_REF, COLUMN_NAME = range(2) COLUMN_REF, COLUMN_NAME = range(2)
LIST_ATTRIBUTE_MAP = {"id": COLUMN_REF, "name": COLUMN_NAME} LIST_ATTRIBUTE_MAP = {"id": COLUMN_REF, "name": COLUMN_NAME}
DEPENDS = ["Models", "Tools", "Processes", "Bounds", "Toolpaths"] DEPENDS = ["Models", "Tools", "Processes", "Bounds", "Toolpaths"]
......
...@@ -28,6 +28,7 @@ import pycam.Gui.ControlsGTK ...@@ -28,6 +28,7 @@ import pycam.Gui.ControlsGTK
class ToolParamRadius(pycam.Plugins.PluginBase): class ToolParamRadius(pycam.Plugins.PluginBase):
DEPENDS = ["Tools"] DEPENDS = ["Tools"]
CATEGORIES = ["Tool", "Parameter"]
def setup(self): def setup(self):
control = pycam.Gui.ControlsGTK.InputNumber(lower=0, upper=99, digits=0, control = pycam.Gui.ControlsGTK.InputNumber(lower=0, upper=99, digits=0,
...@@ -55,6 +56,7 @@ class ToolParamRadius(pycam.Plugins.PluginBase): ...@@ -55,6 +56,7 @@ class ToolParamRadius(pycam.Plugins.PluginBase):
class ToolParamTorusRadius(pycam.Plugins.PluginBase): class ToolParamTorusRadius(pycam.Plugins.PluginBase):
DEPENDS = ["Tools"] DEPENDS = ["Tools"]
CATEGORIES = ["Tool", "Parameter"]
def setup(self): def setup(self):
control = pycam.Gui.ControlsGTK.InputNumber(lower=0, upper=99, digits=0, control = pycam.Gui.ControlsGTK.InputNumber(lower=0, upper=99, digits=0,
...@@ -71,6 +73,7 @@ class ToolParamTorusRadius(pycam.Plugins.PluginBase): ...@@ -71,6 +73,7 @@ class ToolParamTorusRadius(pycam.Plugins.PluginBase):
class ToolParamFeedrate(pycam.Plugins.PluginBase): class ToolParamFeedrate(pycam.Plugins.PluginBase):
DEPENDS = ["Tools"] DEPENDS = ["Tools"]
CATEGORIES = ["Tool", "Parameter"]
def setup(self): def setup(self):
control = pycam.Gui.ControlsGTK.InputNumber(lower=0, upper=10000, control = pycam.Gui.ControlsGTK.InputNumber(lower=0, upper=10000,
...@@ -95,6 +98,7 @@ class ToolParamFeedrate(pycam.Plugins.PluginBase): ...@@ -95,6 +98,7 @@ class ToolParamFeedrate(pycam.Plugins.PluginBase):
class ToolParamSpindleSpeed(pycam.Plugins.PluginBase): class ToolParamSpindleSpeed(pycam.Plugins.PluginBase):
DEPENDS = ["Tools"] DEPENDS = ["Tools"]
CATEGORIES = ["Tool", "Parameter"]
def setup(self): def setup(self):
control = pycam.Gui.ControlsGTK.InputNumber(lower=0, upper=100000, control = pycam.Gui.ControlsGTK.InputNumber(lower=0, upper=100000,
......
...@@ -30,6 +30,7 @@ import pycam.Cutters.CylindricalCutter ...@@ -30,6 +30,7 @@ import pycam.Cutters.CylindricalCutter
class ToolTypeBallNose(pycam.Plugins.PluginBase): class ToolTypeBallNose(pycam.Plugins.PluginBase):
DEPENDS = ["Tools", "ToolParamRadius", "ToolParamFeedrate"] DEPENDS = ["Tools", "ToolParamRadius", "ToolParamFeedrate"]
CATEGORIES = ["Tool", "Parameter"]
def setup(self): def setup(self):
parameters = {"radius": 1.0, parameters = {"radius": 1.0,
...@@ -52,6 +53,7 @@ class ToolTypeBullNose(pycam.Plugins.PluginBase): ...@@ -52,6 +53,7 @@ class ToolTypeBullNose(pycam.Plugins.PluginBase):
DEPENDS = ["Tools", "ToolParamRadius", "ToolParamTorusRadius", DEPENDS = ["Tools", "ToolParamRadius", "ToolParamTorusRadius",
"ToolParamFeedrate"] "ToolParamFeedrate"]
CATEGORIES = ["Tool", "Parameter"]
def setup(self): def setup(self):
parameters = {"radius": 1.0, parameters = {"radius": 1.0,
...@@ -76,6 +78,7 @@ class ToolTypeBullNose(pycam.Plugins.PluginBase): ...@@ -76,6 +78,7 @@ class ToolTypeBullNose(pycam.Plugins.PluginBase):
class ToolTypeFlat(pycam.Plugins.PluginBase): class ToolTypeFlat(pycam.Plugins.PluginBase):
DEPENDS = ["Tools", "ToolParamRadius", "ToolParamFeedrate"] DEPENDS = ["Tools", "ToolParamRadius", "ToolParamFeedrate"]
CATEGORIES = ["Tool", "Parameter"]
def setup(self): def setup(self):
parameters = {"radius": 1.0, parameters = {"radius": 1.0,
......
...@@ -27,17 +27,11 @@ from pycam.Geometry.Plane import Plane ...@@ -27,17 +27,11 @@ from pycam.Geometry.Plane import Plane
import pycam.Gui.ControlsGTK import pycam.Gui.ControlsGTK
"""
TODO:
- get the currently selected toolpath (from the table)
- update the current crop-polygons instantly (3D)
- update the ToolpathCropInfoLabel content if no polygons are found
"""
class ToolpathCrop(pycam.Plugins.PluginBase): class ToolpathCrop(pycam.Plugins.PluginBase):
UI_FILE = "toolpath_crop.ui" UI_FILE = "toolpath_crop.ui"
DEPENDS = ["Toolpaths"] DEPENDS = ["Toolpaths"]
CATEGORIES = ["Toolpath"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -34,6 +34,7 @@ class ToolpathExport(pycam.Plugins.PluginBase): ...@@ -34,6 +34,7 @@ class ToolpathExport(pycam.Plugins.PluginBase):
UI_FILE = "toolpath_export.ui" UI_FILE = "toolpath_export.ui"
DEPENDS = ["Toolpaths"] DEPENDS = ["Toolpaths"]
CATEGORIES = ["Toolpath", "Export"]
def setup(self): def setup(self):
self._postprocessors = {} self._postprocessors = {}
......
...@@ -29,6 +29,7 @@ class ToolpathGrid(pycam.Plugins.PluginBase): ...@@ -29,6 +29,7 @@ class ToolpathGrid(pycam.Plugins.PluginBase):
UI_FILE = "toolpath_grid.ui" UI_FILE = "toolpath_grid.ui"
DEPENDS = ["Toolpaths"] DEPENDS = ["Toolpaths"]
CATEGORIES = ["Toolpath"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -29,6 +29,7 @@ import pycam.Plugins ...@@ -29,6 +29,7 @@ import pycam.Plugins
class ToolpathSimulation(pycam.Plugins.PluginBase): class ToolpathSimulation(pycam.Plugins.PluginBase):
UI_FILE = "toolpath_simulation.ui" UI_FILE = "toolpath_simulation.ui"
CATEGORIES = ["Toolpath"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -26,6 +26,7 @@ import pycam.Plugins ...@@ -26,6 +26,7 @@ import pycam.Plugins
class Toolpaths(pycam.Plugins.ListPluginBase): class Toolpaths(pycam.Plugins.ListPluginBase):
UI_FILE = "toolpaths.ui" UI_FILE = "toolpaths.ui"
CATEGORIES = ["Toolpath"]
COLUMN_REF, COLUMN_NAME, COLUMN_VISIBLE = range(3) COLUMN_REF, COLUMN_NAME, COLUMN_VISIBLE = range(3)
LIST_ATTRIBUTE_MAP = {"name": COLUMN_NAME, "visible": COLUMN_VISIBLE} LIST_ATTRIBUTE_MAP = {"name": COLUMN_NAME, "visible": COLUMN_VISIBLE}
ICONS = {"visible": "visible.svg", "hidden": "visible_off.svg"} ICONS = {"visible": "visible.svg", "hidden": "visible_off.svg"}
......
...@@ -29,6 +29,7 @@ from pycam.Cutters.ToroidalCutter import ToroidalCutter ...@@ -29,6 +29,7 @@ from pycam.Cutters.ToroidalCutter import ToroidalCutter
class Tools(pycam.Plugins.ListPluginBase): class Tools(pycam.Plugins.ListPluginBase):
DEPENDS = ["ParameterGroupManager"] DEPENDS = ["ParameterGroupManager"]
CATEGORIES = ["Tool"]
UI_FILE = "tools.ui" UI_FILE = "tools.ui"
COLUMN_REF, COLUMN_TOOL_ID, COLUMN_NAME = range(3) COLUMN_REF, COLUMN_TOOL_ID, COLUMN_NAME = range(3)
LIST_ATTRIBUTE_MAP = {"id": COLUMN_TOOL_ID, "name": COLUMN_NAME} LIST_ATTRIBUTE_MAP = {"id": COLUMN_TOOL_ID, "name": COLUMN_NAME}
......
...@@ -26,6 +26,7 @@ import pycam.Plugins ...@@ -26,6 +26,7 @@ import pycam.Plugins
class Units(pycam.Plugins.PluginBase): class Units(pycam.Plugins.PluginBase):
UI_FILE = "units.ui" UI_FILE = "units.ui"
CATEGORIES = ["System"]
def setup(self): def setup(self):
if self.gui: if self.gui:
......
...@@ -38,6 +38,7 @@ class PluginBase(object): ...@@ -38,6 +38,7 @@ class PluginBase(object):
UI_FILE = None UI_FILE = None
DEPENDS = [] DEPENDS = []
CATEGORIES = []
ICONS = {} ICONS = {}
ICON_SIZE = 23 ICON_SIZE = 23
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment