Skip to content

Commit

Permalink
FEM: export results to vtk, code formating and documatation information
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Jan 30, 2017
1 parent 9ce1662 commit df66ce0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Mod/Fem/FemResultVTK.py
Expand Up @@ -26,16 +26,17 @@
__author__ = "Qingfeng Xia"
__url__ = "http://www.freecadweb.org"

## @package FemResultVTK
# \ingroup FEM

import os
from math import pow, sqrt
import numpy as np

import FreeCAD


if open.__module__ == '__builtin__':
pyopen = open # because we'll redefine open below


def insert(filename, docname):
"called when freecad wants to import a file"
try:
Expand All @@ -51,9 +52,11 @@ def open(filename):
docname = os.path.splitext(os.path.basename(filename))[0]
insert(filename, docname)


def importFemResult(filename):
FreeCAD.Console.PrintError("FemResult import is not implemented, actually not necessary\n")


def export(objectslist, filename):
"called when freecad exports a fem result object"
if len(objectslist) != 1:
Expand All @@ -64,4 +67,4 @@ def export(objectslist, filename):
FreeCAD.Console.PrintError("object selcted is not FemResultObject.\n")
return
import Fem
Fem.writeResult(filename, obj)
Fem.writeResult(filename, obj)

0 comments on commit df66ce0

Please sign in to comment.