- GuiCommand: Name:EM FHInputFile MenuLocation:EM → FHInputFile Workbenches:EM Shortcut:E I Version:0.17 SeeAlso:EM FHSolver
The FHInputFile tool creates the input FastHenry file based on the Document EM workbench objects.
To create a FastHenry input file:
- Create one EM FHSolver object and other EM workbench objects representing the 3D geometry as required for your model.
- Press the
EM FHInputFile button, or press E then I keys.
-
In case a file with the same name in the given folder as specified in the EM FHSolver object already exists, you will be prompted to overwrite or not.
-
The Document can also contain non-EM Workbench objects. They will be ignored when creating the FastHenry input file. So you can use any other kind of FreeCAD object as guide for your EM Workbench models.
See also:
The FHInputFile command can be used in macros and from the Python console by using the following function:
node = createFHInputFile(doc=None,filename=None,folder=None)
-
Outputs a FastHenry input file based on the active document geometry.
-
doc
is the Document object that must contain at least one EM_FHSolver object and the relevant geometry. If nodoc
is given, the active document is used, if any. -
filename
is the filename to use. If not passed as an argument, the Filename property of the FHSolver object contained in the document will be used. If the Folder string in the FHSolver object is empty, the function builds a filename concatenating the document name with the default extensionEMFHSOLVER_DEF_FILENAME
. -
folder
is the folder where the file will be stored. If not passed as an argument, the Folder property of the FHSolver object contained in the document will be used. If the Folder string in the FHSolver object is empty, the function defaults to the user's home path (e.g. in Windows "C:\Documents and Settings\username\My Documents", in Linux "/home/username")
Example:
import FreeCAD, EM
fhsolver = EM.createFHInputFile()
{{EM Tools navi
}}
documentation index > EM FHInputFile