mejoras
This commit is contained in:
@@ -372,7 +372,7 @@ class ViewProviderOffsetArea(_ViewProviderArea):
|
||||
|
||||
|
||||
def makeProhibitedArea(base = None):
|
||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "ProhibitedArea")
|
||||
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "Exclusions")
|
||||
ProhibitedArea(obj)
|
||||
ViewProviderForbiddenArea(obj.ViewObject)
|
||||
if base:
|
||||
@@ -702,8 +702,8 @@ class CommandFrameArea:
|
||||
'ToolTip': "Frame Area"}
|
||||
|
||||
def Activated(self):
|
||||
sel = FreeCADGui.Selection.getSelection()
|
||||
makeFramedArea(None, sel)
|
||||
for base in FreeCADGui.Selection.getSelection():
|
||||
makeFramedArea(None, base)
|
||||
|
||||
def IsActive(self):
|
||||
if FreeCAD.ActiveDocument:
|
||||
@@ -720,8 +720,8 @@ class CommandProhibitedArea:
|
||||
'ToolTip': "Prohibited Area"}
|
||||
|
||||
def Activated(self):
|
||||
sel = FreeCADGui.Selection.getSelection()
|
||||
makeProhibitedArea(sel[0])
|
||||
for base in FreeCADGui.Selection.getSelection():
|
||||
makeProhibitedArea(base)
|
||||
|
||||
def IsActive(self):
|
||||
if FreeCAD.ActiveDocument:
|
||||
@@ -763,11 +763,8 @@ class CommandOffsetArea:
|
||||
'ToolTip': "OffsetArea"}
|
||||
|
||||
def Activated(self):
|
||||
sel = FreeCADGui.Selection.getSelection()
|
||||
base = None
|
||||
if sel:
|
||||
base = sel[0]
|
||||
obj = makeOffsetArea(base)
|
||||
for base in FreeCADGui.Selection.getSelection():
|
||||
makeOffsetArea(base)
|
||||
|
||||
def IsActive(self):
|
||||
if FreeCAD.ActiveDocument:
|
||||
@@ -776,7 +773,7 @@ class CommandOffsetArea:
|
||||
return False
|
||||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
'''if FreeCAD.GuiUp:
|
||||
class CommandAreaGroup:
|
||||
|
||||
def GetCommands(self):
|
||||
@@ -800,4 +797,4 @@ if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('ForbiddenArea', CommandProhibitedArea())
|
||||
FreeCADGui.addCommand('PVSubplant', CommandPVSubplant())
|
||||
FreeCADGui.addCommand('OffsetArea', CommandOffsetArea())
|
||||
FreeCADGui.addCommand('PVPlantAreas', CommandAreaGroup())
|
||||
FreeCADGui.addCommand('PVPlantAreas', CommandAreaGroup())'''
|
||||
|
||||
@@ -128,7 +128,7 @@ def joinAreas(areas):
|
||||
shape.fuse(shapes)
|
||||
return shape
|
||||
|
||||
class CommandSplitArea:
|
||||
'''class CommandSplitArea:
|
||||
def GetResources(self):
|
||||
return {'Pixmap': str(os.path.join(PVPlantResources.DirIcons, "split_area.svg")),
|
||||
'Accel': "A, S",
|
||||
@@ -162,6 +162,6 @@ class CommandJoinAreas:
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('SplitArea', CommandSplitArea())
|
||||
FreeCADGui.addCommand('JoinAreas', CommandJoinAreas())
|
||||
FreeCADGui.addCommand('JoinAreas', CommandJoinAreas())'''
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user