Skip to main content

File Formats

Import formats

STEP (.step, .stp)

AspectDetails
StandardISO 10303 (STEP AP214 / AP242)
ParserClient-side (parsed in the browser)
Use casesDesign domain geometry, preserve regions, fixed faces, obstacle volumes
Features preservedSolid geometry, B-Rep face structure, edge topology
Coordinate systemConverted to Z-up on import

STEP is the recommended format for importing CAD geometry. It preserves the B-Rep face structure, which allows you to select individual faces for fixed boundary conditions. The file is parsed entirely in the browser -- no server round-trip is needed for geometry processing.

Supported geometry types:

  • Solid bodies (single and multi-body)
  • Shell/surface bodies
  • Wire bodies (edges only, limited support)

Limitations:

  • Assembly structure is flattened to a single compound shape.
  • Parametric feature history is not preserved.
  • Colors and material assignments from the CAD system are not imported.

STL (.stl)

AspectDetails
StandardStereolithography / Standard Tessellation Language
ParserClient-side (parsed in the browser)
Use casesDesign domain geometry, obstacle volumes, preserve regions
VariantsASCII and binary STL both supported

STL files contain triangulated surface meshes. They are widely supported but lack B-Rep face information, so you cannot select individual faces for boundary conditions. Use STEP when face selection is needed.

Limitations:

  • No face structure (the entire mesh is one surface).
  • No color or material information.
  • Large triangle counts increase rendering time. Decimate before importing if the mesh exceeds 500,000 triangles.

Export formats

STL (.stl)

The solver exports the optimized design as a binary STL file. The mesh is generated by extracting the material boundary surface at the 0.5 threshold from the result field.

AspectDetails
GeneratorMarching cubes (2D: contour extraction, 3D: marching cubes)
Material threshold0.5 (cells with material value above 0.5 are solid)
Coordinate systemZ-up, positioned in world space using design domain offset
UnitsMillimeters

The exported STL is ready for 3D printing or import into downstream CAD tools. It includes the design domain offset so the part is positioned correctly relative to preserves and bolt pads.

Material layout (binary)

The raw material layout can be downloaded as a binary file for external processing or solver continuation.

AspectDetails
FormatRaw float32 binary array
LayoutRow-major, nely x nelx (2D) or nelz x nely x nelx (3D)
Values0.0 (void) to 1.0 (solid)
Use caseSolver continuation (fork from a previous run), external visualization, post-processing

Convergence data (JSON)

Convergence history is available as JSON, containing per-iteration values for objective, K_p, volume fraction, and design variable change.

Displacement animation data

The final-iteration displacement field is available for animation playback. It includes nodal displacements and mesh node coordinates.

File size limits and recommendations

FormatRecommended max sizeHard limitNotes
STEP import50 MB100 MBLarge assemblies should be simplified before import.
STL import25 MB50 MBDecimate to < 500K triangles for smooth rendering.
STL export----Size depends on grid resolution. A 200x100 grid produces ~1--5 MB.
Material layout----Size is nelx x nely x 4 bytes (float32). A 200x100 grid is ~80 KB.

Recommendations

  • Prefer STEP over STL when you need face selection for boundary conditions or when geometric precision matters.
  • Simplify geometry before import. Remove fillets, chamfers, and small features that will not affect the optimization but increase mesh complexity.
  • Check orientation after import. deFlex uses a Z-up coordinate system. STEP files from Y-up CAD systems are automatically reoriented, but verify the result.
  • Use the placement controls (position, rotation, offset, scale) in the part properties panel to align imported geometry with your design domain.