Commit Graph

3060 Commits

Author SHA1 Message Date
46a14abbaa Added default object color in MMU segmentation according to the default extruder color for printing the object. 2021-05-04 08:13:04 +02:00
71c60a5187 Follow-up of 168b4afbc2: Replaced forgotten lslices in the top and bottom layer propagation in MMU segmentation. 2021-05-03 22:11:04 +02:00
cd5fea8b42 Fixed compiler warnings 2021-05-03 21:50:40 +02:00
2d3eef4e84 Fixed possible warnings 2021-05-03 21:13:13 +02:00
fa8c319721 Fixed MMU segmentation for cases when a contour was whole colored by one color and a hole was whole colored by a different color. 2021-05-03 21:06:46 +02:00
5bfdaa7ac8 Parallelization of regions merging for MMU segmentation. 2021-05-03 21:01:52 +02:00
2e9f0d6eaf Fixed a few cases of missing colored segments in MMU segmentation.
Occasionally, some input polygons contained self-intersections that caused problems with Voronoi diagrams and consequently with the extraction of colored segments by function extract_colored_segments.
Also, occasionally input polygons contained several points very close together (distance between points is 1 or so). Such close points sometimes caused that the Voronoi diagram has self-intersecting edges around these vertices. This consequently leads to issues with the extraction of colored segments by function extract_colored_segments.
2021-05-03 20:56:39 +02:00
168b4afbc2 Fixed MMU segmentation for multi-volume objects.
MMU segmentation no longer works directly on lslices, instead of it works on custom merged regions. So lslices in PrintObject are no longer overwritten because of MMU segmentation.
All regions are scaled by SCALED_EPSILON before merging and shrunk back by SCALED_EPSILON after merging. That fixed issues with multi-volume objects when very close regions weren't merged.
Also, small expolygons and holes are filtered out that fixed missing segmentation at the boundary of two volumes in the case of multi-volume objects.
2021-05-03 20:37:14 +02:00
576c5b78e9 Added seed fill for MMU segmentation 2021-04-27 06:48:09 +02:00
be1b4ce18c Fixed compiler warnings 2021-04-27 00:41:20 +02:00
8a19cf9d64 Extended support of MMU segmentation backed for more than three colors.
Serialization and deserialization in TriangleSelector were extended to support up to 16 materials (3 unused states left for possible later extension). These changes also affect the encoding of data from custom supports and seams, but it is backward compatible with the previous encoding. And for custom supports and seams, it is produced exactly the same data encoding as before.
2021-04-27 00:37:49 +02:00
db55bd706e Fixed case in MMU segmentation when the infinity-edge in the Voronoi diagram has vertex0(), and vertex1() equals nullptr. 2021-04-27 00:36:22 +02:00
38bb7d2950 1) New methods PrintObject::num_regions() and ::has_region() to make
the code more readable and to highlight where PrintObject::region_volumes
   are actually set and consumed.
2) Replaced Slic3r::clamp() with std::clamp(). They differ in the order
   of their parameters, thus hopefully no new bugs were introduced.
3) Some refactoring of MultiMaterialSegmentation for efficiency.
2021-04-22 11:41:26 +02:00
4f950343c8 MMU segmentation refactoring: Most of the MMU segmentation code
was extracted to its own file.
2021-04-20 15:07:05 +02:00
40d9e51b5e WIP: Added support for top and bottom layers for MMU segmentation. 2021-04-19 19:21:06 +02:00
368b48b0a0 WIP: Allows regions of MMU segmentation to be trimmed by chosen width. 2021-04-19 07:12:42 +02:00
f49ceb1e0f WIP: MMU segmentation without top and bottom layers 2021-04-19 07:04:50 +02:00
e3c33844d5 WIP: Duplicated the FDM support gizmo for the MMU segmentation 2021-04-19 07:01:11 +02:00
48a93e40fb After issuing the color change custom G-code, which is most likely
just M600, reset the internal retract counter, so that a retract
will happen after the firmware returns from M600 to the initial position.

Fixes "Blobs on print after manual color change #6362"
2021-04-15 16:29:30 +02:00
526233ca47 Modified version of automatic downscale on load of objects too big 2021-04-14 14:46:49 +02:00
0625788583 Fixed obvious bug in move operator, discovered by clang lint ran by Tamas. 2021-04-14 14:25:30 +02:00
c1179fc2c7 Marked the unsafe ClipperUtils offset functions with CLIPPERUTILS_UNSAFE_OFFSET
Replaced some of the unsafe offset functions with safe variants.
Please test the
1) print bed from STL function
2) concentric infill
2021-04-13 13:28:37 +02:00
e8643125d8 Clipper / ClipperUtils:
1) Let Clipper use int32_t for representing its coordinates. This
   reduces memory and allows to skip conversion between Slic3r Polygon
   and Clipper polygon.
