FEM: examples, move some method in separate module
This commit is contained in:
@@ -34,13 +34,8 @@ import FreeCAD
|
||||
import Fem
|
||||
import ObjectsFem
|
||||
|
||||
mesh_name = "Mesh" # needs to be Mesh to work with unit tests
|
||||
|
||||
|
||||
def init_doc(doc=None):
|
||||
if doc is None:
|
||||
doc = FreeCAD.newDocument()
|
||||
return doc
|
||||
from .manager import get_meshname
|
||||
from .manager import init_doc
|
||||
|
||||
|
||||
def get_information():
|
||||
@@ -94,7 +89,7 @@ def setup_base(doc=None, solvertype="ccxtools"):
|
||||
control = create_elements(fem_mesh)
|
||||
if not control:
|
||||
FreeCAD.Console.PrintError("Error on creating elements.\n")
|
||||
femmesh_obj = analysis.addObject(ObjectsFem.makeMeshGmsh(doc, mesh_name))[0]
|
||||
femmesh_obj = analysis.addObject(ObjectsFem.makeMeshGmsh(doc, get_meshname()))[0]
|
||||
femmesh_obj.FemMesh = fem_mesh
|
||||
femmesh_obj.Part = geom_obj
|
||||
femmesh_obj.SecondOrderLinear = False
|
||||
|
||||
Reference in New Issue
Block a user