From 7d39669948a1ab4bdaccf450d175a4afcf424553 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 21 Jun 2017 13:24:43 -0300 Subject: [PATCH] Arch: Detect and use Reinforcement addon if present --- src/Mod/Arch/InitGui.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Mod/Arch/InitGui.py b/src/Mod/Arch/InitGui.py index 7d64c159c8..faa64a58cb 100644 --- a/src/Mod/Arch/InitGui.py +++ b/src/Mod/Arch/InitGui.py @@ -45,6 +45,24 @@ class ArchWorkbench(Workbench): "Arch_CloseHoles","Arch_MergeWalls","Arch_Check", "Arch_IfcExplorer","Arch_ToggleIfcBrepFlag","Arch_3Views", "Arch_IfcSpreadsheet","Arch_ToggleSubs"] + + # try to locate the Reber addon + try: + import RebarTools + except: + pass + else: + class RebarGroupCommand: + def GetCommands(self): + return tuple(["Arch_Rebar"]+RebarTools.RebarCommands) + def GetResources(self): + return { 'MenuText': 'Rebar tools', + 'ToolTip': 'Rebar tools' + } + def IsActive(self): + return not FreeCAD.ActiveDocument is None + FreeCADGui.addCommand('Arch_RebarTools', RebarGroupCommand()) + self.archtools[2] = "Arch_RebarTools" # draft tools self.drafttools = ["Draft_Line","Draft_Wire","Draft_Circle","Draft_Arc","Draft_Ellipse",