Some fixes for ProfileLib
This commit is contained in:
parent
2a950d66ea
commit
55d0ad5c5c
|
@ -105,6 +105,7 @@ SET(Sketcher_Scripts
|
||||||
TestSketcherApp.py
|
TestSketcherApp.py
|
||||||
Profiles.py
|
Profiles.py
|
||||||
ProfileLib/Hexagon.py
|
ProfileLib/Hexagon.py
|
||||||
|
ProfileLib/__init__.py
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(Sketcher SHARED ${Sketcher_SRCS})
|
add_library(Sketcher SHARED ${Sketcher_SRCS})
|
||||||
|
|
|
@ -70,9 +70,11 @@ class SketcherWorkbench ( Workbench ):
|
||||||
# load the module
|
# load the module
|
||||||
import SketcherGui
|
import SketcherGui
|
||||||
import Sketcher
|
import Sketcher
|
||||||
#try:
|
try:
|
||||||
# import Profiles
|
import Profiles
|
||||||
#except: pass
|
except:
|
||||||
|
print "Error in Profiles module"
|
||||||
|
|
||||||
def GetClassName(self):
|
def GetClassName(self):
|
||||||
return "SketcherGui::Workbench"
|
return "SketcherGui::Workbench"
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,14 @@
|
||||||
#* *
|
#* *
|
||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
|
|
||||||
import FreeCAD, FreeCADGui, Sketcher
|
import FreeCAD, Sketcher
|
||||||
|
|
||||||
|
if FreeCAD.GuiUp:
|
||||||
|
import FreeCADGui,SketcherGui
|
||||||
|
from PySide import QtCore, QtGui
|
||||||
|
from PySide.QtCore import Qt
|
||||||
|
from PySide.QtGui import QApplication, QCursor
|
||||||
|
from FreeCADGui import PySideUic as uic
|
||||||
|
|
||||||
__title__="Sketcher profile lib handling"
|
__title__="Sketcher profile lib handling"
|
||||||
__author__ = "Juergen Riegel"
|
__author__ = "Juergen Riegel"
|
||||||
|
@ -35,7 +41,7 @@ class _CommandProfileHexagon1:
|
||||||
"The basis hexagon profile command definition"
|
"The basis hexagon profile command definition"
|
||||||
def GetResources(self):
|
def GetResources(self):
|
||||||
return {'Pixmap' : 'Sketcher_Hexagon',
|
return {'Pixmap' : 'Sketcher_Hexagon',
|
||||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Creates a hexagon profile in the sketch"),
|
'MenuText': QtCore.QT_TRANSLATE_NOOP("Sketcher_ProfilesHexagon1","Creates a hexagon profile in the sketch"),
|
||||||
'Accel': "",
|
'Accel': "",
|
||||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Sketcher_ProfilesHexagon1","Creates a hexagon profile in the sketch")}
|
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Sketcher_ProfilesHexagon1","Creates a hexagon profile in the sketch")}
|
||||||
|
|
||||||
|
@ -43,11 +49,11 @@ class _CommandProfileHexagon1:
|
||||||
|
|
||||||
FreeCAD.ActiveDocument.openTransaction("Create hexagon profile")
|
FreeCAD.ActiveDocument.openTransaction("Create hexagon profile")
|
||||||
FreeCADGui.addModule("ProfileLib.Hexagon")
|
FreeCADGui.addModule("ProfileLib.Hexagon")
|
||||||
FreeCADGui.doCommand("Hexagon.makeHexagonSimple()")
|
FreeCADGui.doCommand("ProfileLib.Hexagon.makeHexagonSimple()")
|
||||||
|
|
||||||
def IsActive(self):
|
def IsActive(self):
|
||||||
return isProfileActive()
|
return isProfileActive()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FreeCADGui.addCommand('Sketcher_ProfilesHexagon1',_CommandProfileHexagon1())
|
FreeCADGui.addCommand('Sketcher_ProfilesHexagon1',_CommandProfileHexagon1())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user