FEM: module moving, fix cmake, init, modulimports
This commit is contained in:
parent
7bfd50e482
commit
8944ae2fdb
|
@ -61,56 +61,6 @@ SET(Mod_SRCS
|
|||
SOURCE_GROUP("Module" FILES ${Mod_SRCS})
|
||||
|
||||
SET(FemScripts_SRCS
|
||||
_CommandAnalysis.py
|
||||
_CommandBeamSection.py
|
||||
_CommandClearMesh.py
|
||||
_CommandControlSolver.py
|
||||
_CommandConstraintSelfWeight.py
|
||||
_CommandFEMMesh2Mesh.py
|
||||
_CommandMaterialMechanicalNonlinear.py
|
||||
_CommandMaterialSolid.py
|
||||
_CommandMaterialFluid.py
|
||||
_CommandMeshGmshFromShape.py
|
||||
_CommandMeshNetgenFromShape.py
|
||||
_CommandMeshGroup.py
|
||||
_CommandMeshRegion.py
|
||||
_CommandPrintMeshInfo.py
|
||||
_CommandPurgeResults.py
|
||||
_CommandRunSolver.py
|
||||
_CommandShellThickness.py
|
||||
_CommandShowResult.py
|
||||
_CommandSolverCalculix.py
|
||||
_CommandSolverZ88.py
|
||||
_FemBeamSection.py
|
||||
_FemConstraintSelfWeight.py
|
||||
_FemMaterialMechanicalNonlinear.py
|
||||
_FemMeshGmsh.py
|
||||
_FemMeshGroup.py
|
||||
_FemMeshRegion.py
|
||||
_FemResultMechanical.py
|
||||
_FemShellThickness.py
|
||||
_FemSolverCalculix.py
|
||||
_FemSolverZ88.py
|
||||
_FemMaterial.py
|
||||
_TaskPanelFemBeamSection.py
|
||||
_TaskPanelFemMeshGmsh.py
|
||||
_TaskPanelFemMeshGroup.py
|
||||
_TaskPanelFemMeshRegion.py
|
||||
_TaskPanelFemShellThickness.py
|
||||
_TaskPanelFemSolverCalculix.py
|
||||
_TaskPanelFemMaterial.py
|
||||
_TaskPanelShowResult.py
|
||||
_ViewProviderFemBeamSection.py
|
||||
_ViewProviderFemConstraintSelfWeight.py
|
||||
_ViewProviderFemMaterialMechanicalNonlinear.py
|
||||
_ViewProviderFemMeshGmsh.py
|
||||
_ViewProviderFemMeshGroup.py
|
||||
_ViewProviderFemMeshRegion.py
|
||||
_ViewProviderFemResultMechanical.py
|
||||
_ViewProviderFemShellThickness.py
|
||||
_ViewProviderFemSolverCalculix.py
|
||||
_ViewProviderFemSolverZ88.py
|
||||
_ViewProviderFemMaterial.py
|
||||
convert2TetGen.py
|
||||
importCcxDatResults.py
|
||||
importCcxFrdResults.py
|
||||
|
@ -120,7 +70,6 @@ SET(FemScripts_SRCS
|
|||
importZ88O2Results.py
|
||||
Init.py
|
||||
InitGui.py
|
||||
FemCommands.py
|
||||
FemGmshTools.py
|
||||
FemInputWriter.py
|
||||
FemInputWriterCcx.py
|
||||
|
@ -133,17 +82,76 @@ SET(FemScripts_SRCS
|
|||
FemToolsZ88.py
|
||||
ObjectsFem.py
|
||||
TestFem.py
|
||||
TaskPanelFemBeamSection.ui
|
||||
TaskPanelFemMeshGmsh.ui
|
||||
TaskPanelFemMeshGroup.ui
|
||||
TaskPanelFemMeshRegion.ui
|
||||
TaskPanelFemShellThickness.ui
|
||||
TaskPanelFemSolverCalculix.ui
|
||||
TaskPanelFemMaterial.ui
|
||||
TaskPanelShowResult.ui
|
||||
)
|
||||
#SOURCE_GROUP("Scripts" FILES ${FemScripts_SRCS})
|
||||
|
||||
SET(FemObjectsScripts_SRCS
|
||||
#PyObjects/__init__.py
|
||||
PyObjects/_FemBeamSection.py
|
||||
PyObjects/_FemConstraintSelfWeight.py
|
||||
PyObjects/_FemMaterialMechanicalNonlinear.py
|
||||
PyObjects/_FemMeshGmsh.py
|
||||
PyObjects/_FemMeshGroup.py
|
||||
PyObjects/_FemMeshRegion.py
|
||||
PyObjects/_FemResultMechanical.py
|
||||
PyObjects/_FemShellThickness.py
|
||||
PyObjects/_FemSolverCalculix.py
|
||||
PyObjects/_FemSolverZ88.py
|
||||
PyObjects/_FemMaterial.py
|
||||
)
|
||||
|
||||
SET(FemGuiScripts_SRCS
|
||||
PyGui/FemCommands.py
|
||||
#PyGui/__init__.py
|
||||
PyGui/_CommandAnalysis.py
|
||||
PyGui/_CommandBeamSection.py
|
||||
PyGui/_CommandClearMesh.py
|
||||
PyGui/_CommandControlSolver.py
|
||||
PyGui/_CommandConstraintSelfWeight.py
|
||||
PyGui/_CommandFEMMesh2Mesh.py
|
||||
PyGui/_CommandMaterialMechanicalNonlinear.py
|
||||
PyGui/_CommandMaterialSolid.py
|
||||
PyGui/_CommandMaterialFluid.py
|
||||
PyGui/_CommandMeshGmshFromShape.py
|
||||
PyGui/_CommandMeshNetgenFromShape.py
|
||||
PyGui/_CommandMeshGroup.py
|
||||
PyGui/_CommandMeshRegion.py
|
||||
PyGui/_CommandPrintMeshInfo.py
|
||||
PyGui/_CommandPurgeResults.py
|
||||
PyGui/_CommandRunSolver.py
|
||||
PyGui/_CommandShellThickness.py
|
||||
PyGui/_CommandShowResult.py
|
||||
PyGui/_CommandSolverCalculix.py
|
||||
PyGui/_CommandSolverZ88.py
|
||||
PyGui/_TaskPanelFemBeamSection.py
|
||||
PyGui/_TaskPanelFemMeshGmsh.py
|
||||
PyGui/_TaskPanelFemMeshGroup.py
|
||||
PyGui/_TaskPanelFemMeshRegion.py
|
||||
PyGui/_TaskPanelFemShellThickness.py
|
||||
PyGui/_TaskPanelFemSolverCalculix.py
|
||||
PyGui/_TaskPanelFemMaterial.py
|
||||
PyGui/_TaskPanelShowResult.py
|
||||
PyGui/_ViewProviderFemBeamSection.py
|
||||
PyGui/_ViewProviderFemConstraintSelfWeight.py
|
||||
PyGui/_ViewProviderFemMaterialMechanicalNonlinear.py
|
||||
PyGui/_ViewProviderFemMeshGmsh.py
|
||||
PyGui/_ViewProviderFemMeshGroup.py
|
||||
PyGui/_ViewProviderFemMeshRegion.py
|
||||
PyGui/_ViewProviderFemResultMechanical.py
|
||||
PyGui/_ViewProviderFemShellThickness.py
|
||||
PyGui/_ViewProviderFemSolverCalculix.py
|
||||
PyGui/_ViewProviderFemSolverZ88.py
|
||||
PyGui/_ViewProviderFemMaterial.py
|
||||
PyGui/TaskPanelFemBeamSection.ui
|
||||
PyGui/TaskPanelFemMeshGmsh.ui
|
||||
PyGui/TaskPanelFemMeshGroup.ui
|
||||
PyGui/TaskPanelFemMeshRegion.ui
|
||||
PyGui/TaskPanelFemShellThickness.ui
|
||||
PyGui/TaskPanelFemSolverCalculix.ui
|
||||
PyGui/TaskPanelFemMaterial.ui
|
||||
PyGui/TaskPanelShowResult.ui
|
||||
)
|
||||
|
||||
SET(FemTests_SRCS
|
||||
test_files/ccx/mesh_points.csv
|
||||
test_files/ccx/mesh_volumes.csv
|
||||
|
@ -272,6 +280,8 @@ fc_target_copy_resource(Fem
|
|||
${CMAKE_BINARY_DIR}/Mod/Fem
|
||||
Init.py
|
||||
${FemScripts_SRCS}
|
||||
${FemObjectsScripts_SRCS}
|
||||
${FemGuiScripts_SRCS}
|
||||
${FemTests_SRCS}
|
||||
)
|
||||
|
||||
|
|
|
@ -14,115 +14,107 @@ if(BUILD_GUI)
|
|||
add_subdirectory(Gui)
|
||||
endif(BUILD_GUI)
|
||||
|
||||
# changes on the file list here needs to be made in App/CMakeLists.txt as well
|
||||
INSTALL(
|
||||
FILES
|
||||
# changes on the file list here needs to be made in App/CMakeLists.txt as well
|
||||
Init.py
|
||||
InitGui.py
|
||||
ObjectsFem.py
|
||||
|
||||
convert2TetGen.py
|
||||
|
||||
FemSelectionObserver.py
|
||||
FemMeshTools.py
|
||||
FemTools.py
|
||||
FemInputWriter.py
|
||||
TestFem.py
|
||||
|
||||
FemCommands.py
|
||||
_CommandClearMesh.py
|
||||
_CommandMeshNetgenFromShape.py
|
||||
_CommandPrintMeshInfo.py
|
||||
_CommandPurgeResults.py
|
||||
_CommandRunSolver.py
|
||||
_CommandControlSolver.py
|
||||
|
||||
_FemResultMechanical.py
|
||||
_ViewProviderFemResultMechanical.py
|
||||
_CommandShowResult.py
|
||||
_TaskPanelShowResult.py
|
||||
TaskPanelShowResult.ui
|
||||
|
||||
_CommandAnalysis.py
|
||||
|
||||
_FemMeshGmsh.py
|
||||
_ViewProviderFemMeshGmsh.py
|
||||
_CommandMeshGmshFromShape.py
|
||||
_TaskPanelFemMeshGmsh.py
|
||||
TaskPanelFemMeshGmsh.ui
|
||||
|
||||
FemGmshTools.py
|
||||
|
||||
FemMesh2Mesh.py
|
||||
_CommandFEMMesh2Mesh.py
|
||||
|
||||
_FemMeshGroup.py
|
||||
_ViewProviderFemMeshGroup.py
|
||||
_CommandMeshGroup.py
|
||||
_TaskPanelFemMeshGroup.py
|
||||
TaskPanelFemMeshGroup.ui
|
||||
|
||||
_FemMeshRegion.py
|
||||
_ViewProviderFemMeshRegion.py
|
||||
_CommandMeshRegion.py
|
||||
_TaskPanelFemMeshRegion.py
|
||||
TaskPanelFemMeshRegion.ui
|
||||
|
||||
_FemBeamSection.py
|
||||
_ViewProviderFemBeamSection.py
|
||||
_CommandBeamSection.py
|
||||
_TaskPanelFemBeamSection.py
|
||||
TaskPanelFemBeamSection.ui
|
||||
|
||||
_FemShellThickness.py
|
||||
_ViewProviderFemShellThickness.py
|
||||
_CommandShellThickness.py
|
||||
_TaskPanelFemShellThickness.py
|
||||
TaskPanelFemShellThickness.ui
|
||||
|
||||
_FemConstraintSelfWeight.py
|
||||
_ViewProviderFemConstraintSelfWeight.py
|
||||
_CommandConstraintSelfWeight.py
|
||||
|
||||
_FemMaterial.py
|
||||
_ViewProviderFemMaterial.py
|
||||
_CommandMaterialSolid.py
|
||||
_CommandMaterialFluid.py
|
||||
_TaskPanelFemMaterial.py
|
||||
TaskPanelFemMaterial.ui
|
||||
|
||||
_FemMaterialMechanicalNonlinear.py
|
||||
_ViewProviderFemMaterialMechanicalNonlinear.py
|
||||
_CommandMaterialMechanicalNonlinear.py
|
||||
|
||||
# solver CalculiX ccx
|
||||
importInpMesh.py
|
||||
importCcxDatResults.py
|
||||
importCcxFrdResults.py
|
||||
FemInputWriterCcx.py
|
||||
FemToolsCcx.py
|
||||
_FemSolverCalculix.py
|
||||
_ViewProviderFemSolverCalculix.py
|
||||
_CommandSolverCalculix.py
|
||||
_TaskPanelFemSolverCalculix.py
|
||||
TaskPanelFemSolverCalculix.ui
|
||||
|
||||
# solver Z88
|
||||
importInpMesh.py
|
||||
importVTKResults.py
|
||||
importZ88Mesh.py
|
||||
importZ88O2Results.py
|
||||
Init.py
|
||||
InitGui.py
|
||||
FemGmshTools.py
|
||||
FemInputWriter.py
|
||||
FemInputWriterCcx.py
|
||||
FemInputWriterZ88.py
|
||||
FemMesh2Mesh.py
|
||||
FemMeshTools.py
|
||||
FemSelectionObserver.py
|
||||
FemTools.py
|
||||
FemToolsCcx.py
|
||||
FemToolsZ88.py
|
||||
_FemSolverZ88.py
|
||||
_ViewProviderFemSolverZ88.py
|
||||
_CommandSolverZ88.py
|
||||
|
||||
# additional imports and exports
|
||||
importVTKResults.py
|
||||
|
||||
ObjectsFem.py
|
||||
TestFem.py
|
||||
DESTINATION
|
||||
Mod/Fem
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
PyObjects/__init__.py
|
||||
PyObjects/_FemBeamSection.py
|
||||
PyObjects/_FemConstraintSelfWeight.py
|
||||
PyObjects/_FemMaterialMechanicalNonlinear.py
|
||||
PyObjects/_FemMeshGmsh.py
|
||||
PyObjects/_FemMeshGroup.py
|
||||
PyObjects/_FemMeshRegion.py
|
||||
PyObjects/_FemResultMechanical.py
|
||||
PyObjects/_FemShellThickness.py
|
||||
PyObjects/_FemSolverCalculix.py
|
||||
PyObjects/_FemSolverZ88.py
|
||||
PyObjects/_FemMaterial.py
|
||||
DESTINATION
|
||||
Mod/Fem/PyObjects
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
PyGui/FemCommands.py
|
||||
PyGui/__init__.py
|
||||
PyGui/_CommandAnalysis.py
|
||||
PyGui/_CommandBeamSection.py
|
||||
PyGui/_CommandClearMesh.py
|
||||
PyGui/_CommandControlSolver.py
|
||||
PyGui/_CommandConstraintSelfWeight.py
|
||||
PyGui/_CommandFEMMesh2Mesh.py
|
||||
PyGui/_CommandMaterialMechanicalNonlinear.py
|
||||
PyGui/_CommandMaterialSolid.py
|
||||
PyGui/_CommandMaterialFluid.py
|
||||
PyGui/_CommandMeshGmshFromShape.py
|
||||
PyGui/_CommandMeshNetgenFromShape.py
|
||||
PyGui/_CommandMeshGroup.py
|
||||
PyGui/_CommandMeshRegion.py
|
||||
PyGui/_CommandPrintMeshInfo.py
|
||||
PyGui/_CommandPurgeResults.py
|
||||
PyGui/_CommandRunSolver.py
|
||||
PyGui/_CommandShellThickness.py
|
||||
PyGui/_CommandShowResult.py
|
||||
PyGui/_CommandSolverCalculix.py
|
||||
PyGui/_CommandSolverZ88.py
|
||||
PyGui/_TaskPanelFemBeamSection.py
|
||||
PyGui/_TaskPanelFemMeshGmsh.py
|
||||
PyGui/_TaskPanelFemMeshGroup.py
|
||||
PyGui/_TaskPanelFemMeshRegion.py
|
||||
PyGui/_TaskPanelFemShellThickness.py
|
||||
PyGui/_TaskPanelFemSolverCalculix.py
|
||||
PyGui/_TaskPanelFemMaterial.py
|
||||
PyGui/_TaskPanelShowResult.py
|
||||
PyGui/_ViewProviderFemBeamSection.py
|
||||
PyGui/_ViewProviderFemConstraintSelfWeight.py
|
||||
PyGui/_ViewProviderFemMaterialMechanicalNonlinear.py
|
||||
PyGui/_ViewProviderFemMeshGmsh.py
|
||||
PyGui/_ViewProviderFemMeshGroup.py
|
||||
PyGui/_ViewProviderFemMeshRegion.py
|
||||
PyGui/_ViewProviderFemResultMechanical.py
|
||||
PyGui/_ViewProviderFemShellThickness.py
|
||||
PyGui/_ViewProviderFemSolverCalculix.py
|
||||
PyGui/_ViewProviderFemSolverZ88.py
|
||||
PyGui/_ViewProviderFemMaterial.py
|
||||
PyGui/TaskPanelFemBeamSection.ui
|
||||
PyGui/TaskPanelFemMeshGmsh.ui
|
||||
PyGui/TaskPanelFemMeshGroup.ui
|
||||
PyGui/TaskPanelFemMeshRegion.ui
|
||||
PyGui/TaskPanelFemShellThickness.ui
|
||||
PyGui/TaskPanelFemSolverCalculix.ui
|
||||
PyGui/TaskPanelFemMaterial.ui
|
||||
PyGui/TaskPanelShowResult.ui
|
||||
DESTINATION
|
||||
Mod/Fem/PyGui
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
# changes on the file list here needs to be made in App/CMakeLists.txt as well
|
||||
|
|
|
@ -45,26 +45,26 @@ class FemWorkbench (Workbench):
|
|||
import Fem
|
||||
import FemGui
|
||||
|
||||
import _CommandShowResult
|
||||
import _CommandRunSolver
|
||||
import _CommandPurgeResults
|
||||
import _CommandClearMesh
|
||||
import _CommandPrintMeshInfo
|
||||
import _CommandControlSolver
|
||||
import _CommandFEMMesh2Mesh
|
||||
import _CommandMeshGmshFromShape
|
||||
import _CommandMeshNetgenFromShape
|
||||
import _CommandMeshGroup
|
||||
import _CommandMeshRegion
|
||||
import _CommandAnalysis
|
||||
import _CommandShellThickness
|
||||
import _CommandBeamSection
|
||||
import _CommandMaterialSolid
|
||||
import _CommandMaterialFluid
|
||||
import _CommandMaterialMechanicalNonlinear
|
||||
import _CommandSolverCalculix
|
||||
import _CommandSolverZ88
|
||||
import _CommandConstraintSelfWeight
|
||||
import PyGui._CommandShowResult
|
||||
import PyGui._CommandRunSolver
|
||||
import PyGui._CommandPurgeResults
|
||||
import PyGui._CommandClearMesh
|
||||
import PyGui._CommandPrintMeshInfo
|
||||
import PyGui._CommandControlSolver
|
||||
import PyGui._CommandFEMMesh2Mesh
|
||||
import PyGui._CommandMeshGmshFromShape
|
||||
import PyGui._CommandMeshNetgenFromShape
|
||||
import PyGui._CommandMeshGroup
|
||||
import PyGui._CommandMeshRegion
|
||||
import PyGui._CommandAnalysis
|
||||
import PyGui._CommandShellThickness
|
||||
import PyGui._CommandBeamSection
|
||||
import PyGui._CommandMaterialSolid
|
||||
import PyGui._CommandMaterialFluid
|
||||
import PyGui._CommandMaterialMechanicalNonlinear
|
||||
import PyGui._CommandSolverCalculix
|
||||
import PyGui._CommandSolverZ88
|
||||
import PyGui._CommandConstraintSelfWeight
|
||||
|
||||
def GetClassName(self):
|
||||
return "FemGui::Workbench"
|
||||
|
|
|
@ -41,22 +41,22 @@ def makeAnalysis(name="Analysis"):
|
|||
def makeSolverCalculix(name="CalculiX"):
|
||||
'''makeSolverCalculix(name): makes a Calculix solver object'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FemSolverObjectPython", name)
|
||||
import _FemSolverCalculix
|
||||
_FemSolverCalculix._FemSolverCalculix(obj)
|
||||
import PyObjects._FemSolverCalculix
|
||||
PyObjects._FemSolverCalculix._FemSolverCalculix(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemSolverCalculix
|
||||
_ViewProviderFemSolverCalculix._ViewProviderFemSolverCalculix(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemSolverCalculix
|
||||
PyGui._ViewProviderFemSolverCalculix._ViewProviderFemSolverCalculix(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
def makeSolverZ88(name="Z88"):
|
||||
'''makeSolverZ88(name): makes a Z88 solver object'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FemSolverObjectPython", name)
|
||||
import _FemSolverZ88
|
||||
_FemSolverZ88._FemSolverZ88(obj)
|
||||
import PyObjects._FemSolverZ88
|
||||
PyObjects._FemSolverZ88._FemSolverZ88(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemSolverZ88
|
||||
_ViewProviderFemSolverZ88._ViewProviderFemSolverZ88(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemSolverZ88
|
||||
PyGui._ViewProviderFemSolverZ88._ViewProviderFemSolverZ88(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
|
@ -64,9 +64,9 @@ def makeSolverZ88(name="Z88"):
|
|||
def makeBeamSection(sectiontype='Rectangular', width=10.0, height=25.0, name="BeamSection"):
|
||||
'''makeBeamSection([width], [height], [name]): creates an beamsection object to define a cross section'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
import _FemBeamSection
|
||||
_FemBeamSection._FemBeamSection(obj)
|
||||
sec_types = _FemBeamSection._FemBeamSection.known_beam_types
|
||||
import PyObjects._FemBeamSection
|
||||
PyObjects._FemBeamSection._FemBeamSection(obj)
|
||||
sec_types = PyObjects._FemBeamSection._FemBeamSection.known_beam_types
|
||||
if sectiontype not in sec_types:
|
||||
FreeCAD.Console.PrintError("Section type is not known. Set to " + sec_types[0] + " \n")
|
||||
obj.SectionType = sec_types[0]
|
||||
|
@ -78,20 +78,20 @@ def makeBeamSection(sectiontype='Rectangular', width=10.0, height=25.0, name="Be
|
|||
obj.PipeDiameter = height
|
||||
obj.PipeThickness = width
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemBeamSection
|
||||
_ViewProviderFemBeamSection._ViewProviderFemBeamSection(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemBeamSection
|
||||
PyGui._ViewProviderFemBeamSection._ViewProviderFemBeamSection(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
def makeShellThickness(thickness=20.0, name="ShellThickness"):
|
||||
'''makeShellThickness([thickness], [name]): creates an shellthickness object to define a plate thickness'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
import _FemShellThickness
|
||||
_FemShellThickness._FemShellThickness(obj)
|
||||
import PyObjects._FemShellThickness
|
||||
PyObjects._FemShellThickness._FemShellThickness(obj)
|
||||
obj.Thickness = thickness
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemShellThickness
|
||||
_ViewProviderFemShellThickness._ViewProviderFemShellThickness(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemShellThickness
|
||||
PyGui._ViewProviderFemShellThickness._ViewProviderFemShellThickness(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
|
@ -99,12 +99,12 @@ def makeShellThickness(thickness=20.0, name="ShellThickness"):
|
|||
def makeMaterialSolid(name="MechanicalSolidMaterial"):
|
||||
'''makeMaterialSolid(name): makes an FEM Material for solid'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("App::MaterialObjectPython", name)
|
||||
import _FemMaterial
|
||||
_FemMaterial._FemMaterial(obj)
|
||||
import PyObjects._FemMaterial
|
||||
PyObjects._FemMaterial._FemMaterial(obj)
|
||||
obj.Category = 'Solid'
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemMaterial
|
||||
_ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemMaterial
|
||||
PyGui._ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject)
|
||||
# FreeCAD.ActiveDocument.recompute()
|
||||
return obj
|
||||
|
||||
|
@ -112,12 +112,12 @@ def makeMaterialSolid(name="MechanicalSolidMaterial"):
|
|||
def makeMaterialFluid(name="FluidMaterial"):
|
||||
'''makeMaterialFluid(name): makes an FEM Material for fluid'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("App::MaterialObjectPython", name)
|
||||
import _FemMaterial
|
||||
_FemMaterial._FemMaterial(obj)
|
||||
import PyObjects._FemMaterial
|
||||
PyObjects._FemMaterial._FemMaterial(obj)
|
||||
obj.Category = 'Fluid'
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemMaterial
|
||||
_ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemMaterial
|
||||
PyGui._ViewProviderFemMaterial._ViewProviderFemMaterial(obj.ViewObject)
|
||||
# FreeCAD.ActiveDocument.recompute()
|
||||
return obj
|
||||
|
||||
|
@ -125,12 +125,12 @@ def makeMaterialFluid(name="FluidMaterial"):
|
|||
def makeMaterialMechanicalNonlinear(base_material, name="MechanicalMaterialNonlinear"):
|
||||
'''makeMaterialMechanicalNonlinear(base_material, [name]): creates an nonlinear material object'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
import _FemMaterialMechanicalNonlinear
|
||||
_FemMaterialMechanicalNonlinear._FemMaterialMechanicalNonlinear(obj)
|
||||
import PyObjects._FemMaterialMechanicalNonlinear
|
||||
PyObjects._FemMaterialMechanicalNonlinear._FemMaterialMechanicalNonlinear(obj)
|
||||
obj.LinearBaseMaterial = base_material
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemMaterialMechanicalNonlinear
|
||||
_ViewProviderFemMaterialMechanicalNonlinear._ViewProviderFemMaterialMechanicalNonlinear(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemMaterialMechanicalNonlinear
|
||||
PyGui._ViewProviderFemMaterialMechanicalNonlinear._ViewProviderFemMaterialMechanicalNonlinear(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
|
@ -138,11 +138,11 @@ def makeMaterialMechanicalNonlinear(base_material, name="MechanicalMaterialNonli
|
|||
def makeResultMechanical(name="MechanicalResult"):
|
||||
'''makeResultMechanical(name): creates an mechanical result object to hold FEM results'''
|
||||
obj = FreeCAD.ActiveDocument.addObject('Fem::FemResultObjectPython', name)
|
||||
import _FemResultMechanical
|
||||
_FemResultMechanical._FemResultMechanical(obj)
|
||||
import PyObjects._FemResultMechanical
|
||||
PyObjects._FemResultMechanical._FemResultMechanical(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
from _ViewProviderFemResultMechanical import _ViewProviderFemResultMechanical
|
||||
_ViewProviderFemResultMechanical(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemResultMechanical
|
||||
PyGui._ViewProviderFemResultMechanical._ViewProviderFemResultMechanical(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
|
@ -222,11 +222,11 @@ def makeConstraintPulley(name="ConstraintPulley"):
|
|||
def makeConstraintSelfWeight(name="ConstraintSelfWeight"):
|
||||
'''makeConstraintSelfWeight([name]): creates an self weight object to define a gravity load'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
import _FemConstraintSelfWeight
|
||||
_FemConstraintSelfWeight._FemConstraintSelfWeight(obj)
|
||||
import PyObjects._FemConstraintSelfWeight
|
||||
PyObjects._FemConstraintSelfWeight._FemConstraintSelfWeight(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemConstraintSelfWeight
|
||||
_ViewProviderFemConstraintSelfWeight._ViewProviderFemConstraintSelfWeight(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemConstraintSelfWeight
|
||||
PyGui._ViewProviderFemConstraintSelfWeight._ViewProviderFemConstraintSelfWeight(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
|
@ -252,19 +252,19 @@ def makeMeshShapeNetgenObject(name="MeshShapeNetgenObject"):
|
|||
def makeMeshGmsh(name="FEMMeshGMSH"):
|
||||
'''makeMeshGmsh(name): makes a GMSH FEM mesh object'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FemMeshObjectPython", name)
|
||||
import _FemMeshGmsh
|
||||
_FemMeshGmsh._FemMeshGmsh(obj)
|
||||
import PyObjects._FemMeshGmsh
|
||||
PyObjects._FemMeshGmsh._FemMeshGmsh(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemMeshGmsh
|
||||
_ViewProviderFemMeshGmsh._ViewProviderFemMeshGmsh(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemMeshGmsh
|
||||
PyGui._ViewProviderFemMeshGmsh._ViewProviderFemMeshGmsh(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
def makeMeshGroup(base_mesh, use_label=False, name="FEMMeshGroup"):
|
||||
'''makeMeshGroup([length], [name]): creates a FEM mesh region object to define properties for a regon of a FEM mesh'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
import _FemMeshGroup
|
||||
_FemMeshGroup._FemMeshGroup(obj)
|
||||
import PyObjects._FemMeshGroup
|
||||
PyObjects._FemMeshGroup._FemMeshGroup(obj)
|
||||
obj.UseLabel = use_label
|
||||
# obj.BaseMesh = base_mesh
|
||||
# App::PropertyLinkList does not support append, we will use a temporary list to append the mesh group obj. to the list
|
||||
|
@ -272,16 +272,16 @@ def makeMeshGroup(base_mesh, use_label=False, name="FEMMeshGroup"):
|
|||
tmplist.append(obj)
|
||||
base_mesh.MeshGroupList = tmplist
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemMeshGroup
|
||||
_ViewProviderFemMeshGroup._ViewProviderFemMeshGroup(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemMeshGroup
|
||||
PyGui._ViewProviderFemMeshGroup._ViewProviderFemMeshGroup(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
def makeMeshRegion(base_mesh, element_length=0.0, name="FEMMeshRegion"):
|
||||
'''makeMeshRegion([length], [name]): creates a FEM mesh region object to define properties for a regon of a FEM mesh'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
import _FemMeshRegion
|
||||
_FemMeshRegion._FemMeshRegion(obj)
|
||||
import PyObjects._FemMeshRegion
|
||||
PyObjects._FemMeshRegion._FemMeshRegion(obj)
|
||||
obj.CharacteristicLength = element_length
|
||||
# obj.BaseMesh = base_mesh
|
||||
# App::PropertyLinkList does not support append, we will use a temporary list to append the mesh region obj. to the list
|
||||
|
@ -289,8 +289,8 @@ def makeMeshRegion(base_mesh, element_length=0.0, name="FEMMeshRegion"):
|
|||
tmplist.append(obj)
|
||||
base_mesh.MeshRegionList = tmplist
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemMeshRegion
|
||||
_ViewProviderFemMeshRegion._ViewProviderFemMeshRegion(obj.ViewObject)
|
||||
import PyGui._ViewProviderFemMeshRegion
|
||||
PyGui._ViewProviderFemMeshRegion._ViewProviderFemMeshRegion(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import FreeCAD
|
|||
import FreeCADGui
|
||||
from PySide import QtGui
|
||||
from PySide import QtCore
|
||||
import _FemBeamSection
|
||||
import PyObjects._FemBeamSection
|
||||
|
||||
|
||||
class _TaskPanelFemBeamSection:
|
||||
|
@ -41,7 +41,7 @@ class _TaskPanelFemBeamSection:
|
|||
self.sel_server = None
|
||||
self.obj = obj
|
||||
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelFemBeamSection.ui")
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemBeamSection.ui")
|
||||
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_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.connect(self.form.list_References, QtCore.SIGNAL("customContextMenuRequested(QPoint)"), self.references_list_right_clicked)
|
||||
|
||||
self.form.cb_crosssectiontype.addItems(_FemBeamSection._FemBeamSection.known_beam_types)
|
||||
self.form.cb_crosssectiontype.addItems(PyObjects._FemBeamSection._FemBeamSection.known_beam_types) # it is inside the class thus double _FemBeamSection
|
||||
|
||||
self.get_beamsection_props()
|
||||
self.update()
|
||||
|
|
|
@ -52,7 +52,7 @@ class _TaskPanelFemMaterial:
|
|||
self.get_references()
|
||||
self.references_shape_type = None
|
||||
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelFemMaterial.ui")
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemMaterial.ui")
|
||||
QtCore.QObject.connect(self.form.pushButton_MatWeb, QtCore.SIGNAL("clicked()"), self.goto_MatWeb)
|
||||
QtCore.QObject.connect(self.form.pushButton_saveas, QtCore.SIGNAL("clicked()"), self.export_material)
|
||||
QtCore.QObject.connect(self.form.cb_materials, QtCore.SIGNAL("activated(int)"), self.choose_material)
|
||||
|
|
|
@ -41,7 +41,7 @@ class _TaskPanelFemMeshGmsh:
|
|||
'''The TaskPanel for editing References property of FemMeshGmsh objects and creation of new FEM mesh'''
|
||||
def __init__(self, obj):
|
||||
self.mesh_obj = obj
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelFemMeshGmsh.ui")
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemMeshGmsh.ui")
|
||||
|
||||
self.Timer = QtCore.QTimer()
|
||||
self.Timer.start(100) # 100 milli seconds
|
||||
|
|
|
@ -43,7 +43,7 @@ class _TaskPanelFemMeshGroup:
|
|||
self.selection_mode_std_print_message = "Select Faces, Edges and Vertices by single click on them to add them to the list."
|
||||
self.selection_mode_solid_print_message = "Select Solids by single click on a Face or Edge which belongs to the Solid, to add the Solid to the list."
|
||||
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelFemMeshGroup.ui")
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemMeshGroup.ui")
|
||||
QtCore.QObject.connect(self.form.rb_name, QtCore.SIGNAL("toggled(bool)"), self.choose_exportidentifier_name)
|
||||
QtCore.QObject.connect(self.form.rb_label, QtCore.SIGNAL("toggled(bool)"), self.choose_exportidentifier_label)
|
||||
QtCore.QObject.connect(self.form.rb_standard, QtCore.SIGNAL("toggled(bool)"), self.choose_selection_mode_standard)
|
||||
|
|
|
@ -43,7 +43,7 @@ class _TaskPanelFemMeshRegion:
|
|||
self.selection_mode_std_print_message = "Select Faces, Edges and Vertices by single click on them to add them to the list."
|
||||
self.selection_mode_solid_print_message = "Select Solids by single click on a Face or Edge which belongs to the Solid, to add the Solid to the list."
|
||||
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelFemMeshRegion.ui")
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemMeshRegion.ui")
|
||||
QtCore.QObject.connect(self.form.if_elelen, QtCore.SIGNAL("valueChanged(Base::Quantity)"), self.elelen_changed)
|
||||
QtCore.QObject.connect(self.form.rb_standard, QtCore.SIGNAL("toggled(bool)"), self.choose_selection_mode_standard)
|
||||
QtCore.QObject.connect(self.form.rb_solid, QtCore.SIGNAL("toggled(bool)"), self.choose_selection_mode_solid)
|
||||
|
|
|
@ -40,7 +40,7 @@ class _TaskPanelFemShellThickness:
|
|||
self.sel_server = None
|
||||
self.obj = obj
|
||||
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelFemShellThickness.ui")
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemShellThickness.ui")
|
||||
QtCore.QObject.connect(self.form.if_thickness, QtCore.SIGNAL("valueChanged(Base::Quantity)"), self.thickness_changed)
|
||||
QtCore.QObject.connect(self.form.pushButton_Reference, QtCore.SIGNAL("clicked()"), self.add_references)
|
||||
self.form.list_References.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
|
||||
|
|
|
@ -40,7 +40,7 @@ from PySide.QtGui import QApplication
|
|||
|
||||
class _TaskPanelFemSolverCalculix:
|
||||
def __init__(self, solver_object):
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelFemSolverCalculix.ui")
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelFemSolverCalculix.ui")
|
||||
self.ccx_prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem/Ccx")
|
||||
ccx_binary = self.ccx_prefs.GetString("ccxBinaryPath", "")
|
||||
if ccx_binary:
|
||||
|
|
|
@ -45,7 +45,7 @@ class _TaskPanelShowResult:
|
|||
# task panel should be started by use of setEdit of view provider
|
||||
# in view provider checks: Mesh, active analysis and if Mesh and result are in active analysis
|
||||
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelShowResult.ui")
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/PyGui/TaskPanelShowResult.ui")
|
||||
self.fem_prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem/General")
|
||||
self.restore_result_settings_in_dialog = self.fem_prefs.GetBool("RestoreResultDialog", True)
|
||||
|
||||
|
|
|
@ -59,8 +59,8 @@ class _ViewProviderFemBeamSection:
|
|||
return
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
import _TaskPanelFemBeamSection
|
||||
taskd = _TaskPanelFemBeamSection._TaskPanelFemBeamSection(self.Object)
|
||||
import PyGui._TaskPanelFemBeamSection
|
||||
taskd = PyGui._TaskPanelFemBeamSection._TaskPanelFemBeamSection(self.Object)
|
||||
taskd.obj = vobj.Object
|
||||
FreeCADGui.Control.showDialog(taskd)
|
||||
return True
|
||||
|
|
|
@ -51,8 +51,8 @@ class _ViewProviderFemMaterial:
|
|||
return
|
||||
|
||||
def setEdit(self, vobj, mode):
|
||||
import _TaskPanelFemMaterial
|
||||
taskd = _TaskPanelFemMaterial._TaskPanelFemMaterial(self.Object)
|
||||
import PyGui._TaskPanelFemMaterial
|
||||
taskd = PyGui._TaskPanelFemMaterial._TaskPanelFemMaterial(self.Object)
|
||||
taskd.obj = vobj.Object
|
||||
FreeCADGui.Control.showDialog(taskd)
|
||||
return True
|
||||
|
|
|
@ -52,8 +52,8 @@ class _ViewProviderFemMeshGmsh:
|
|||
|
||||
def setEdit(self, vobj, mode):
|
||||
self.ViewObject.show() # show the mesh on edit if it is hided
|
||||
import _TaskPanelFemMeshGmsh
|
||||
taskd = _TaskPanelFemMeshGmsh._TaskPanelFemMeshGmsh(self.Object)
|
||||
import PyGui._TaskPanelFemMeshGmsh
|
||||
taskd = PyGui._TaskPanelFemMeshGmsh._TaskPanelFemMeshGmsh(self.Object)
|
||||
taskd.obj = vobj.Object
|
||||
FreeCADGui.Control.showDialog(taskd)
|
||||
return True
|
||||
|
|
|
@ -64,8 +64,8 @@ class _ViewProviderFemMeshGroup:
|
|||
if o.isDerivedFrom("Fem::FemMeshObject"):
|
||||
o.ViewObject.hide()
|
||||
# show task panel
|
||||
import _TaskPanelFemMeshGroup
|
||||
taskd = _TaskPanelFemMeshGroup._TaskPanelFemMeshGroup(self.Object)
|
||||
import PyGui._TaskPanelFemMeshGroup
|
||||
taskd = PyGui._TaskPanelFemMeshGroup._TaskPanelFemMeshGroup(self.Object)
|
||||
taskd.obj = vobj.Object
|
||||
FreeCADGui.Control.showDialog(taskd)
|
||||
return True
|
||||
|
|
|
@ -64,8 +64,8 @@ class _ViewProviderFemMeshRegion:
|
|||
if o.isDerivedFrom("Fem::FemMeshObject"):
|
||||
o.ViewObject.hide()
|
||||
# show task panel
|
||||
import _TaskPanelFemMeshRegion
|
||||
taskd = _TaskPanelFemMeshRegion._TaskPanelFemMeshRegion(self.Object)
|
||||
import PyGui._TaskPanelFemMeshRegion
|
||||
taskd = PyGui._TaskPanelFemMeshRegion._TaskPanelFemMeshRegion(self.Object)
|
||||
taskd.obj = vobj.Object
|
||||
FreeCADGui.Control.showDialog(taskd)
|
||||
return True
|
||||
|
|
|
@ -66,8 +66,8 @@ class _ViewProviderFemResultMechanical:
|
|||
return True
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
import _TaskPanelShowResult
|
||||
taskd = _TaskPanelShowResult._TaskPanelShowResult(self.Object)
|
||||
import PyGui._TaskPanelShowResult
|
||||
taskd = PyGui._TaskPanelShowResult._TaskPanelShowResult(self.Object)
|
||||
taskd.obj = vobj.Object
|
||||
FreeCADGui.Control.showDialog(taskd)
|
||||
return True
|
||||
|
|
|
@ -59,8 +59,8 @@ class _ViewProviderFemShellThickness:
|
|||
return
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
import _TaskPanelFemShellThickness
|
||||
taskd = _TaskPanelFemShellThickness._TaskPanelFemShellThickness(self.Object)
|
||||
import PyGui._TaskPanelFemShellThickness
|
||||
taskd = PyGui._TaskPanelFemShellThickness._TaskPanelFemShellThickness(self.Object)
|
||||
taskd.obj = vobj.Object
|
||||
FreeCADGui.Control.showDialog(taskd)
|
||||
return True
|
||||
|
|
|
@ -51,8 +51,8 @@ class _ViewProviderFemSolverCalculix:
|
|||
return
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
import _TaskPanelFemSolverCalculix
|
||||
taskd = _TaskPanelFemSolverCalculix._TaskPanelFemSolverCalculix(self.Object)
|
||||
import PyGui._TaskPanelFemSolverCalculix
|
||||
taskd = PyGui._TaskPanelFemSolverCalculix._TaskPanelFemSolverCalculix(self.Object)
|
||||
FreeCADGui.Control.showDialog(taskd)
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user