FEM: beam sectiong and element geometry 1D object, make name fit in FEM name system
This commit is contained in:
parent
77e4a6d20d
commit
977fd8995e
|
@ -89,7 +89,7 @@ SET(FemScripts_SRCS
|
||||||
|
|
||||||
SET(FemObjectsScripts_SRCS
|
SET(FemObjectsScripts_SRCS
|
||||||
PyObjects/__init__.py
|
PyObjects/__init__.py
|
||||||
PyObjects/_FemBeamSection.py
|
PyObjects/_FemElementGeometry1D.py
|
||||||
PyObjects/_FemConstraintSelfWeight.py
|
PyObjects/_FemConstraintSelfWeight.py
|
||||||
PyObjects/_FemFluidSection.py
|
PyObjects/_FemFluidSection.py
|
||||||
PyObjects/_FemMaterialMechanicalNonlinear.py
|
PyObjects/_FemMaterialMechanicalNonlinear.py
|
||||||
|
@ -107,7 +107,7 @@ SET(FemGuiScripts_SRCS
|
||||||
PyGui/FemCommands.py
|
PyGui/FemCommands.py
|
||||||
PyGui/__init__.py
|
PyGui/__init__.py
|
||||||
PyGui/_CommandFemAnalysis.py
|
PyGui/_CommandFemAnalysis.py
|
||||||
PyGui/_CommandFemBeamSection.py
|
PyGui/_CommandFemElementGeometry1D.py
|
||||||
PyGui/_CommandFemConstraintSelfWeight.py
|
PyGui/_CommandFemConstraintSelfWeight.py
|
||||||
PyGui/_CommandFemFluidSection.py
|
PyGui/_CommandFemFluidSection.py
|
||||||
PyGui/_CommandFemMaterialMechanicalNonlinear.py
|
PyGui/_CommandFemMaterialMechanicalNonlinear.py
|
||||||
|
@ -127,7 +127,7 @@ SET(FemGuiScripts_SRCS
|
||||||
PyGui/_CommandFemSolverControl.py
|
PyGui/_CommandFemSolverControl.py
|
||||||
PyGui/_CommandFemSolverRun.py
|
PyGui/_CommandFemSolverRun.py
|
||||||
PyGui/_CommandFemSolverZ88.py
|
PyGui/_CommandFemSolverZ88.py
|
||||||
PyGui/_TaskPanelFemBeamSection.py
|
PyGui/_TaskPanelFemElementGeometry1D.py
|
||||||
PyGui/_TaskPanelFemFluidSection.py
|
PyGui/_TaskPanelFemFluidSection.py
|
||||||
PyGui/_TaskPanelFemMaterial.py
|
PyGui/_TaskPanelFemMaterial.py
|
||||||
PyGui/_TaskPanelFemMeshGmsh.py
|
PyGui/_TaskPanelFemMeshGmsh.py
|
||||||
|
@ -136,7 +136,7 @@ SET(FemGuiScripts_SRCS
|
||||||
PyGui/_TaskPanelFemResultShow.py
|
PyGui/_TaskPanelFemResultShow.py
|
||||||
PyGui/_TaskPanelFemShellThickness.py
|
PyGui/_TaskPanelFemShellThickness.py
|
||||||
PyGui/_TaskPanelFemSolverCalculix.py
|
PyGui/_TaskPanelFemSolverCalculix.py
|
||||||
PyGui/_ViewProviderFemBeamSection.py
|
PyGui/_ViewProviderFemElementGeometry1D.py
|
||||||
PyGui/_ViewProviderFemConstraintSelfWeight.py
|
PyGui/_ViewProviderFemConstraintSelfWeight.py
|
||||||
PyGui/_ViewProviderFemFluidSection.py
|
PyGui/_ViewProviderFemFluidSection.py
|
||||||
PyGui/_ViewProviderFemMaterial.py
|
PyGui/_ViewProviderFemMaterial.py
|
||||||
|
@ -148,7 +148,7 @@ SET(FemGuiScripts_SRCS
|
||||||
PyGui/_ViewProviderFemShellThickness.py
|
PyGui/_ViewProviderFemShellThickness.py
|
||||||
PyGui/_ViewProviderFemSolverCalculix.py
|
PyGui/_ViewProviderFemSolverCalculix.py
|
||||||
PyGui/_ViewProviderFemSolverZ88.py
|
PyGui/_ViewProviderFemSolverZ88.py
|
||||||
PyGui/TaskPanelFemBeamSection.ui
|
PyGui/TaskPanelFemElementGeometry1D.ui
|
||||||
PyGui/TaskPanelFemFluidSection.ui
|
PyGui/TaskPanelFemFluidSection.ui
|
||||||
PyGui/TaskPanelFemMaterial.ui
|
PyGui/TaskPanelFemMaterial.ui
|
||||||
PyGui/TaskPanelFemMeshGmsh.ui
|
PyGui/TaskPanelFemMeshGmsh.ui
|
||||||
|
|
|
@ -47,7 +47,7 @@ INSTALL(
|
||||||
INSTALL(
|
INSTALL(
|
||||||
FILES
|
FILES
|
||||||
PyObjects/__init__.py
|
PyObjects/__init__.py
|
||||||
PyObjects/_FemBeamSection.py
|
PyObjects/_FemElementGeometry1D.py
|
||||||
PyObjects/_FemConstraintSelfWeight.py
|
PyObjects/_FemConstraintSelfWeight.py
|
||||||
PyObjects/_FemFluidSection.py
|
PyObjects/_FemFluidSection.py
|
||||||
PyObjects/_FemMaterialMechanicalNonlinear.py
|
PyObjects/_FemMaterialMechanicalNonlinear.py
|
||||||
|
@ -68,7 +68,7 @@ INSTALL(
|
||||||
PyGui/FemCommands.py
|
PyGui/FemCommands.py
|
||||||
PyGui/__init__.py
|
PyGui/__init__.py
|
||||||
PyGui/_CommandFemAnalysis.py
|
PyGui/_CommandFemAnalysis.py
|
||||||
PyGui/_CommandFemBeamSection.py
|
PyGui/_CommandFemElementGeometry1D.py
|
||||||
PyGui/_CommandFemConstraintSelfWeight.py
|
PyGui/_CommandFemConstraintSelfWeight.py
|
||||||
PyGui/_CommandFemFluidSection.py
|
PyGui/_CommandFemFluidSection.py
|
||||||
PyGui/_CommandFemMaterialMechanicalNonlinear.py
|
PyGui/_CommandFemMaterialMechanicalNonlinear.py
|
||||||
|
@ -88,7 +88,7 @@ INSTALL(
|
||||||
PyGui/_CommandFemSolverControl.py
|
PyGui/_CommandFemSolverControl.py
|
||||||
PyGui/_CommandFemSolverRun.py
|
PyGui/_CommandFemSolverRun.py
|
||||||
PyGui/_CommandFemSolverZ88.py
|
PyGui/_CommandFemSolverZ88.py
|
||||||
PyGui/_TaskPanelFemBeamSection.py
|
PyGui/_TaskPanelFemElementGeometry1D.py
|
||||||
PyGui/_TaskPanelFemFluidSection.py
|
PyGui/_TaskPanelFemFluidSection.py
|
||||||
PyGui/_TaskPanelFemMaterial.py
|
PyGui/_TaskPanelFemMaterial.py
|
||||||
PyGui/_TaskPanelFemMeshGmsh.py
|
PyGui/_TaskPanelFemMeshGmsh.py
|
||||||
|
@ -97,7 +97,7 @@ INSTALL(
|
||||||
PyGui/_TaskPanelFemResultShow.py
|
PyGui/_TaskPanelFemResultShow.py
|
||||||
PyGui/_TaskPanelFemShellThickness.py
|
PyGui/_TaskPanelFemShellThickness.py
|
||||||
PyGui/_TaskPanelFemSolverCalculix.py
|
PyGui/_TaskPanelFemSolverCalculix.py
|
||||||
PyGui/_ViewProviderFemBeamSection.py
|
PyGui/_ViewProviderFemElementGeometry1D.py
|
||||||
PyGui/_ViewProviderFemConstraintSelfWeight.py
|
PyGui/_ViewProviderFemConstraintSelfWeight.py
|
||||||
PyGui/_ViewProviderFemFluidSection.py
|
PyGui/_ViewProviderFemFluidSection.py
|
||||||
PyGui/_ViewProviderFemMaterial.py
|
PyGui/_ViewProviderFemMaterial.py
|
||||||
|
@ -109,7 +109,7 @@ INSTALL(
|
||||||
PyGui/_ViewProviderFemShellThickness.py
|
PyGui/_ViewProviderFemShellThickness.py
|
||||||
PyGui/_ViewProviderFemSolverCalculix.py
|
PyGui/_ViewProviderFemSolverCalculix.py
|
||||||
PyGui/_ViewProviderFemSolverZ88.py
|
PyGui/_ViewProviderFemSolverZ88.py
|
||||||
PyGui/TaskPanelFemBeamSection.ui
|
PyGui/TaskPanelFemElementGeometry1D.ui
|
||||||
PyGui/TaskPanelFemFluidSection.ui
|
PyGui/TaskPanelFemFluidSection.ui
|
||||||
PyGui/TaskPanelFemMaterial.ui
|
PyGui/TaskPanelFemMaterial.ui
|
||||||
PyGui/TaskPanelFemMeshGmsh.ui
|
PyGui/TaskPanelFemMeshGmsh.ui
|
||||||
|
|
|
@ -404,7 +404,7 @@ def get_femelement_sets_from_group_data(femmesh, fem_objects):
|
||||||
def get_elset_short_name(obj, i):
|
def get_elset_short_name(obj, i):
|
||||||
if hasattr(obj, "Proxy") and obj.Proxy.Type == 'FemMaterial':
|
if hasattr(obj, "Proxy") and obj.Proxy.Type == 'FemMaterial':
|
||||||
return 'Mat' + str(i)
|
return 'Mat' + str(i)
|
||||||
elif hasattr(obj, "Proxy") and obj.Proxy.Type == 'FemBeamSection':
|
elif hasattr(obj, "Proxy") and obj.Proxy.Type == 'FemElementGeometry1D':
|
||||||
return 'Beam' + str(i)
|
return 'Beam' + str(i)
|
||||||
elif hasattr(obj, "Proxy") and obj.Proxy.Type == 'FemFluidSection':
|
elif hasattr(obj, "Proxy") and obj.Proxy.Type == 'FemFluidSection':
|
||||||
return 'Fluid' + str(i)
|
return 'Fluid' + str(i)
|
||||||
|
@ -1030,7 +1030,7 @@ def get_analysis_group_elements(aAnalysis, aPart):
|
||||||
else:
|
else:
|
||||||
FreeCAD.Console.PrintError('Problem: more than one object with empty references.\n')
|
FreeCAD.Console.PrintError('Problem: more than one object with empty references.\n')
|
||||||
print('We gone try to get the empty material references anyway.\n')
|
print('We gone try to get the empty material references anyway.\n')
|
||||||
# ShellThickness, BeamSection and FluidSection could have empty references, but on solid meshes only materials should have empty references
|
# ShellThickness, ElementGeometry1D and FluidSection could have empty references, but on solid meshes only materials should have empty references
|
||||||
for er in empty_references:
|
for er in empty_references:
|
||||||
print(er.Name)
|
print(er.Name)
|
||||||
group_elements = get_anlysis_empty_references_group_elements(group_elements, aAnalysis, aPart.Shape)
|
group_elements = get_anlysis_empty_references_group_elements(group_elements, aAnalysis, aPart.Shape)
|
||||||
|
|
|
@ -190,7 +190,7 @@ class FemTools(QtCore.QRunnable, QtCore.QObject):
|
||||||
self.pressure_constraints = []
|
self.pressure_constraints = []
|
||||||
## @var beam_sections
|
## @var beam_sections
|
||||||
# set of beam sections from the analysis. Updated with update_objects
|
# set of beam sections from the analysis. Updated with update_objects
|
||||||
# Individual beam sections are Proxy.Type "FemBeamSection"
|
# Individual beam sections are Proxy.Type "FemElementGeometry1D"
|
||||||
self.beam_sections = []
|
self.beam_sections = []
|
||||||
## @var fluid_sections
|
## @var fluid_sections
|
||||||
# set of fluid sections from the analysis. Updated with update_objects
|
# set of fluid sections from the analysis. Updated with update_objects
|
||||||
|
@ -302,7 +302,7 @@ class FemTools(QtCore.QRunnable, QtCore.QObject):
|
||||||
transform_constraint_dict = {}
|
transform_constraint_dict = {}
|
||||||
transform_constraint_dict['Object'] = m
|
transform_constraint_dict['Object'] = m
|
||||||
self.transform_constraints.append(transform_constraint_dict)
|
self.transform_constraints.append(transform_constraint_dict)
|
||||||
elif hasattr(m, "Proxy") and m.Proxy.Type == "FemBeamSection":
|
elif hasattr(m, "Proxy") and m.Proxy.Type == "FemElementGeometry1D":
|
||||||
beam_section_dict = {}
|
beam_section_dict = {}
|
||||||
beam_section_dict['Object'] = m
|
beam_section_dict['Object'] = m
|
||||||
self.beam_sections.append(beam_section_dict)
|
self.beam_sections.append(beam_section_dict)
|
||||||
|
|
|
@ -77,7 +77,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||||
<< "FEM_MaterialSolid"
|
<< "FEM_MaterialSolid"
|
||||||
<< "FEM_MaterialFluid"
|
<< "FEM_MaterialFluid"
|
||||||
<< "FEM_MaterialMechanicalNonlinear"
|
<< "FEM_MaterialMechanicalNonlinear"
|
||||||
<< "FEM_BeamSection"
|
<< "FEM_ElementGeometry1D"
|
||||||
<< "FEM_ShellThickness"
|
<< "FEM_ShellThickness"
|
||||||
<< "FEM_FluidSection"
|
<< "FEM_FluidSection"
|
||||||
<< "Separator"
|
<< "Separator"
|
||||||
|
@ -152,7 +152,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||||
<< "FEM_MaterialSolid"
|
<< "FEM_MaterialSolid"
|
||||||
<< "FEM_MaterialFluid"
|
<< "FEM_MaterialFluid"
|
||||||
<< "FEM_MaterialMechanicalNonlinear"
|
<< "FEM_MaterialMechanicalNonlinear"
|
||||||
<< "FEM_BeamSection"
|
<< "FEM_ElementGeometry1D"
|
||||||
<< "FEM_ShellThickness"
|
<< "FEM_ShellThickness"
|
||||||
<< "FEM_FluidSection"
|
<< "FEM_FluidSection"
|
||||||
<< "Separator"
|
<< "Separator"
|
||||||
|
|
|
@ -65,7 +65,7 @@ class FemWorkbench (Workbench):
|
||||||
import PyGui._CommandFemSolverZ88
|
import PyGui._CommandFemSolverZ88
|
||||||
|
|
||||||
import PyGui._CommandFemShellThickness
|
import PyGui._CommandFemShellThickness
|
||||||
import PyGui._CommandFemBeamSection
|
import PyGui._CommandFemElementGeometry1D
|
||||||
import PyGui._CommandFemFluidSection
|
import PyGui._CommandFemFluidSection
|
||||||
|
|
||||||
def GetClassName(self):
|
def GetClassName(self):
|
||||||
|
|
|
@ -261,12 +261,12 @@ def makeSolverZ88(name="Z88"):
|
||||||
|
|
||||||
########## element geometry definition objects ##########
|
########## element geometry definition objects ##########
|
||||||
# TODO object type not yet in object name, see forum topic http://forum.freecadweb.org/viewtopic.php?f=18&t=21029
|
# TODO object type not yet in object name, see forum topic http://forum.freecadweb.org/viewtopic.php?f=18&t=21029
|
||||||
def makeBeamSection(sectiontype='Rectangular', width=10.0, height=25.0, name="BeamSection"):
|
def makeElementGeometry1D(sectiontype='Rectangular', width=10.0, height=25.0, name="ElementGeometry1D"):
|
||||||
'''makeBeamSection([width], [height], [name]): creates an beamsection object to define a cross section'''
|
'''makeElementGeometry1D([width], [height], [name]): creates an 1D geometry element object to define a cross section'''
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||||
import PyObjects._FemBeamSection
|
import PyObjects._FemElementGeometry1D
|
||||||
PyObjects._FemBeamSection._FemBeamSection(obj)
|
PyObjects._FemElementGeometry1D._FemElementGeometry1D(obj)
|
||||||
sec_types = PyObjects._FemBeamSection._FemBeamSection.known_beam_types
|
sec_types = PyObjects._FemElementGeometry1D._FemElementGeometry1D.known_beam_types
|
||||||
if sectiontype not in sec_types:
|
if sectiontype not in sec_types:
|
||||||
FreeCAD.Console.PrintError("Section type is not known. Set to " + sec_types[0] + " \n")
|
FreeCAD.Console.PrintError("Section type is not known. Set to " + sec_types[0] + " \n")
|
||||||
obj.SectionType = sec_types[0]
|
obj.SectionType = sec_types[0]
|
||||||
|
@ -278,8 +278,8 @@ def makeBeamSection(sectiontype='Rectangular', width=10.0, height=25.0, name="Be
|
||||||
obj.PipeDiameter = height
|
obj.PipeDiameter = height
|
||||||
obj.PipeThickness = width
|
obj.PipeThickness = width
|
||||||
if FreeCAD.GuiUp:
|
if FreeCAD.GuiUp:
|
||||||
import PyGui._ViewProviderFemBeamSection
|
import PyGui._ViewProviderFemElementGeometry1D
|
||||||
PyGui._ViewProviderFemBeamSection._ViewProviderFemBeamSection(obj.ViewObject)
|
PyGui._ViewProviderFemElementGeometry1D._ViewProviderFemElementGeometry1D(obj.ViewObject)
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
# * *
|
# * *
|
||||||
# ***************************************************************************
|
# ***************************************************************************
|
||||||
|
|
||||||
__title__ = "_CommandBeamSection"
|
__title__ = "_CommandFemElementGeometry1D"
|
||||||
__author__ = "Bernd Hahnebach"
|
__author__ = "Bernd Hahnebach"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
## @package CommandFemBeamSection
|
## @package CommandFemElementGeometry1D
|
||||||
# \ingroup FEM
|
# \ingroup FEM
|
||||||
|
|
||||||
import FreeCAD
|
import FreeCAD
|
||||||
|
@ -33,20 +33,20 @@ import FreeCADGui
|
||||||
from PySide import QtCore
|
from PySide import QtCore
|
||||||
|
|
||||||
|
|
||||||
class _CommandFemBeamSection(FemCommands):
|
class _CommandFemElementGeometry1D(FemCommands):
|
||||||
"The FEM_BeamSection command definition"
|
"The Fem_ElementGeometry1D command definition"
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(_CommandFemBeamSection, self).__init__()
|
super(_CommandFemElementGeometry1D, self).__init__()
|
||||||
self.resources = {'Pixmap': 'fem-beam-section',
|
self.resources = {'Pixmap': 'fem-beam-section',
|
||||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_BeamSection", "Beam cross section"),
|
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_ElementGeometry1D", "Beam cross section"),
|
||||||
'Accel': "C, B",
|
'Accel': "C, B",
|
||||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_BeamSection", "Creates a FEM beam cross section")}
|
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_ElementGeometry1D", "Creates a FEM beam cross section")}
|
||||||
self.is_active = 'with_analysis'
|
self.is_active = 'with_analysis'
|
||||||
|
|
||||||
def Activated(self):
|
def Activated(self):
|
||||||
FreeCAD.ActiveDocument.openTransaction("Create FemBeamSection")
|
FreeCAD.ActiveDocument.openTransaction("Create FemElementGeometry1D")
|
||||||
FreeCADGui.addModule("ObjectsFem")
|
FreeCADGui.addModule("ObjectsFem")
|
||||||
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeBeamSection()]")
|
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeElementGeometry1D()]")
|
||||||
|
|
||||||
|
|
||||||
FreeCADGui.addCommand('FEM_BeamSection', _CommandFemBeamSection())
|
FreeCADGui.addCommand('FEM_ElementGeometry1D', _CommandFemElementGeometry1D())
|
|
@ -1,7 +1,7 @@
|
||||||
# ***************************************************************************
|
# ***************************************************************************
|
||||||
# * *
|
# * *
|
||||||
# * Copyright (c) 2016 - Ofentse Kgoa <kgoaot@eskom.co.za> *
|
# * Copyright (c) 2016 - Ofentse Kgoa <kgoaot@eskom.co.za> *
|
||||||
# * Based on the FemBeamSection by Bernd Hahnebach *
|
# * Based on the FemElementGeometry1D by Bernd Hahnebach *
|
||||||
# * *
|
# * *
|
||||||
# * This program is free software; you can redistribute it and/or modify *
|
# * This program is free software; you can redistribute it and/or modify *
|
||||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||||
|
|
|
@ -20,28 +20,28 @@
|
||||||
# * *
|
# * *
|
||||||
# ***************************************************************************
|
# ***************************************************************************
|
||||||
|
|
||||||
__title__ = "_TaskPanelFemBeamSection"
|
__title__ = "_TaskPanelFemElementGeometry1D"
|
||||||
__author__ = "Bernd Hahnebach"
|
__author__ = "Bernd Hahnebach"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
## @package TaskPanelFemBeamSection
|
## @package TaskPanelFemElementGeometry1D
|
||||||
# \ingroup FEM
|
# \ingroup FEM
|
||||||
|
|
||||||
import FreeCAD
|
import FreeCAD
|
||||||
import FreeCADGui
|
import FreeCADGui
|
||||||
from PySide import QtGui
|
from PySide import QtGui
|
||||||
from PySide import QtCore
|
from PySide import QtCore
|
||||||
import PyObjects._FemBeamSection
|
import PyObjects._FemElementGeometry1D
|
||||||
|
|
||||||
|
|
||||||
class _TaskPanelFemBeamSection:
|
class _TaskPanelFemElementGeometry1D:
|
||||||
'''The TaskPanel for editing References property of FemBeamSection objects'''
|
'''The TaskPanel for editing References property of FemElementGeometry1D objects'''
|
||||||
def __init__(self, obj):
|
def __init__(self, obj):
|
||||||
FreeCADGui.Selection.clearSelection()
|
FreeCADGui.Selection.clearSelection()
|
||||||
self.sel_server = None
|
self.sel_server = None
|
||||||
self.obj = obj
|
self.obj = obj
|
||||||
|
|
||||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemBeamSection.ui")
|
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemElementGeometry1D.ui")
|
||||||
QtCore.QObject.connect(self.form.cb_crosssectiontype, QtCore.SIGNAL("activated(int)"), self.sectiontype_changed)
|
QtCore.QObject.connect(self.form.cb_crosssectiontype, QtCore.SIGNAL("activated(int)"), self.sectiontype_changed)
|
||||||
QtCore.QObject.connect(self.form.if_rec_height, QtCore.SIGNAL("valueChanged(Base::Quantity)"), self.rec_height_changed)
|
QtCore.QObject.connect(self.form.if_rec_height, QtCore.SIGNAL("valueChanged(Base::Quantity)"), self.rec_height_changed)
|
||||||
QtCore.QObject.connect(self.form.if_rec_width, QtCore.SIGNAL("valueChanged(Base::Quantity)"), self.rec_width_changed)
|
QtCore.QObject.connect(self.form.if_rec_width, QtCore.SIGNAL("valueChanged(Base::Quantity)"), self.rec_width_changed)
|
||||||
|
@ -52,7 +52,7 @@ class _TaskPanelFemBeamSection:
|
||||||
self.form.list_References.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
self.form.list_References.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
||||||
self.form.list_References.connect(self.form.list_References, QtCore.SIGNAL("customContextMenuRequested(QPoint)"), self.references_list_right_clicked)
|
self.form.list_References.connect(self.form.list_References, QtCore.SIGNAL("customContextMenuRequested(QPoint)"), self.references_list_right_clicked)
|
||||||
|
|
||||||
self.form.cb_crosssectiontype.addItems(PyObjects._FemBeamSection._FemBeamSection.known_beam_types) # it is inside the class thus double _FemBeamSection
|
self.form.cb_crosssectiontype.addItems(PyObjects._FemElementGeometry1D._FemElementGeometry1D.known_beam_types) # it is inside the class thus double _FemElementGeometry1D
|
||||||
|
|
||||||
self.get_beamsection_props()
|
self.get_beamsection_props()
|
||||||
self.update()
|
self.update()
|
|
@ -1,7 +1,7 @@
|
||||||
# ***************************************************************************
|
# ***************************************************************************
|
||||||
# * *
|
# * *
|
||||||
# * Copyright (c) 2016 - Ofentse Kgoa <kgoaot@eskom.co.za> *
|
# * Copyright (c) 2016 - Ofentse Kgoa <kgoaot@eskom.co.za> *
|
||||||
# * Based on the FemBeamSection by Bernd Hahnebach *
|
# * Based on the FemElementGeometry1D by Bernd Hahnebach *
|
||||||
# * *
|
# * *
|
||||||
# * This program is free software; you can redistribute it and/or modify *
|
# * This program is free software; you can redistribute it and/or modify *
|
||||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
# * *
|
# * *
|
||||||
# ***************************************************************************
|
# ***************************************************************************
|
||||||
|
|
||||||
__title__ = "_ViewProviderFemBeamSection"
|
__title__ = "_ViewProviderFemElementGeometry1D"
|
||||||
__author__ = "Bernd Hahnebach"
|
__author__ = "Bernd Hahnebach"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
## @package ViewProviderFemBeamSection
|
## @package ViewProviderFemElementGeometry1D
|
||||||
# \ingroup FEM
|
# \ingroup FEM
|
||||||
|
|
||||||
import FreeCAD
|
import FreeCAD
|
||||||
|
@ -32,8 +32,8 @@ import FreeCADGui
|
||||||
from pivy import coin
|
from pivy import coin
|
||||||
|
|
||||||
|
|
||||||
class _ViewProviderFemBeamSection:
|
class _ViewProviderFemElementGeometry1D:
|
||||||
"A View Provider for the FemBeamSection object"
|
"A View Provider for the FemElementGeometry1D object"
|
||||||
def __init__(self, vobj):
|
def __init__(self, vobj):
|
||||||
vobj.Proxy = self
|
vobj.Proxy = self
|
||||||
|
|
||||||
|
@ -59,8 +59,8 @@ class _ViewProviderFemBeamSection:
|
||||||
return
|
return
|
||||||
|
|
||||||
def setEdit(self, vobj, mode=0):
|
def setEdit(self, vobj, mode=0):
|
||||||
import PyGui._TaskPanelFemBeamSection
|
import PyGui._TaskPanelFemElementGeometry1D
|
||||||
taskd = PyGui._TaskPanelFemBeamSection._TaskPanelFemBeamSection(self.Object)
|
taskd = PyGui._TaskPanelFemElementGeometry1D._TaskPanelFemElementGeometry1D(self.Object)
|
||||||
taskd.obj = vobj.Object
|
taskd.obj = vobj.Object
|
||||||
FreeCADGui.Control.showDialog(taskd)
|
FreeCADGui.Control.showDialog(taskd)
|
||||||
return True
|
return True
|
|
@ -1,7 +1,7 @@
|
||||||
# ***************************************************************************
|
# ***************************************************************************
|
||||||
# * *
|
# * *
|
||||||
# * Copyright (c) 2016 - Ofentse Kgoa <kgoaot@eskom.co.za> *
|
# * Copyright (c) 2016 - Ofentse Kgoa <kgoaot@eskom.co.za> *
|
||||||
# * Based on the FemBeamSection by Bernd Hahnebach *
|
# * Based on the FemElementGeometry1D by Bernd Hahnebach *
|
||||||
# * *
|
# * *
|
||||||
# * This program is free software; you can redistribute it and/or modify *
|
# * This program is free software; you can redistribute it and/or modify *
|
||||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||||
|
|
|
@ -20,16 +20,16 @@
|
||||||
# * *
|
# * *
|
||||||
# ***************************************************************************
|
# ***************************************************************************
|
||||||
|
|
||||||
__title__ = "_FemBeamSection"
|
__title__ = "FemElementGeometry1D"
|
||||||
__author__ = "Bernd Hahnebach"
|
__author__ = "Bernd Hahnebach"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
## @package FemBeamSection
|
## @package FemElementGeometry1D
|
||||||
# \ingroup FEM
|
# \ingroup FEM
|
||||||
|
|
||||||
|
|
||||||
class _FemBeamSection:
|
class _FemElementGeometry1D:
|
||||||
"The FemBeamSection object"
|
"The FemElementGeometry1D object"
|
||||||
|
|
||||||
known_beam_types = ['Rectangular', 'Circular', 'Pipe']
|
known_beam_types = ['Rectangular', 'Circular', 'Pipe']
|
||||||
|
|
||||||
|
@ -41,10 +41,10 @@ class _FemBeamSection:
|
||||||
obj.addProperty("App::PropertyLength", "PipeThickness", "PipeBeamSection", "set thickness of the pipe beam elements")
|
obj.addProperty("App::PropertyLength", "PipeThickness", "PipeBeamSection", "set thickness of the pipe beam elements")
|
||||||
obj.addProperty("App::PropertyEnumeration", "SectionType", "BeamSection", "select beam section type")
|
obj.addProperty("App::PropertyEnumeration", "SectionType", "BeamSection", "select beam section type")
|
||||||
obj.addProperty("App::PropertyLinkSubList", "References", "BeamSection", "List of beam section shapes")
|
obj.addProperty("App::PropertyLinkSubList", "References", "BeamSection", "List of beam section shapes")
|
||||||
obj.SectionType = _FemBeamSection.known_beam_types
|
obj.SectionType = _FemElementGeometry1D.known_beam_types
|
||||||
obj.SectionType = 'Rectangular'
|
obj.SectionType = 'Rectangular'
|
||||||
obj.Proxy = self
|
obj.Proxy = self
|
||||||
self.Type = "FemBeamSection"
|
self.Type = "FemElementGeometry1D"
|
||||||
|
|
||||||
def execute(self, obj):
|
def execute(self, obj):
|
||||||
return
|
return
|
|
@ -1,7 +1,7 @@
|
||||||
# ***************************************************************************
|
# ***************************************************************************
|
||||||
# * *
|
# * *
|
||||||
# * Copyright (c) 2016 - Ofentse Kgoa <kgoaot@eskom.co.za> *
|
# * Copyright (c) 2016 - Ofentse Kgoa <kgoaot@eskom.co.za> *
|
||||||
# * Based on the FemBeamSection by Bernd Hahnebach *
|
# * Based on the FemElementGeometry1D by Bernd Hahnebach *
|
||||||
# * *
|
# * *
|
||||||
# * This program is free software; you can redistribute it and/or modify *
|
# * This program is free software; you can redistribute it and/or modify *
|
||||||
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
# * it under the terms of the GNU Lesser General Public License (LGPL) *
|
||||||
|
|
Loading…
Reference in New Issue
Block a user