2) Disable additional offset before executing the Clipper Offset algorithm.
   We don't see any reason for that and it required 64bit Clipper coordinates,
   which were disabled with 1).
2021-04-13 11:31:54 +02:00
dbd1c09523 FDM snug supports: New parameter "closing radius", inspired by Cura's
support_join_distance
2021-04-12 14:56:36 +02:00
ef6ce8792d Fix of brim under supports 2021-04-08 16:36:52 +02:00
8fd731f7a0 New FDM support sparse infill zig-zag algorithm.
Fixed some old support and infill issues.

Fixes support problem #4295
Fixes Parts of interface layer extends beyond supports and cannot be printed
Fixes support missing under horizontal overhang #6058
Fixes Slicer double-traces small sections of Rectilinear Supports, causes
Fixes plastic buildup and nozzle crashes #4951
Fixes Add "Angle Interface layers" #2969
2021-04-08 15:29:40 +02:00
08ca5b29f0 Fix slow cancellation of rasterization step
fixes #6253
2021-04-08 14:36:37 +02:00
e8af080346 Merge remote-tracking branch 'origin/tm_sl1_import_fix' 2021-04-07 13:56:14 +02:00
bed3321324 Small improvement to "least supports" method 2021-04-07 12:51:02 +02:00
773116b777 Allow auto-rotation of objects not completely inside bed.
Don't use SLAPrintObject as the input for optimization. Use ModelObject and pass the print config to the optimization in RotoptimizeJob::prepare()
2021-04-07 12:51:02 +02:00
5443f77489 Increase performance of "best misalignment" method 2021-04-07 12:51:02 +02:00
f3e3aabec7 Least supports optimization revived.
Fix missing include on Win32


Cleanup benchmarking code
2021-04-07 12:51:02 +02:00
0194094afa Method selection implemented 2021-04-07 12:51:02 +02:00
4eb13a407f Extend execution framework with convenience functions 2021-04-07 12:51:02 +02:00
46fd722f3c Unite cancel callback and status function 2021-04-07 12:51:02 +02:00
de8bb00fa9 Speed up rotation optimizer
- No float to double conversion
- Solving issue of random (very similar) results due to the parallel summation of floats
2021-04-07 12:51:02 +02:00
7760d3fbc4 Add new execution framework
Inspired by std::execution
2021-04-07 12:51:02 +02:00
4293a68aaa Reverting to old rotation optimizer object-function.
Keep the performance optimizations though
2021-04-07 12:51:02 +02:00
9aac1b6fa5 Fix issue with importing sl1 files with non-ascii filenames. 2021-04-07 12:41:38 +02:00
9660d35f8c An attempt to fix time estimates for 'Marlin (legacy)' flavor
Old M204 S sets both printing and travel accelerations, which must be
accounted for now when the latter was separated.
2021-04-06 15:45:49 +02:00
9b2d9fb01a GCodeProcessor added travel acceleration 2021-04-06 15:45:49 +02:00
52af90ed8f GCodeProcessor use new flavor gcfMarlinFirmware 2021-04-06 15:45:49 +02:00
8c89bf748b Implemented new acceleration control behaviour for the new Marlin firmware flavor:
- show extra travel acceleration settings in 'Machine limits' page in Printer Settings
    when the new firmware flavor is selected

- updated tooltips on the config values (they were basically wrong even in the current version)

- 'Marlin (legacy)' firmware flavor behaviour should not change: it exports M204 Pa Rb Ta
    (where a, b are the values from machine limits) at the beginning of gcode and it uses
    M204 S... for feature type dependent acceleration settings (legacy variant of M204 P.. T..)

- new Marlin Firmware exports M204 Pa Rb Tc (where a,b,c are the values from machine limits).
    Feature type dependent acceleration is set using M204 P..., not overriding the travel acceleration.
2021-04-06 15:45:49 +02:00
f0e9ad46ec Renamed the gcfMarlin enum value to gcfMarlinLegacy so we never mistake it for the new one
There should be no functional change.
2021-04-06 15:45:49 +02:00
151a76ee92 Duplicated Marlin firmware flavor to 'Marlin (legacy)' and 'Marlin Firmware'
The two flavors should be identical after this commit, except that GCodeProcessor.cpp was not updated. This shall be done in a later step.
2021-04-06 15:45:49 +02:00
58a811a638 Wipe tower: correctly detect first layer even with 'No sparse layers' option enabled 2021-04-06 15:37:39 +02:00
43d9e38325 Wipe tower: reorder extruders so first layer starts with soluble if possible
That way it will not be wiped on first layer
2021-04-06 15:37:39 +02:00
5d636ab853 Wipe tower: respect first_layer_speed 2021-04-06 15:37:39 +02:00
3459231111 Wipe tower: set travel feedrate for a move from custom toolchange position to the wipe tower (#5483) 2021-04-05 23:39:27 +02:00
67bc2e472f Wipe tower: fix wipe moves after recent changes 2021-04-05 23:39:27 +02:00