Add Optimized Gyroid infill (auto-tuned wavelength + amplitude)#10409
Draft
peyton-marcotte wants to merge 2 commits intobambulab:masterfrom
Draft
Add Optimized Gyroid infill (auto-tuned wavelength + amplitude)#10409peyton-marcotte wants to merge 2 commits intobambulab:masterfrom
peyton-marcotte wants to merge 2 commits intobambulab:masterfrom
Conversation
Physics-tuned variant of the gyroid. Two parameters auto-computed
from density, line spacing, and layer height:
omega = sqrt(density_adj) / sqrt(1 + layer_h/spacing), [0.5, 2.0]
-- Euler-Bernoulli buckling: shorter wavelength under
higher load raises critical buckling load.
amplitude = 0.55 / omega^2, [0.20, 0.65]
-- Curved-beam bending: keeps peak fiber stress bounded
as omega rises.
Files: FillOptimizedGyroid.{hpp,cpp} new; FillBase.cpp, Fill.cpp,
Layer.cpp, PrintConfig.{hpp,cpp}, CMakeLists.txt updated.
User-facing: appears as "Optimized Gyroid" in the Fill Pattern dropdown.
Density still chosen by user; omega/amplitude are internal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new infill geometry, Optimized Gyroid, derived from
FillGyroid. Two parameters that control the wave shape are auto-computed per region from the density, line spacing, and layer height. The user does not see or set them. Density is still picked by the user.The new pattern appears as "Optimized Gyroid" in the Fill Pattern dropdown alongside the standard Gyroid.
Physics
Standard gyroid surface:
sin(x)cos(y) + sin(y)cos(z) + sin(z)cos(x) = 0. The optimized variant scalesxby ω (frequency) and the output by A (amplitude):sqrt(density_adj) / sqrt(1 + layer_h / spacing)[0.5, 2.0]P_cr ∝ 1/L². Shorter wavelength under denser infill raises the critical buckling load of each strand.0.55 / ω²[0.20, 0.65]σ ∝ A·ω². Dropping A as ω rises keeps strand peak stress bounded while preserving stiffness.Net effect: at low density it looks like a normal gyroid; at higher density walls develop a tighter, lower-amplitude waviness intended to resist load-direction buckling. Density continues to control mass and interlayer adhesion.
Files changed
New
FillOptimizedGyroid.{hpp,cpp}plus the standard set of integration points (factory, switch cases, enum, label, CMakeLists). The integration mirrors the existingFillGyroidregistration in this codebase exactly.Testing state
Honest disclosure: the patch is submitted as a draft because it has not been compile-verified locally. The integration points are a 1:1 mirror of the existing
FillGyroidregistration in this repo, and the algorithm is a parameterized extension ofFillGyroid.cpp's wave generator. The project's CI is the authoritative check. Happy to iterate on any compile or review feedback.No changes to existing infill behavior. The new pattern is additive.
Why "Optimized Gyroid" as a separate option, not changes to Gyroid?
Density-tuned wavelength and amplitude change the visual and mechanical character of the infill. Keeping it as a separate selectable pattern means users opting in get the new behavior; existing prints and profiles using
gyroidare untouched.Origin
Developed as part of the CRAMP project at Brown University: Compression Research for Additive Manufacturing Performance. CRAMP identifies and validates high-performance additive-manufacturing infill architectures for compression in spaceflight applications, where every gram and every Newton of load matters.
Candidate architectures were generated by a custom AI over the space of triply-periodic minimal-surface (TPMS) infills, then printed and compression-tested on the Instron press at Brown University's Prince Laboratory against standard rectilinear and concentric baselines. Winning architectures beat commodity baselines by up to 60% in compressive strength-to-mass. The Optimized Gyroid pattern submitted here is a parameterized variant of one such candidate, surfaced from that search.
Sponsors and partners:
Released open source for community use.