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
Fixes#11082
Slicing is going to the endless loop when the `Base pattern spacing` value is 0 for `Tree Slim` support.
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Change ironing angle setting to be an offset angle from the top surface angle rather offset from the layer 0 angle that changes on each layer.
* Change Ironing angle offset range from [-1,359] to [0,359].
-1 is redundant because it is the same behavior as 0 offset.
* Change ironing_angle new default value to 0.
* Update existing print profiles' hardcoded ironing_angles from -1 to 0 to reflect new default value.
* Add migration for old -1 ironing_angle settings. Remove logic for -1 ironing_angle.
* Add u8 prefix for degree symbol string
* Use solid_infill_direction instead of infill_direction for top surface infill direction. Use calculate_infill_rotation_angle to add offset to solid_infill_rotate_template if used.
* Update quality settings wiki for Ironing
* Set f->is_using_template_angle when making ironing filler objects
* Update quality_settings_ironing link from #angle to #angle-offset
---------
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
* 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>
* Optimize and simplify MarchingSquares.hpp, and fix it's test.
This changes the implementation to get the possible next directions for a cell
when building the tags and clearing them as the cells are visited during the
march, instead of adding the visited previous direction to the tags during the
march. The Dir enum has been turned into bit flags that for the possible next
directions with boolean operators for testing/setting/clearing them. This
simplifies and optimizes many operations during the march and building the
polygons.
The complicated/broken and unused partial support for cell overlap has been
removed, simplifying the overly confusing grid iteration logic.
The broken test has been fixed by removing the now gone `RasterBase` namespace
from `sla::RasterBase::Pixeldim` and `sla:RasterBase:Resolution`, and the
CMakeLists.txt entry uncommented.
make Dir into flags
* Further optimize MarchingSquares.hpp and improve comments.
* Switch from a single byte-vector containing tags and dirs for each cell to a
m_tags vector of bit-packed tags for each grid corner and an m_dirs vector
of packed 4bit dirs for each cell. Since each grid corner tag is shared by
the 4 adjacent cells this significantly reduces storage space and avoids
redundantly calculating each tag 4x. It also significantly improves memory
locality with each phase of calculating tags, calculating dirs, calculating
rings operating only on the tags or dirs data required without them being
interleaved with the data they don't need.
* Change NEXT_CCW to be initialized with a static constexpr lambda instead of
a manually entered table. This avoids typo errors manually building the
table.
* Optimize search_start_cell() so it can efficiently skip over cleared blocks
of 8 dirs in the packed m_dirs vector.
* Change the tags logical labeling to better suit the packed tags vector data.
This makes it a tiny bit more efficient to extract from the m_tags bitmap.
* Remove the now unused SquareTag enum class.
* Add comments explaining the algorithm, including corner-cases in cell
iteration.
* Remove unused Dir operators and get_dirs() argument, and clang-format.
* Fix some bugs and add stream output operators for debugging.
* Fix a bug building tags where `step(gcrd, Dir::right)` was not assigned to
update the gcrd grid point. Perhaps this should be a mutating method, or
even a += operator? Also when wrapping at the end of a row it was updating
the gcrd grid point by mutating the p raster point instead of itself.
Perhaps Grid and Raster points should be different types? Maybe even
templated?
* Fix a bug in get_tags() when the second row tags are packed into any of the
2 LSB's of the uint32_t blocks. In hind-sight obviously `>>(o - 2)` will not
shift left when `o < 2`.
* Move interpolation of the edge-crossings into a `interpolate()` method, and
make it shift bottom and right side points "out" by one to account for
raster pixel width. This makes the results track the raster shapes much more
accurately for very small windows.
* Make `interpolate_rings()` check for and remove duplicated points. It turns
out it's pretty common that two edge-crossing-points at a corner interpolate
to the same point. This can also happen for the first and last points.
* For Coord add `==` and `!=` operators, and use them wherever Coord's are
compared.
* Add `<<` stream output operators for Coord, Ring, and Dir classes. Add
`streamtags(<stream>)` and `streamdirs(<stream>)` methods for dumping the
tags and dirs data in an easy to understand text format. These make
print-debugging much easier.
* Add `assert(idx < m_gridlen)` in a bunch of places where grid-indexes are
used.
* For test_clipper_utils.cpp fix three "ambiguous overloading" compiler errors.
This just adds three `Polygons` qualifications to fix compiler errors about
ambiguous overloaded methods.
Note this file was formated with a mixture of tabs and spaces and had lots of
trailing whitespace. My editor cleaned these up resulting in a large looking
diff, but if you use `git diff -w` to ignore the whitespace changes you will
see it is actually tiny.
errros
* Update SLA/RasterToPolygons.* for MarchingSquares.hpp improvements.
Change the minimum and default window size from 2x2 to 1x1. Also remove the
strange pixel size re-scaling by (resolution/resolution-1).
The old MarchingSquares implementation had complications around a default
minimum 1 pixel "overlap" between cells which messed with the scaling a tiny
bit and meant when you requested a 2x2 window size it actually used a 1x1
window. Both of these meant you had to specify a window 1 pixel larger than
you really wanted, and you needed to undo the strange scaling artifact for
accurate dimensions of your results.
This has been fixed/removed in the new implementation, so the window is the
window, there is no overlap, and no strange miss-scaling.
* Fix test_marchingsquares.cpp and add StreamUtils.hpp.
This fixes the MarchingSquares unittests to both pass and be more strict than
they were before.
It also adds libslic3r/StreamUtils.hpp which includes some handy streaming
operators for standard libslic3r classes used to show extracted polys in the
unittests.
* Change Format/SL1.cpp to support the min 1x1 window for MarchingSquares.
* Fix the ring-walk termination condition.
Terminate the ring-walk when we return to the starting cell instead of when we
reach a cell with no remaining directions. This ensures we don't merge two
polygons if we started on an ambiguous cell.
* Revert the removal of duplicate points in interpolate_rings().
It turns out that duplicate points are only relatively common when using a 1x1
window. These happen when the line passes through the corner pixel on a
top-left corner in the raster, and the probability of this rapidly declines as
the window increases, so in many cases this filtering is just overhead. It can
also be potentially useful to see the points for every edge crossing even if
they are duplicates. This kind of filtering is already done and done better in
the polygon post-processing.
* rename `interpolate()` to `interpolate_edge()`, make it update the point
in-place, and add asserts to ensure the input point is a valid edge
interpolation point.
* Remove the duplicate point filtering from `interpolate_rings()` and simplify
it.
* Optimize directions building.
This optimizes `get_dirs_block8()` to rapidly skip over blocks where the tags
produce no directions (all tags are 1's or 0's), and also to build the
directions faster when it has to by fetching the whole blocks worth of tags at
once instead of cell-by-cell.
* Rename `get_tags()` to `get_tags9()` and make it fetch a row of nine tags
instead of the tags for a single cell.
* Optimize `get_dirs_block8()` to use `get_tags9()` to get the next nine tags
for the current and next rows and then shift through them to generate the
tags and directions for each cell in the block. Also abort early and just
return an empty block if the tags are all 0's or all 1's.
* Tiny optimization for `get_tags_block32()`.
This avoids using the `step()` method for a simple step-right that can be done
with a simple increment of the column. It also avoids re-calculating the
raster-coodinates for every corner, instead incrementing the column by
`m_window.c` until the end of a row.
* Fix svg output in test_marchingsquares.cpp for recreate_object_from_rasters.
These SVG's were not properly centered...
* Fix 2 static_casts for compiling on Windows.
Thanks to RF47 for pointing this out on the #10747 pull request.
* Make edge iteration use O(ln(N)) binary search instead of linear.
This should be much faster when the window size is large.
* Make `CellIt` into a `std::random_access_iterator_tag` so that
`std::lower_bound()` can use a binary search to find the point on the edge
instead of a linear search.
* Change `step()` to support an optional distance argument and make it modify
the `Coord` in-place instead of return a new one.
* Update tests for the `step()` change.
* Add Catch2 BENCHMARK tests for MarchingSquares.
This required enabling the benchmarks in the tests/CMakeLists.txt config.
* Add a _Loop<> specialization for parallel execution using ExecutionTBB.
This is something that could be added wherever you are going to use this, but
I intend on using this in multiple places so we might as add this once in one
place where it can be reused.
* Fix whitespace in messed up by tab-replacements.
My editor renders, and replaces, tabs as 8 spaces. This messed up the
indenting in tests/libslic3r/CMakeLists.txt and
tests/libslic3r/test_clipper_utils.cpp when I made tiny changes in them.
This fixes the indenting using 4 chars. Note it will still show as a diff
because it is replacing tabs with 4 spaces, and removing trailing whitespace.
But at least it's now indented correctly...
---------
Co-authored-by: Donovan Baarda <dbaarda@google.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Enhance GCode handling for Z-axis movements
- Updated `travel_to_z` method to include a `force` parameter, allowing forced Z movements.
- Modified GCode generation logic to ensure Z position is restored after unknown last positions.
- Enforce z restoreation after tool changer
* Improve filament_multitool_ramming logic
* fix indent
* fixes: 999 CMake Warnings at src/dev-utils/CMakeLists.txt:39 (add_custom_command)
* cmake clenup: adds PUBLIC/PRIVATE to libslic3r; attempt to reduce warnigns from eigen
* src/*/CMakeLists.txt: adds SYSTEM to arget_include_directories()
* src/*/CMakeLists.txt: removes duplicate sources from lisbslic3r_sources and SLIC3R_GUI_SOURCES"
* .gititnore: adds CMakeLists.txt.user and CMakeLists.txt.autosave
* deps_src/*/CMakeLists.txt: adds SYSTEM to arget_include_directories()
* removes #pragma once from .cpp file
As you can see, it's checkin the local variable
`custom_gcode_placeholders` which comes from
`custom_gcode_specific_placeholders()` which is:
```
const std::map<t_custom_gcode_key, t_config_option_keys>& custom_gcode_specific_placeholders()
{
return s_CustomGcodeSpecificPlaceholders;
}
```
not s_CustomGcodeSpecificOptions
* refactor Infill rotation template
* clean up comments
* set default solid_infill_rotate_template to empty
* Fix an issue that infill_direction solid_infill_direction not working as expected
* Add Extra Solid Infill Feature
Introduced a new feature to insert extra solid infills at specific layers for enhanced strength in 3D prints.
* fix doc error
* fix image name
* support "#K" for Explicit Layer List
* update wiki
* refactor Infill rotation template
* clean up comments
* set default solid_infill_rotate_template to empty
* Fix an issue that infill_direction solid_infill_direction not working as expected
* update based on feedback
Move many third-party components' source codes from the src folder to a new folder called deps_src. The goal is to make the code structure clearer and easier to navigate.
* Add a new feature to allow users to remap filament for a pre-painted model.
* Fix the color issues to support the theme
* clean up code
* Fix broken freetype-2.12.1.tar.gz link
* Add some new non-overlapping functions for rotation surfaces/infills
I can't post the entire package of changes yet, but this is just the beginning. These features do not affect the latest changes to the pattern rotation system. They are merely adding new functionality.
* Added relative rotation of the infill according to the template.
* Update PrintConfig.cpp
* Update PrintConfig.cpp
* Update PrintConfig.cpp
* Add height limitation
* Both sparse and solid. +one-time instructions
* implementation v3
need for clean code in future
* + Multiply Instructions
* Add solid layers into sparse infill
* Update Layer.hpp
* Update PrintObject.cpp
* Update Tab.cpp
* Remove some bugs and increase quality
* rename apply_model_direction to align_infill_direction_to_model
* Change the data type of top_surface_direction and bottom_surface_direction to float so that they are consistent with other infill direction parameters.
* remove top_surface_direction and bottom surface_direction options
* clean code
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Feature: Fuzzy Skin Extrusion Mode
This extension allows you to add new features to the fuzzy skin generator.
* Add auto switch to Arachne mode
* Move dialog to `update_print_fff_config` and update how `is_msg_dlg_already_exist` is used
---------
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
* SPE-2486: Refactor function apply_mm_segmentation() to prepare support for fuzzy skin painting.
(cherry picked from commit 2c06c81159f7aadd6ac20c7a7583c8f4959a5601)
* SPE-2585: Fix empty layers when multi-material painting and modifiers are used.
(cherry picked from commit 4b3da02ec26d43bfad91897cb34779fb21419e3e)
* Update project structure to match Prusa
* SPE-2486: Add a new gizmo for fuzzy skin painting.
(cherry picked from commit 886faac74ebe6978b828f51be62d26176e2900e5)
* Fix render
* Remove duplicated painting gizmo `render_triangles` code
* SPE-2486: Extend multi-material segmentation to allow segmentation of any painted faces.
(cherry picked from commit 519f5eea8e3be0d7c2cd5d030323ff264727e3d0)
---------
Co-authored-by: Lukáš Hejl <hejl.lukas@gmail.com>
* SPE-2486: Implement segmentation of layers based on fuzzy skin painting.
(cherry picked from commit 800b742b950438c5ed8323693074b6171300131c)
* SPE-2486: Separate fuzzy skin implementation into the separate file.
(cherry picked from commit efd95c1c66dc09fca7695fb82405056c687c2291)
* Move more fuzzy code to separate file
* Don't hide fuzzy skin option, so it can be applied to paint on fuzzy
* Fix build
* Add option group for fuzzy skin
* Update icon color
* Fix reset painting
* Update UI style
* Store fuzzy painting in bbs_3mf
* Add missing fuzzy paint code
* SPE-2486: Limit the depth of the painted fuzzy skin regions to make regions cover just external perimeters.
This reduces the possibility of artifacts that could happen during regions merging.
(cherry picked from commit fa2663f02647f80b239da4f45d92ef66f5ce048a)
* Update icons
---------
Co-authored-by: yw4z <ywsyildiz@gmail.com>
* Make the region compatible check a separate function
* Only warn about multi-material if it's truly multi-perimeters
* Improve gizmo UI & tooltips
---------
Co-authored-by: Lukáš Hejl <hejl.lukas@gmail.com>
Co-authored-by: yw4z <ywsyildiz@gmail.com>