def __init__(self,object): # the panel has a tree widget that contains categories # for the subcomponents, such as additions, subtractions. # the categories are shown only if they are not empty. form_class, base_class = uic.loadUiType(FreeCAD.getHomePath() + "Mod/Fem/ShowDisplacement.ui") self.obj = object self.formUi = form_class() self.form = QtGui.QWidget() self.formUi.setupUi(self.form) #Connect Signals and Slots QtCore.QObject.connect(self.formUi.radioButton_Displacement, QtCore.SIGNAL("clicked(bool)"), self.displacementClicked) QtCore.QObject.connect(self.formUi.radioButton_Stress, QtCore.SIGNAL("clicked(bool)"), self.stressClicked) QtCore.QObject.connect(self.formUi.radioButton_NoColor, QtCore.SIGNAL("clicked(bool)"), self.noColorClicked) QtCore.QObject.connect(self.formUi.checkBox_ShowDisplacement, QtCore.SIGNAL("clicked(bool)"), self.showDisplacementClicked) QtCore.QObject.connect(self.formUi.verticalScrollBar_Factor, QtCore.SIGNAL("valueChanged(int)"), self.sliderValue) QtCore.QObject.connect(self.formUi.spinBox_SliderFactor, QtCore.SIGNAL("valueChanged(double)"), self.sliderMaxValue) QtCore.QObject.connect(self.formUi.spinBox_DisplacementFactor, QtCore.SIGNAL("valueChanged(double)"), self.displacementFactorValue) self.DisplacementObject = None self.StressObject = None self.update()
def __init__(self,object): # the panel has a tree widget that contains categories # for the subcomponents, such as additions, subtractions. # the categories are shown only if they are not empty. form_class, base_class = uic.loadUiType(FreeCAD.getHomePath() + "Mod/Fem/MechanicalAnalysis.ui") self.CalculixBinary = FreeCAD.getHomePath() +'bin/ccx.exe' self.TempDir = FreeCAD.ActiveDocument.TransientDir.replace('\\','/') + '/FemAnl_'+ object.Uid[-4:] if not os.path.isdir(self.TempDir): os.mkdir(self.TempDir) self.obj = object self.formUi = form_class() self.form = QtGui.QWidget() self.formUi.setupUi(self.form) #self.params = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem") self.Calculix = QtCore.QProcess() self.Timer = QtCore.QTimer() self.Timer.start(300) self.OutStr = '' #Connect Signals and Slots QtCore.QObject.connect(self.formUi.toolButton_chooseOutputDir, QtCore.SIGNAL("clicked()"), self.chooseOutputDir) QtCore.QObject.connect(self.formUi.pushButton_generate, QtCore.SIGNAL("clicked()"), self.run) QtCore.QObject.connect(self.Calculix, QtCore.SIGNAL("started()"), self.calculixStarted) QtCore.QObject.connect(self.Calculix, QtCore.SIGNAL("finished(int)"), self.calculixFinished) QtCore.QObject.connect(self.Timer, QtCore.SIGNAL("timeout()"), self.UpdateText) self.update()
def __init__(self,obj): # the panel has a tree widget that contains categories # for the subcomponents, such as additions, subtractions. # the categories are shown only if they are not empty. form_class, base_class = uic.loadUiType(FreeCAD.getHomePath() + "Mod/Fem/MechanicalMaterial.ui") self.obj = obj self.formUi = form_class() self.form = QtGui.QWidget() self.formUi.setupUi(self.form) self.params = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem") QtCore.QObject.connect(self.formUi.pushButton_MatWeb, QtCore.SIGNAL("clicked()"), self.goMatWeb) QtCore.QObject.connect(self.formUi.comboBox_MaterialsInDir, QtCore.SIGNAL("currentIndexChanged(int)"), self.chooseMat) self.update()
def __init__(self,object): # the panel has a tree widget that contains categories # for the subcomponents, such as additions, subtractions. # the categories are shown only if they are not empty. form_class, base_class = uic.loadUiType(FreeCAD.getHomePath() + "Mod/Fem/MechanicalAnalysis.ui") self.obj = object self.formUi = form_class() self.form = QtGui.QWidget() self.formUi.setupUi(self.form) self.params = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Machining_Distortion") #Connect Signals and Slots QtCore.QObject.connect(self.formUi.toolButton_chooseOutputDir, QtCore.SIGNAL("clicked()"), self.chooseOutputDir) QtCore.QObject.connect(self.formUi.pushButton_generate, QtCore.SIGNAL("clicked()"), self.run) self.update()
def __init__(self, object): # the panel has a tree widget that contains categories # for the subcomponents, such as additions, subtractions. # the categories are shown only if they are not empty. form_class, base_class = uic.loadUiType(FreeCAD.getHomePath() + "Mod/Fem/ShowDisplacement.ui") self.obj = object self.formUi = form_class() self.form = QtGui.QWidget() self.formUi.setupUi(self.form) #Connect Signals and Slots QtCore.QObject.connect(self.formUi.radioButton_Displacement, QtCore.SIGNAL("clicked(bool)"), self.displacementClicked) QtCore.QObject.connect(self.formUi.radioButton_Stress, QtCore.SIGNAL("clicked(bool)"), self.stressClicked) QtCore.QObject.connect(self.formUi.radioButton_NoColor, QtCore.SIGNAL("clicked(bool)"), self.noColorClicked) QtCore.QObject.connect(self.formUi.checkBox_ShowDisplacement, QtCore.SIGNAL("clicked(bool)"), self.showDisplacementClicked) QtCore.QObject.connect(self.formUi.verticalScrollBar_Factor, QtCore.SIGNAL("valueChanged(int)"), self.sliderValue) QtCore.QObject.connect(self.formUi.spinBox_SliderFactor, QtCore.SIGNAL("valueChanged(double)"), self.sliderMaxValue) QtCore.QObject.connect(self.formUi.spinBox_DisplacementFactor, QtCore.SIGNAL("valueChanged(double)"), self.displacementFactorValue) self.DisplacementObject = None self.StressObject = None self.update()
def __init__(self, object): # the panel has a tree widget that contains categories # for the subcomponents, such as additions, subtractions. # the categories are shown only if they are not empty. form_class, base_class = uic.loadUiType( FreeCAD.getHomePath() + "Mod/Fem/MechanicalAnalysis.ui") self.CalculixBinary = FreeCAD.getHomePath() + 'bin/ccx.exe' self.TempDir = FreeCAD.ActiveDocument.TransientDir.replace( '\\', '/') + '/FemAnl_' + object.Uid[-4:] if not os.path.isdir(self.TempDir): os.mkdir(self.TempDir) self.obj = object self.formUi = form_class() self.form = QtGui.QWidget() self.formUi.setupUi(self.form) #self.params = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem") self.Calculix = QtCore.QProcess() self.Timer = QtCore.QTimer() self.Timer.start(300) self.OutStr = '' #Connect Signals and Slots QtCore.QObject.connect(self.formUi.toolButton_chooseOutputDir, QtCore.SIGNAL("clicked()"), self.chooseOutputDir) QtCore.QObject.connect(self.formUi.pushButton_generate, QtCore.SIGNAL("clicked()"), self.run) QtCore.QObject.connect(self.Calculix, QtCore.SIGNAL("started()"), self.calculixStarted) QtCore.QObject.connect(self.Calculix, QtCore.SIGNAL("finished(int)"), self.calculixFinished) QtCore.QObject.connect(self.Timer, QtCore.SIGNAL("timeout()"), self.UpdateText) self.update()
def __init__(self, object): # the panel has a tree widget that contains categories # for the subcomponents, such as additions, subtractions. # the categories are shown only if they are not empty. form_class, base_class = uic.loadUiType( FreeCAD.getHomePath() + "Mod/Fem/MechanicalAnalysis.ui") self.obj = object self.formUi = form_class() self.form = QtGui.QWidget() self.formUi.setupUi(self.form) self.params = FreeCAD.ParamGet( "User parameter:BaseApp/Preferences/Mod/Machining_Distortion") #Connect Signals and Slots QtCore.QObject.connect(self.formUi.toolButton_chooseOutputDir, QtCore.SIGNAL("clicked()"), self.chooseOutputDir) QtCore.QObject.connect(self.formUi.pushButton_generate, QtCore.SIGNAL("clicked()"), self.run) self.update()
#You should have received a copy of the GNU Lesser General Public #License along with this library; if not, write to the Free Software #Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA from os.path import dirname, join bolts_path = dirname(__file__) from BOLTS import USE_PYSIDE import FreeCAD, FreeCADGui if USE_PYSIDE: from PySide import QtCore, QtGui from FreeCADGui import PySideUic as uic try: Ui_BoltsWidget,QBoltsWidget = uic.loadUiType(join(bolts_path,'bolts_widget.ui')) Ui_ValueWidget,QValueWidget = uic.loadUiType(join(bolts_path,'value_widget.ui')) Ui_BoolWidget,QBoolWidget = uic.loadUiType(join(bolts_path,'bool_widget.ui')) Ui_TableIndexWidget,QTableIndexWidget = uic.loadUiType(join(bolts_path,'tableindex_widget.ui')) Ui_PropertyWidget,QPropertyWidget = uic.loadUiType(join(bolts_path,'property_widget.ui')) except ImportError: FreeCAD.Console.PrintError("uic import failed. Make sure that the pyside tools are installed") raise from PySide.QtCore import Slot def unpack(x): return x else: from PyQt4 import QtGui, QtCore from bolts_widget import Ui_BoltsWidget from PyQt4.QtGui import QDockWidget as QBoltsWidget from value_widget import Ui_ValueWidget
from PySide import QtCore, QtGui from FreeCADGui import PySideUic as uic import FreeCAD, FreeCADGui from ConfigParser import ConfigParser from os.path import basename, dirname, join from uuid import UUID from hashlib import sha1 import json import requests from requests.auth import HTTPBasicAuth try: root_dir = dirname(__file__) Ui_CadinetDialog,QCadinetDialog = uic.loadUiType(join(root_dir,'cadinet.ui')) except ImportError: FreeCAD.Console.PrintError("uic import failed. Make sure that the pyside tools are installed") raise LICENSES = { "CC0 1.0" : "http://creativecommons.org/publicdomain/zero/1.0/", "CC-BY 3.0" : "http://creativecommons.org/licenses/by/3.0/", "CC-BY 4.0" : "http://creativecommons.org/licenses/by/4.0/", "CC-BY-SA 4.0" : "http://creativecommons.org/licenses/by-sa/4.0/", "CC-BY-ND 4.0" : "http://creativecommons.org/licenses/by-nd/4.0/", "CC-BY-NC 4.0" : "http://creativecommons.org/licenses/by-nc/4.0/", "CC-BY-NC-SA 4.0" : "http://creativecommons.org/licenses/by-nc-sa/4.0/", "CC-BY-NC-ND 4.0" : "http://creativecommons.org/licenses/by-nc-nd/4.0/", "MIT" : "http://opensource.org/licenses/MIT", #see https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT "BSD 3-clause" : "http://opensource.org/licenses/BSD-3-Clause",
import FreeCADGui from ..bolttools import freecad from ..bolttools.blt import Collection from ..bolttools.blt import ClassName from ..bolttools.blt import ClassStandard from .. import USE_PYSIDE if USE_PYSIDE: from PySide import QtCore from PySide import QtGui from FreeCADGui import PySideUic as uic try: bolts_path = dirname(__file__) Ui_BoltsWidget, QBoltsWidget = uic.loadUiType( join(bolts_path, 'bolts_widget.ui')) Ui_ValueWidget, QValueWidget = uic.loadUiType( join(bolts_path, 'value_widget.ui')) Ui_BoolWidget, QBoolWidget = uic.loadUiType( join(bolts_path, 'bool_widget.ui')) Ui_TableIndexWidget, QTableIndexWidget = uic.loadUiType( join(bolts_path, 'tableindex_widget.ui')) Ui_PropertyWidget, QPropertyWidget = uic.loadUiType( join(bolts_path, 'property_widget.ui')) except ImportError: FreeCAD.Console.PrintError( "uic import failed. Make sure that the pyside tools are installed") raise from PySide.QtCore import Slot def unpack(x):
from PySide import QtCore, QtGui from FreeCADGui import PySideUic as uic import FreeCAD, FreeCADGui from ConfigParser import ConfigParser from os.path import basename, dirname, join from uuid import UUID from hashlib import sha1 import json import requests from requests.auth import HTTPBasicAuth try: root_dir = dirname(__file__) Ui_CadinetDialog, QCadinetDialog = uic.loadUiType( join(root_dir, 'cadinet.ui')) except ImportError: FreeCAD.Console.PrintError( "uic import failed. Make sure that the pyside tools are installed") raise LICENSES = { "CC0 1.0": "http://creativecommons.org/publicdomain/zero/1.0/", "CC-BY 3.0": "http://creativecommons.org/licenses/by/3.0/", "CC-BY 4.0": "http://creativecommons.org/licenses/by/4.0/", "CC-BY-SA 4.0": "http://creativecommons.org/licenses/by-sa/4.0/", "CC-BY-ND 4.0": "http://creativecommons.org/licenses/by-nd/4.0/", "CC-BY-NC 4.0": "http://creativecommons.org/licenses/by-nc/4.0/", "CC-BY-NC-SA 4.0": "http://creativecommons.org/licenses/by-nc-sa/4.0/", "CC-BY-NC-ND 4.0": "http://creativecommons.org/licenses/by-nc-nd/4.0/", "MIT":