* Fix junction deviation and jerk settings behavior
Process settings now follow the selected printer's junction deviation
configuration. When machine_max_junction_deviation is enabled,
default_junction_deviation is shown and jerk settings are hidden. When
junction deviation is disabled, jerk settings are restored and
default_junction_deviation is hidden.
Fix a validation issue where junction deviation mismatch warnings could
be reported even when machine_max_junction_deviation was set to 0.
Warnings now apply only when junction deviation is active and point
directly to default_junction_deviation.
Also simplify Motion ability page visibility checks by reusing local
firmware-flavor booleans.
* GUI tweak
- separate Junction Deviation segment
- JD and Jerk stay visible
* Add Optimized Gyroid infill (auto-tuned wavelength + amplitude)
New infill geometry derived from FillGyroid. Two parameters are
auto-computed per-region from density, line spacing, and layer height
(no user inputs):
omega = sqrt(density_adj) / sqrt(1 + layer_height/spacing)
clamped to [0.5, 2.0]
-- Euler-Bernoulli buckling: critical load ~ 1/L^2,
so shorter wavelength under higher load (denser infill)
raises buckling resistance.
amplitude = 0.55 / omega^2, clamped to [0.20, 0.65]
-- Curved-beam bending stress: peak stress ~ A * omega^2,
so amplitude is reduced as omega rises to keep peak
fiber stress bounded while preserving stiffness.
Files:
- src/libslic3r/Fill/FillOptimizedGyroid.{hpp,cpp} (new)
- src/libslic3r/Fill/FillBase.cpp (factory case)
- src/libslic3r/Fill/Fill.cpp (switch case)
- src/libslic3r/Layer.cpp (switch case)
- src/libslic3r/PrintConfig.{hpp,cpp} (enum + label)
- src/libslic3r/CMakeLists.txt (build sources)
User-facing: appears as "Optimized Gyroid" in the Fill Pattern dropdown.
Density still chosen by user; omega/amplitude are internal.
* Fix build: layer_height is in FillParams, not Fill base
* Add ipOptimizedGyroid to multiline infill list in ConfigManipulation
* Refactor: replace ipOptimizedGyroid enum with gyroid_optimized boolean
Per @RF47's review feedback, fold the optimized wave math into FillGyroid
itself behind a per-region boolean instead of a separate infill enum.
What changes:
- New ConfigOptionBool "gyroid_optimized" on PrintRegionConfig (default
false). When unchecked, gyroid behavior is byte-identical to before.
- Optimized wave math (compute_omega_factor, compute_amplitude_factor,
f_opt, make_*_opt, make_optimized_gyroid_waves) lives inside
FillGyroid.cpp. _fill_surface_single branches on params.gyroid_optimized.
- FillParams gains a bool gyroid_optimized field, populated in Fill.cpp
from region_config alongside fill_multiline.
- UI checkbox added under Strength > Infill in Tab.cpp, label
"Optimize gyroid wave (experimental)". Toggle is hidden by
ConfigManipulation when sparse_infill_pattern != ipGyroid.
- "gyroid_optimized" added to s_Preset_print_options for preset I/O.
What goes away:
- ipOptimizedGyroid enum value, factory case, switch cases, dropdown
label, string key.
- FillOptimizedGyroid.cpp / FillOptimizedGyroid.hpp (math moved into
FillGyroid.cpp).
- Net diff drops by ~250 lines.
Existing profiles using gyroid are unaffected.
* Wire gyroid_optimized through SurfaceFillParams to FillParams
Linux build failed because line 921 in Fill.cpp populates a
SurfaceFillParams (the dedup struct), not FillParams directly.
Add the field there, in operator< / operator==, and copy it to
FillParams at both conversion sites.
* Use toggle_line for gyroid_optimized: hide row when pattern != gyroid
* Account for multiline wall thickness in omega correction (per @RF47)
When fill_multiline = N, each gyroid wall is N lines thick, so the
geometric scale fed into the buckling correction term should be
spacing * N rather than spacing. Increases omega (tighter wavelength)
when multiline is enabled, consistent with the thicker wall being
more buckling-resistant.
* Optimized gyroid via marching squares on the implicit scalar field
Per @RF47 review: replace the analytical f_opt / make_one_period_opt
wave generator (which had visible kinks at vertical-horizontal
transitions) with a marching-squares iso-extraction on the gyroid
scalar field, modeled on FillTpmsFK.cpp.
- New marchsq::GyroidField in FillGyroid.cpp evaluates
F(x,y,z) = sin(fx*x)cos(fy*y) + sin(fy*y)cos(fz*z) + sin(fz*z)cos(fx*x)
where fx = omega * baseline (anisotropic in x), fy = fz = baseline.
- get_gyroid_polylines() runs marching squares at iso=0 and converts
rings to polylines.
- _fill_surface_single() optimized branch now builds GyroidField,
runs marching squares, and skips the bb.min translate (field
output is already in absolute coords).
- Dropped: f_opt, make_one_period_opt, make_wave_opt,
make_optimized_gyroid_waves, compute_amplitude_factor. Amplitude
has no clean analog in iso-zero extraction.
- Standard (non-optimized) gyroid path unchanged.
* Mass calibration: compensate period by cbrt(omega) for x-anisotropic field
Per @RF47: optimized vs standard gyroid had different masses at the
same sparse_infill_density setting. Cause: scaling fx by omega while
leaving fy=fz at the baseline raised the surface-area-to-volume ratio
by approximately omega^(1/3) (the geometric mean of the three
frequencies).
Fix: multiply the base period by cbrt(omega) so the geometric mean of
(fx, fy, fz) returns to the standard baseline. Net effect:
fx = omega^(2/3) * baseline_orig
fy = fz = omega^(-1/3) * baseline_orig
which preserves total mass at the same density setting while
preserving the load-direction anisotropy this PR introduces.
* Switch optimized gyroid anisotropy from X to Z (per @RF47)
Z is the typical compression-load axis for FFF parts and is not at
delamination risk under compression — so the dominant failure mode
is column buckling of the vertical strands themselves. Tightening
fz directly shortens the effective vertical strand length, which
improves Z-axis buckling resistance.
Mass calibration via cbrt(omega) period compensation still applies
(scaling exactly one of three frequencies by omega; the geometric-
mean preservation argument is symmetric across axes).
* Update src/slic3r/GUI/Tab.cpp
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
* Address review feedback (Copilot + @RF47)
- Fill.cpp: gate params.gyroid_optimized on (params.pattern == ipGyroid)
so non-gyroid surfaces don't differ in SurfaceFillParams by an
irrelevant flag (would unnecessarily split fill batching).
[Copilot suggestion, RF47 confirmed correct]
- PrintConfig.cpp: drop "amplitude" from the tooltip; only wavelength
is parameterized (the marching-squares iso=0 extraction is invariant
to a uniform field scale, so amplitude has no effect).
- FillBase.hpp: shorten gyroid_optimized comment to match the actual
carried state (no amplitude term).
- FillGyroid.cpp: shorten the marchsq namespace comment block; the
ODR concern was overstated (FillTpmsFK uses the same pattern fine).
* Drop redundant marchsq bb expansion (Copilot)
bb is already offset by 10 * scale_(spacing) above for edge-artifact
margin; the second offset on bb_field doubled the raster area for no
geometric benefit and hurt CPU time on large parts.
* Update src/slic3r/GUI/Tab.cpp
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
* Fix density mismatch + rename to Z-buckling bias optimization
Issue (per @ianalexis): at the same sparse_infill_density setting,
the optimized branch produced denser fill than standard. Verified via
Python sim (sim_gyroid_compare.py) using marching squares on the
implicit field across multiple z slices.
Root cause: the omega formula was inverted from the buckling-physics
intent. The naive sqrt(density_adj) factor produced omega < 1 at
typical print densities (10-30%), which LENGTHENED the Z wavelength
instead of shortening it -- net loss in both mass and strength.
Fix:
- compute_omega_factor: invert to sqrt(1 / density_adj), clamp to
[1.0, 2.0]. Now omega = 2.0 at low density (long strands need
most help) and clamps to 1.0 above ~30% density (no-op, since
standard gyroid is already short enough).
- Remove the cbrt(omega) period compensation. Empirically (sim
table embedded in FillGyroid.cpp comment) the inverted formula
keeps line length per area at ~1.000 of standard across all
densities with no period scaling needed.
Predicted gains (sim, Z-axis Euler buckling proxy):
density line/std strength/std
10% 1.000 2.84x
15% 1.000 1.89x
20% 1.000 1.42x
30%+ 1.000 1.00x (no-op)
Rename per @ianalexis: "Optimize gyroid wave" oversells (now no-op
above 30% density and Z-only). Renamed user-facing label to
"Z-buckling bias optimization (experimental)" with updated tooltip
that scopes to vertical compression and discloses the density cutoff.
Internal config key (gyroid_optimized) unchanged for diff size.
Real-world Instron compression tests at Brown's Prince Lab to follow.
---------
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
Hide tree support parameters not in use
- hide independent support layer height for organic tree support
- hide threshold overlap for tree supports
Co-authored-by: SoftFever <softfeverever@gmail.com>
Fix hybrid tree first-layer support base flow and UI consistency
Fix incorrect first-layer generation for hybrid tree supports.
The support base on the first layer used brim flow instead of support material flow,
which could lead to incorrect extrusion behavior and wrong material usage in
multi-material prints.
Additionally, spacing and density for the regular support part were not consistently
derived from the actual first-layer support flow when first-layer and regular
line widths differed.
Hybrid-specific behavior is clarified:
- first-layer expansion applies only to the regular support part
- tree-only regions keep their existing behavior
The first-layer support pattern is aligned with normal and organic tree supports
to ensure consistent and meaningful density behavior.
Also make first-layer support expansion and density settings visible whenever
supports are enabled, as density was already affecting hybrid supports but was
hidden in the UI.
* Elefant foot compensation for solid layers
Elefant foot compensation for solid layers above bottommost by infill density manipulation.
* Update Fill.cpp
* change the option to expert cat
* use is_approx for float
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Union ex brims
Revert "Union ex brims"
This reverts commit bbc9a39faf318dc2df093eb2bdcebf19a4162fe9.
Update Brim.cpp
* dont repeat paths
* Update Brim.cpp
* multimaterial brim independiente
* Normal brim if is by object
* fix print order
* cleaning 1
* cleaning 2
* Normal brim if multimaterial on first layer
* fix artifact
* combine_brim optional
refactoring
* refactoring gcode.cpp
* refactoring brim.cpp
Update Brim.cpp
* Remove multimaterial first-layer check for brims
Stop detecting extruders used on the first layer and remove the is_multimaterial_first_layer guard. Simplify can_combine_brims to only consider combine_brims and whether printing is ByObject, allowing brims to be combined across extruders unless printing by object or combine_brims is disabled. Cleans up unused code and simplifies brim-generation conditions.
* Remove material specification from unified brim comment
* Update PrintConfig.cpp
Previously, wipe tower behavior was determined by checking if the printer
was a QIDI vendor. This introduces a configurable enum (Type 1 / Type 2)
so any printer can select its wipe tower implementation. BBL printers
remain hardcoded to Type 1. Qidi profiles default to Type 1.
Wipe tower interface features and preheat fixes
Fresh PR branch rebuilt on upstream/main (squash of origin/BBL-studio-wipe-tower-merge) to avoid merge-history issues.
* Brim can follow EFC outline
* Optimization
* Update Spanish EFC brim description
Adopt reviewer-proposed wording from RF47.
Co-authored-by: RF47 <RF47@users.noreply.github.com>
* Tag Orca specific changes
Tag Orca specific changes vs. Bambu using the comment //ORCA: . This helps when reviewing merge commits from upstream Bambu so we don't end up causing regressions when pulling in commits from upstream
* Tooltip update
---------
Co-authored-by: RF47 <RF47@users.noreply.github.com>
Co-authored-by: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com>
Fix adaptive fill issues
- Disconnecting from walls at low density
- Not supporting rotation
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
* Grid non-crossing for multiline
cleaning
Replaced negative offset logic with surface contraction to reduce overlap with perimeters.
center the infill
filltriangles
update triangles
preallocate memory
Update FillRectilinear.cpp
Update FillRectilinear.cpp
overlapp adjustment
Fix Crash
Update FillRectilinear.cpp
density tunning
density tunning
fine tunning
reserve polilines
Grid non-crossing for multiline
Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com>
Co-Authored-By: discip <53649486+discip@users.noreply.github.com>
* Improve multiline fill offset and polyline closure
Changed offset type from jtRound to jtMiter in multiline_fill for better geometry. Updated polyline conversion to require at least 3 points and ensured polylines are closed if not already. Updated FillGyroid, FillTpmsD, and FillTpmsFK to pass the 'close' argument to multiline_fill.
cleaning
FillAdaptive Noncross
Only use clipper if worth it
safeguard
fix overlap
Update FillRectilinear.cpp
FilllRectilineal multiline clipper
Update FillRectilinear.cpp
FilllRectilineal multiline clipper
Update FillRectilinear.cpp
Update FillRectilinear.cpp
fix 3d honeycomb
Simplify polylines
Update FillBase.cpp
Update FillBase.cpp
cleaning
Improved Multiline Function
This ensures `multiline_fill()` will correctly generate multiline infill with
closed loop polylines if the input infill line is a closedloop polyline. This
ensures that the multiline infill doesn't have little gaps or overlaps at the
"closed point" of the original infill line.
This changes how the tangent is calculated for the first and last points in a
polyline if the first and last points are the same, making it a closed loop.
Instead of just using the first or last line segment, it uses the line segment
between the points before the last point and after the first point, the same
way that all the other poly-line mid points are handled.
It also uses eigen vector operations to calculate the points instead of
explicitly calculating the x and y values. This is probably faster, and if not
then it is at least more concise.
Hibrid Multiline Function
Update FillRectilinear.cpp
Update FillRectilinear.cpp
Update FillRectilinear.cpp
Update FillRectilinear.cpp
clipperutils multiline hibrido
Update FillBase.cpp
Update FillBase.cpp
Update FillBase.cpp
multiline hibrido
arc tolerance
multiline con union
Update FillBase.cpp
Update FillBase.cpp
Update FillBase.cpp
Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com>
Co-Authored-By: Donovan Baarda <dbaarda@gmail.com>
* Switch multiline offset logic to Clipper2
Replaces Clipper-based multiline offset logic in FillBase.cpp with Clipper2, using InflatePaths and Union for offsetting and merging. Adds new conversion utilities in Clipper2Utils for handling Paths64 to Polygons/Polylines and updates headers accordingly.
* Refactor multiline_fill to always use Clipper2 logic
Removed the 'use_clipper' parameter from multiline_fill and updated all callers to use the new signature. The function now consistently applies Clipper2-based offset logic for multiline infill, simplifying the code and ensuring uniform behavior across fill patterns.
* Change offset join type to Round in multiline_fill
Replaces the Miter join type with Round in the InflatePaths call within multiline_fill. For smotther print travels.
* Increase max infill multiline to 10
Raised the maximum allowed value for the 'Fill Multiline' infill parameter from 5 to 10 to support more lines in infill patterns.
* Refactor multiline_fill to optimize offset logic
Replaces manual conversion of polylines to Clipper2 paths with Slic3rPolylines_to_Paths64 and filters short paths using std::remove_if. Uses ClipperOffset for path inflation and streamlines merging and conversion to polylines, improving performance and code clarity.
* half iteration because is bucle
* Funciona 1
Refactored the multiline_fill function to streamline the insertion of center lines by directly checking for odd line counts and removing redundant logic. This improves code clarity and reduces unnecessary checks.
* Refactor multiline_fill for improved offset logic
Reworked the multiline_fill function to simplify and clarify the logic for generating multiple offset lines. The new implementation computes offsets more explicitly for odd and even cases, creates a fresh ClipperOffset for each band, and improves conversion between Clipper2 paths and polylines. This enhances maintainability and correctness of the multiline fill generation.
* Quartercubic multiline
* fillplanePath
fix bounding box
Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com>
* fillconcentric multiline
Co-Authored-By: Ian Bassi <12130714+ianalexis@users.noreply.github.com>
* Update FillBase.hpp
* cleaning
* Refactor multiline_fill to clean polylines and reuse offsetter
Invalid polylines with less than two points are now removed before processing. The ClipperOffset object is created once and reused for each offset, improving efficiency and code clarity.
trigger build
* Optimize Filltrapezoidal
Refactored the trapezoidal fill pattern generation to precompute base row templates and reuse them with vertical translation, reducing redundant computations and improving code clarity. This change enhances performance and maintainability by avoiding repeated construction of row patterns within loops.
* Replace push_back with emplace_back for Polyline points
Updated Polyline point insertion from push_back to emplace_back for efficiency and clarity. Also refactored row copying logic to avoid in-place modification, improving code readability and safety.
* Update FillRectilinear.cpp
* Reserve space for poliline points
* Union not needed
* Update FillRectilinear.cpp
* unused functions
* compactado
Update FillRectilinear.cpp
* Adjust minimum rows for better performance
* Update FillRectilinear.cpp
---------
Co-authored-by: Ian Bassi <12130714+ianalexis@users.noreply.github.com>
Co-authored-by: discip <53649486+discip@users.noreply.github.com>
Co-authored-by: Donovan Baarda <dbaarda@gmail.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
Fix: Fixing the logic of the adaptive layer height for supports
Removing `tree_support_adaptive_layer_height` because its logic duplicates `independent_support_layer_height`
This new feature allows users to override flow ratios for the following extrusion path types:
* First layer (excluding Brims and Skirts)
* Outer walls
* Inner walls
* Overhang perimeters
* Sparse infill
* Internal solid infill
* Gap fill
* Support
* Support interfaces
* New materials
* Temps
* Full filament type list
* Improve nozzle temperature range validation messages
Separates minimum and maximum recommended temperature warnings for nozzle configuration + generig °c usage.
Co-Authored-By: Alexandre Folle de Menezes <afmenez@gmail.com>
* Material Updates
Co-Authored-By: Rodrigo <162915171+RF47@users.noreply.github.com>
* petg-cf10 should be petg-cf
options.
* Pla reduced range
* Adjust some temps
* FilamentTempType Temperature-based logic
* chamber temps
* Fromatting
* Filament chamber temperature range support
Introduces get_filament_chamber_temp_range to retrieve safe chamber temperature limits for filament types. Updates ConfigManipulation to use these limits instead of hardcoded values.
* add adhesion coefficient and yield strength
Replaces hardcoded material checks for adhesion coefficient and yield strength with lookup functions using extended FilamentType struct.
* Thermal length
* Fix
* Refactor filament type data to MaterialType class
Moved filament type properties and related lookup functions from PrintConfig.cpp into a new MaterialType class.
* Fix adhesion_coefficient
Co-Authored-By: SoftFever <softfeverever@gmail.com>
---------
Co-authored-by: Alexandre Folle de Menezes <afmenez@gmail.com>
Co-authored-by: Rodrigo <162915171+RF47@users.noreply.github.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
after enabling the ribbed outer wall
jira: STUDIO-10294
Change-Id: I08bd00c3c3ef643f4226ce0b882cd62ff680ae65
(cherry picked from commit cfeb574422741bbe48747aa7305fea2a13b6d834)
and fix wipe error when enable timelapse and in single color
and set rib wall as default
jira: none
Change-Id: Ic365bb7ee0ee6715c9d4f4f00b4bca9fd472c61a
(cherry picked from commit 89b59f1c41e0f360457622438a09237bfa1eaa18)