* 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> |
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| .idea | ||
| cmake | ||
| deps | ||
| deps_src | ||
| doc | ||
| localization/i18n | ||
| resources | ||
| sandboxes | ||
| scripts | ||
| SoftFever_doc | ||
| src | ||
| tests | ||
| tools | ||
| .clang-format | ||
| .cursorignore | ||
| .dockerignore | ||
| .doxygen | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| build_flatpak.sh | ||
| build_linux.sh | ||
| build_release.bat | ||
| build_release_macos.sh | ||
| build_release_vs2022.bat | ||
| CLAUDE.md | ||
| CMakeLists.txt | ||
| LICENSE.txt | ||
| README.md | ||
| SECURITY.md | ||
| version.inc | ||
OrcaSlicer: an open source Next-Gen Slicing Software for Precision 3D Prints.
Optimize your prints with ultra-fast slicing, intelligent support generation, and seamless printer compatibility—engineered for perfection.
Official links and community
Official Website:
Github Repository:
Follow us:
Join our Discord community:
|
⚠️ CAUTION: Several clickbait and malicious websites, such as orca-slicer.com and orcaslicer.net, are pretending to be the official OrcaSlicer site. These sites may redirect you to dangerous downloads or contain misleading information. Our only official website is www.orcaslicer.com. If you come across any of these in search results, please report them as unsafe or phishing to help keep the community secure. |
Main features
- Advanced Calibration Tools
Comprehensive suite: temperature towers, flow rate, retraction & more for optimal performance. - Precise Wall and Seam Control
Adjust outer wall spacing and apply scarf seams to enhance print accuracy. - Sandwich Mode and Polyholes Support
Use varied infill patterns and accurate hole shapes for improved clarity. - Overhang and Support Optimization
Modify geometry for printable overhangs with precise support placement. - Granular Controls and Customization
Fine-tune print speed, layer height, pressure, and temperature with precision. - Network Printer Support
Seamless integration with Klipper, PrusaLink, and OctoPrint for remote control. - Mouse Ear Brims & Adaptive Bed Mesh
Automatic brims and adaptive mesh calibration ensure consistent adhesion. - User-Friendly Interface
Intuitive drag-and-drop design with pre-made profiles for popular printers. - Open-Source & Community Driven
Regular updates fueled by continuous community contributions. - Wide Printer Compatibility
Supports a broad range of printers: Bambu Lab, Prusa, Creality, Voron, and more. - Additional features can be found in the change notes.
Wiki
The wiki below aims to provide a detailed explanation of the slicer settings, including how to maximize their use and how to calibrate and set up your printer.
Please note that the wiki is a work in progress. We appreciate your patience as we continue to develop and improve it!
Download
Stable Release
📥 Download the Latest Stable Release
Visit our GitHub Releases page for the latest stable version of OrcaSlicer, recommended for most users.
Nightly Builds
🌙 Download the Latest Nightly Build
Explore the latest developments in OrcaSlicer with our nightly builds. Feedback on these versions is highly appreciated.
How to install
Windows
Download the Windows Installer exe for your preferred version from the releases page.
-
For convenience there is also a portable build available.
Troubleshooting
- If you have troubles to run the build, you might need to install following runtimes:
- MicrosoftEdgeWebView2RuntimeInstallerX64
- vcredist2019_x64
- Alternative Download Link Hosted by Microsoft
- This file may already be available on your computer if you've installed visual studio. Check the following location:
%VCINSTALLDIR%Redist\MSVC\v142
Windows Package Manager
winget install --id=SoftFever.OrcaSlicer -e
Mac
-
Download the DMG for your computer:
arm64version for Apple Silicon andx86_64for Intel CPU. -
Drag OrcaSlicer.app to Application folder.
-
If you want to run a build from a PR, you also need to follow the instructions below:
Quarantine
-
Option 1 (You only need to do this once. After that the app can be opened normally.):
- Step 1: Hold cmd and right click the app, from the context menu choose Open.
- Step 2: A warning window will pop up, click Open
-
Option 2: Execute this command in terminal:
xattr -dr com.apple.quarantine /Applications/OrcaSlicer.app -
Option 3:
-
Linux (Ubuntu)
- If you run into trouble executing it, try this command in the terminal:
chmod +x /path_to_appimage/OrcaSlicer_Linux.AppImage
How to Compile
All updated build instructions for Windows, macOS, and Linux are now available on the official OrcaSlicer Wiki - How to build page.
Please refer to the wiki to ensure you're following the latest and most accurate steps for your platform.
Klipper Note
If you're running Klipper, it's recommended to add the following configuration to your printer.cfg file.
# Enable object exclusion
[exclude_object]
# Enable arcs support
[gcode_arcs]
resolution: 0.1
Supports
OrcaSlicer is an open-source project and I'm deeply grateful to all my sponsors and backers.
Their generous support enables me to purchase filaments and other essential 3D printing materials for the project.
Thank you! :)
Sponsors:
|
|
Backers:
Ko-fi supporters ☕: Backers list
Support me
Some background
OrcaSlicer was originally forked from Bambu Studio, it was previously known as BambuStudio-SoftFever.
Bambu Studio is forked from PrusaSlicer by Prusa Research, which is from Slic3r by Alessandro Ranellucci and the RepRap community. OrcaSlicer incorporates a lot of features from SuperSlicer by @supermerill OrcaSlicer's logo is designed by community member Justin Levine (@freejstnalxndr).
License
- OrcaSlicer is licensed under the GNU Affero General Public License, version 3. OrcaSlicer is based on Bambu Studio by BambuLab.
- Bambu Studio is licensed under the GNU Affero General Public License, version 3. Bambu Studio is based on PrusaSlicer by PrusaResearch.
- PrusaSlicer is licensed under the GNU Affero General Public License, version 3. PrusaSlicer is owned by Prusa Research. PrusaSlicer is originally based on Slic3r by Alessandro Ranellucci.
- Slic3r is licensed under the GNU Affero General Public License, version 3. Slic3r was created by Alessandro Ranellucci with the help of many other contributors.
- The GNU Affero General Public License, version 3 ensures that if you use any part of this software in any way (even behind a web server), your software must be released under the same license.
- OrcaSlicer includes a pressure advance calibration pattern test adapted from Andrew Ellis' generator, which is licensed under GNU General Public License, version 3. Ellis' generator is itself adapted from a generator developed by Sineos for Marlin, which is licensed under GNU General Public License, version 3.
- The Bambu networking plugin is based on non-free libraries from BambuLab. It is optional to the OrcaSlicer and provides extended functionalities for Bambulab printer users.

