$ show tomohiron907/Strecs3D
Strecs3D is a specialized desktop application designed to optimize 3D printing infill density through Finite Element Method (FEM) analysis. The software ingests CAD geometry (STEP/STL) and optional stress analysis results (VTU), segments the mesh based on stress thresholds, and exports variable-density 3MF files compatible with major slicers like Cura, Bambu Studio, and PrusaSlicer. It serves as a bridge between structural engineering simulation and additive manufacturing, allowing users to reduce material usage while maintaining structural integrity. The architecture is built on Qt 6 for the user interface and VTK for 3D visualization, compiled via CMake with vcpkg for dependency management. The application follows a modular design with a clear separation between the UI layer, core processing logic, and FEM pipeline integration. It supports a full simulation workflow, converting STEP files to CalculiX input (INP), running the solver, and converting the output (FRD) back to VTK format for visualization and processing. Data flows from geometry import through optional FEM simulation to mesh segmentation and 3MF export. The system relies heavily on external tools (CalculiX, Gmsh, OpenCASCADE) which are integrated via custom ports and wrappers. While the internal C++ code demonstrates professional engineering practices, the heavy coupling to external binary dependencies and platform-specific build configurations introduces maintenance complexity. The codebase is actively maintained with recent commits and a low issue count relative to its popularity. However, technical drift is present due to hardcoded paths for external solvers and custom patches for Gmsh, which require careful version management to prevent breakage in deployment environments.
The LLM identified 3 files worth highlighting for reuse:
Implements the Command pattern to encapsulate UI actions and enable undo/redo functionality. This component decouples the UI layer from the business logic, allowing actions like setting load conditions or processing files to be treated as reversible objects. It is a reusable architectural pattern suitable for any Qt-based application requiring state management and transactional operations.
Contains the core algorithm for calculating volume fractions based on stress density mapping. It processes mesh data to determine the percentage of material required in different stress regions. This logic is self-contained and could be extracted as a standalone library for other structural optimization tools, as it relies on standard mesh data structures rather than application-specific UI state.
Orchestrates the integration with the external CalculiX FEM solver. It handles file conversion (STEP to INP, FRD to VTU) and process execution. While tightly coupled to the specific CalculiX toolchain, the pipeline structure demonstrates a robust pattern for managing external tool execution, error handling, and data transformation that could be adapted for other simulation backends.