Skip to content

Feature Request: 3D Surface Extraction and Visualization Pipeline #229

@rainerrodrigues

Description

@rainerrodrigues

The Problem:
Currently, when running 3D topology optimization problems (like a 3D HeatConductionProblem), the output x_opt is a flat array of continuous density values. While this is easily visualized as a 2D heatmap, it is difficult to interpret and impossible to manufacture in 3D. Users currently lack a built-in pipeline to convert these optimized voxel densities into smooth, usable CAD geometry.
Proposed Solution:
I propose adding a post-processing pipeline that extracts a smooth isosurface from the 3D density field and allows for interactive visualization. The workflow would entail:
Voxel Reshaping & Thresholding: Reconstructing the 1D x_opt vector back into a 3D Cartesian grid based on the RectilinearGrid dimensions, and applying a cutoff threshold (e.g., $\rho > 0.5$) to define the solid-void boundary.
Surface Extraction: Utilizing a marching cubes algorithm (via Meshing.jl or GeometryBasics.jl) to extract a continuous triangular mesh from the thresholded grid.
Interactive Visualization: Providing a utility to pipe this extracted Mesh directly into MeshCat.jl for browser-based 3D interaction, alongside an option to export as .obj/.stl.

Alternative Solutions: Relying strictly on Makie.jl voxel/volume plots, but this does not yield extractable geometry for secondary engineering analysis (like CFD validation) or additive manufacturing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions