Skip to content

Commit

Permalink
FEM: fenics import/export: one line documentation, fixed make_femmesh…
Browse files Browse the repository at this point in the history
… call
  • Loading branch information
joha2 authored and yorikvanhavre committed Mar 7, 2017
1 parent a6cfb18 commit 7f72f9e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Mod/Fem/importFenicsMesh.py
Expand Up @@ -35,7 +35,7 @@
# \brief FreeCAD Fenics Mesh reader and writer for FEM workbench

import FreeCAD
import FemMeshTools
import importToolsFem
import os
import itertools
from lxml import etree # parsing xml files and exporting
Expand Down Expand Up @@ -202,13 +202,17 @@ def import_fenics_mesh(filename, analysis=None):
'''
mesh_data = read_fenics_mesh(filename)
mesh_name = os.path.basename(os.path.splitext(filename)[0])
femmesh = FemMeshTools.make_femmesh(mesh_data)
femmesh = importToolsFem.make_femmesh(mesh_data)
if femmesh:
mesh_object = FreeCAD.ActiveDocument.addObject('Fem::FemMeshObject', mesh_name)
mesh_object.FemMesh = femmesh


def read_fenics_mesh(xmlfilename):
'''
Returns element dictionary to be evaluated by make_femmesh later
'''


Fenics_to_FreeCAD_dict = {
"triangle": "tria3",
Expand Down

0 comments on commit 7f72f9e

Please sign in to comment.