FEATool  v1.8
Finite Element Analysis Toolbox
 All Files Functions Pages

The first step in the modeling process is to create a geometry to define the domain to be simulated. This section describes how a complex geometry can be created in FEATool by combining geometry objects such as rectangles, circles, polygons, blocks, and cylinders.

Geometry Mode

Geometry mode is the default mode that a new FEATool problem starts in (except for 1D problems where a geometry is unnecessary). This mode can also be selected by pressing the mode button or corresponding menu option. While in geometry mode the toolbar buttons represent the geometry objects and operations that are available. The main gui window will also show all present geometry objects and highlight them in red while they are selected. A selection list box will also be present which is used to select geometry object to perform and apply operations on (in 2D geometry objects can also be selected by clicking on them in the main gui window).


Geometry Objects

In two dimensions rectangles, squares, ellipses, circles, and polygonal geometry object primitives are available. To create a 2D geometry object click on one of the corresponding toolbar buttons

  • To create rectangles and squares, left mouse click on a point in the main gui axes to represent one corner, then hold the mouse button and move the mouse pointer to the other corresponding corner. The resulting shape will be highlighted in red lines. Release the mouse button to finalize the geometry object.

  • For circles and ellipses, left mouse click on a point in the main gui axes to represent the centroid, then hold the mouse button and move the mouse pointer to a desired shape (highlighted in red lines). Release the mouse button to finalize the geometry object (holding the shift button will restrict the shape to a circle).
  • To create a polygon add new points with left mouse clicks. The polygon lines will be highlighted in red. Finish with right mouse click.

In three dimensions (3D) block, cylinder, and sphere, geometry object primitives are available. To create a 3D geometry object click on one of the corresponding toolbar buttons

  • Creates a block
  • Creates a sphere
  • Creates a cylinder

In three dimensions geometry objects are created by specifying the corresponding dimensions. Geometry object properties and dimensions can also be edited by using the Inspect/edit selected geometry object option. Pressing the button will open a dialog box for the selected geometry object where object properties can be edited.


The geometry menu also features a point object. By selecting the Add Point... menu option one can specify the point coordinates for the objects. Point objects are used to enforce grid vertices at specific points in the geometry and are only used in the grid generation process.

CAD Import and Export

Import and export of CAD geometries in the STL ASCII format is supported through Geometry menu options. Geometry export for Gmsh (geo) and Triangle (poly) ASCII formats is also supported.

STL CAD file import is supported for both full 3D and (pseudo) 2D geometries. If all coordinates as in the same plane the geometry will be considered two-dimensional and treated correspondingly (typically takes as z-coordinates equal to zero). Note that 3D geometries can only be imported into models started with a 3D coordinate system, and vice versa.

The STL import function will try to coalesce duplicated points and join triangles to a solid geometry object. If this process fails, consider CAD format repair in a dedicated external software prior to import. Moreover, FEATool will TRY to automatically split the object into distinct boundaries. To manually specify boundary patches it is possible to import several STL files/segments where each STL group will be treated separately. Manual command line interface CLI usage is also possible directly with the impexp_stl function allowing for tuning of import parameters. An example utilizing CAD geometry import functionality can be found as ex_spanner in the examples directory.

Geometry Operations

The following operations allow geometry objects to be combined (join and intersection operations) or subtracted to form more complex geometries.

  • The join operation merges all selected geometry objects to a single composite object.
  • Subtract objects from the largest of the selected geometry objects.
  • Intersection of geometry objects.

Alternatively to these buttons, the Combine Objects... geometry menu option opens a dialog box where an exact geometry formula can be entered. The syntax uses + for join, - for subtract, and & for the intersection operation as well as the geometry object labels or tags shown in the geometry object Selection listbox.


Note that if more than one geometry object is present in the final geometry FEATool will split it along all intersection borders to create subdomains as in the illustration below. The different subdomains can be used to set different material parameters, equation coefficients, and boundary conditions along the separations. See for example the heat transfer model Shrink Fitting of an Assembly.


Also, the three dimensional geometry engine is not quite robust enough to handle all cases of overlapping boundary faces. Thus it is recommended when subtracting objects in 3D to allow for this by creating subtraction objects larger than the desired domain (so that non parallel planes are avoided).

The undo/split button is used to undo a previous join, subtract, intersect, move, scale, or rotate operation and returns the corresponding root objects.

In addition, the button allows one to rotate, scale, and move (linear translation) of a selected geometry object. Movement is specified as a space separated vector of a translation length in each space dimension (can be negative). Scaling, is similarly specified with a vector where a negative value will mirror the object. The rotation angle is specified in degrees (and in 3D the rotation axis must also be selected). Note that the default values will skip an operation (scaling of 1, translation and rotation 0).


Lastly, the delete button completely removes selected geometry objects.


The examples in the tutorial sections give step by step guides how to create different geometries. For example the Thin Plate with Hole model shows how to make a rectangle with a circular corner and Shrink Fitting of an Assembly describes how to create a complex assembly with several subdomains.

Command Reference

The following MATLAB and Octave functions can be used on the command line to generate and modify objects and geometries.

gobj_blockCreate a 3D block
gobj_circleCreate a circle in 2D
gobj_cylinderCreate a cylinder in 3D
gobj_ellipseCreate an ellipse in 2D
gobj_lineCreate a 1D line
gobj_pointCreate a point
gobj_polygonCreate a 2D polygon
gobj_rectangleCreate a 2D rectangle
gobj_sphereCreate a 3D sphere
geom_apply_formulaApply formula to geometry objects
geom_apply_transformationApply transformation to geometry objects
geom_split_objectSplit composite geometry object
plotgeomPlot and visualize geometry
impexp_gmshSTL CAD geometry import and export
impexp_stlGmsh (geo) geometry export
impexp_triangleTriangle (poly) geometry export