Skip to content

Imported geometry

Demonstrates loading a STEP asset, meshing it, and inspecting the resulting finite element part.

The model before it is solved: parts, supports and loads

The model before it is solved: its parts, supports (red) and loads (blue).

Open in 3D turn it, cut it, hide parts: in xfea's viewer, in your browser

examples/scripts/02_core_concepts/geometry_and_meshing/imported_geometry.py. Run it from the repository with uv run python examples/scripts/02_core_concepts/geometry_and_meshing/imported_geometry.py, or, with xfea-examples installed, xfea-examples run 02_core_concepts/geometry_and_meshing/imported_geometry.py.

from xfea_examples.models import solid_box_model
from xfea_examples import show_viewer
model, part, _, _, _ = solid_box_model(name="imported_geometry")
print(f"Model name: {model.name}")
print(f"Part name: {part.name}")
print(f"Nodes: {len(part.nodes)}")
print(f"Elements: {len(part.elements)}")
show_viewer(model, units="mm")

© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them