Commit Graph

3277 Commits

Author SHA1 Message Date
Vojtech Bubnik
dd72016159 FDM backend refactoring for const correctness, clarity ... 2021-05-06 15:08:57 +02:00
Vojtech Bubnik
b5573f959b Refactoring for code clarity: Replaced this->m_xxx with m_xxx
as the m_ prefix already signifies a class local variable.
2021-05-06 14:43:36 +02:00
Vojtech Bubnik
f16d4953be Removing offset2 from Perl bindings and other minor cleanup. 2021-05-06 14:29:20 +02:00
enricoturri1966
ff632a9ff2 Tech ENABLE_ALLOW_NEGATIVE_Z-> Disable sinking objects for SLA printer 2021-05-06 14:04:07 +02:00
Vojtech Bubnik
0ca6b12da1 Print/PrintObject/PrintRegion refactoring:
Newly the PrintObjects own PrintRegions and Print contains references
to PrintRegions owned by PrintObjects, so that a PrintRegion of the same
content is referenced by Print only once.

The refactoring is a WIP to support multi-material painting.
2021-05-06 13:01:09 +02:00
Vojtech Bubnik
ee15f00574 FDM backend refactoring: Return PrintRegion by reference, not by pointer.
Added PrintRegion hashing.
2021-05-05 18:13:58 +02:00
Vojtech Bubnik
714149dab2 WIP: Moving ownership of PrintRegions to PrintObjects. 2021-05-05 16:21:55 +02:00
Vojtech Bubnik
a7c67415c7 Another try of fixing compilation on gcc. 2021-05-05 14:34:54 +02:00
Vojtech Bubnik
18001fbb4e Fixing compilation on gcc 2021-05-05 14:32:19 +02:00
Vojtech Bubnik
d6c5961eb0 Factored out the Print::apply() method and its dependending free functions
into PrintApply.cpp module.
2021-05-05 14:30:09 +02:00
Vojtech Bubnik
72ce8cb28d PrintRegion refactoring: Getting rid of the Print pointer. 2021-05-05 14:17:36 +02:00
Vojtech Bubnik
a2de09e11e Fixing unit tests. 2021-05-05 13:19:01 +02:00
enricoturri1966
a91306032c Project dirty state manager -> Fixed crash when loading/saving a 3mf file 2021-05-05 13:17:20 +02:00
Vojtech Bubnik
7d4b3f2992 Fix of safety_offset() after ClipperUtils refactoring.
Fixes Solid infill where there should be none #6482
Also the safety offsetting was revised to be enabled only where needed,
the "do safety offset" is now easy to discover by
a new ApplySafetyOffset::Yes enum, and safety offset over union, which
is better done by offset() / offset_ex() has been replaced with
new union_safety_offset() / union_safety_offset_ex() functions, which
better convey their meaning and which could be better optimized than
union() with the safety offset applied.
2021-05-05 12:16:47 +02:00
Vojtech Bubnik
fd3dd1611c Fixed alignment of sparse infill over multiple layers of the same region,
which was broken with 68666de521b1cb15e41ac6728c0e8d3b4b0d4ed0
"Reworked the "new" bridging to respect the bridge_flow_ratio
by maintaining extrusion spacing, but modifying the extrusion width
and / or height."
2021-05-04 18:27:53 +02:00
Vojtech Bubnik
00835c7367 Fixing compilation on clang in debug mode. 2021-05-04 16:13:40 +02:00
Vojtech Bubnik
1aef86f650 Implemented generic mechanism for executing tasks on UI thread synchronously
from the background slicing thread, that supports cancellation.
The generic mechanism is used for generating thumbnails into G-code and
Fixes Fix deadlock when canceling the slicing while gcode is creating thumbnails #6476
Thanks @supermerill for pointing out the issue.
2021-05-04 16:07:32 +02:00
enricoturri1966
cb294e0b3e Follow-up of 15c32d636d -> Small refactoring 2021-05-04 13:31:07 +02:00
enricoturri1966
15c32d636d Seams detection for gcode saved with other slicers 2021-05-04 12:45:51 +02:00
Vojtech Bubnik
5cc6dc59dc Fixed compilation with GCC 2021-05-04 11:22:38 +02:00
Vojtech Bubnik
a7368b9deb Fixing thread-safe StaticConfig creations #6477
fix un-threadsafe code for creating config enum hashtable. #6475
2021-05-04 11:03:26 +02:00
Lukáš Hejl
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
Lukáš Hejl
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
Lukáš Hejl
cd5fea8b42 Fixed compiler warnings 2021-05-03 21:50:40 +02:00
Lukáš Hejl
2d3eef4e84 Fixed possible warnings 2021-05-03 21:13:13 +02:00
Lukáš Hejl
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
Lukáš Hejl
5bfdaa7ac8 Parallelization of regions merging for MMU segmentation. 2021-05-03 21:01:52 +02:00
Lukáš Hejl
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
Lukáš Hejl
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
enricoturri1966
ede14251b1 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_project_dirty_state 2021-05-03 16:05:22 +02:00
Vojtech Bubnik
ab74ea5c90 One more fix after merge. 2021-05-03 15:30:10 +02:00
Vojtech Bubnik
2aadc1cefa Fixing after merge. 2021-05-03 15:28:03 +02:00
Vojtech Bubnik
eb66111eda Merge branch 'vb_clipper_optimization' 2021-05-03 15:24:04 +02:00
Vojtech Bubnik
ef07644bf2 Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2021-05-03 15:23:57 +02:00
Vojtech Bubnik
7563c885a1 Fixing compiler warnings 2021-05-03 15:00:23 +02:00
enricoturri1966
1c3090b11f Tech ENABLE_ALLOW_NEGATIVE_Z-> Layers height editing related fixes 2021-05-03 14:28:55 +02:00
Vojtech Bubnik
96f8744e05 Another fix for C++ conformant compilers 2021-05-03 11:55:23 +02:00
Vojtech Bubnik
09a80d954c Further rework of ClipperUtils: Replaced many to_polygons() /
to_expolygons() calls with templated ClipperUtils variants to avoid
memory allocation and copying.
2021-05-03 11:39:53 +02:00
Lukáš Hejl
62592cab48 Added missing include (GCC 11.1) 2021-05-01 22:33:59 +02:00
enricoturri1966
395164c7a1 Fixed conflicts after merge with master 2021-04-30 14:54:58 +02:00
Lukas Matena
95f5b82d6a Improved MM priming lines placement on circular beds (#6459) 2021-04-30 13:11:33 +02:00
Vojtech Bubnik
9fbba855ef Clipper optimization:
1) Removed the already commented-out scaling / unscaling when doing
   "safe offsetting"
2) Removed some of the "safe offsetting" at calls where it never was used.
3) Reworked Clipper & ClipperUtils to pass Polygons / ExPolygons / Surfaces
   as input parameters without conversion to ClipperLib::Paths. This
   should save a lot of memory allocation and copying.
4) Reworked conversions from ClipperLib::Paths & PolyTree to Polygons /
   ExPolygons to use the move operator to avoid many unnecessary allocations.
5) Reworked some "union with safe ofsetting" to "offset_ex", which should
   be cheaper.
2021-04-30 11:49:57 +02:00
enricoturri1966
28d01542ed Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_custom_gcode_detection 2021-04-29 11:07:47 +02:00
Vojtech Bubnik
b327314b02 Layer::make_perimeters() - when merging regions, use OffsetEx instead
of safety offset of UnionEx, which may not be robust.
2021-04-29 11:05:11 +02:00
enricoturri1966
9086542a08 Follow-up of 2c6472ebc3 -> Ensure backward compatibility 2021-04-28 16:06:49 +02:00
enricoturri1966
c58572deaa Tech ENABLE_ALLOW_NEGATIVE_Z->Fixed object popping up after editing layer range fields 2021-04-28 11:07:15 +02:00
enricoturri1966
7ae77c06d0 Tech ENABLE_SEAMS_VISUALIZATION -> Added threshold to place seams 2021-04-27 15:12:45 +02:00
enricoturri1966
15f376e468 Tech ENABLE_SEAMS_VISUALIZATION -> Fixed build on Mac 2021-04-27 11:11:21 +02:00
enricoturri1966
2c6472ebc3 Replace label Skirt with Skirt/Brim in preview legend 2021-04-27 10:46:42 +02:00
enricoturri1966
076fdc90c0 Tech ENABLE_SEAMS_VISUALIZATION -> 1st installment of seams visualization in preview 2021-04-27 09:45:15 +02:00
Lukáš Hejl
576c5b78e9 Added seed fill for MMU segmentation 2021-04-27 06:48:09 +02:00
Lukáš Hejl
be1b4ce18c Fixed compiler warnings 2021-04-27 00:41:20 +02:00
Lukáš Hejl
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
Lukáš Hejl
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
Lukas Matena
978b359492 Fix normal direction when exporting STL (#6406)
The export function does not depend on Model/ModelObject::mesh() family of functions,
changing them might break the already too brittle code.
2021-04-26 19:58:08 +02:00
Vojtech Bubnik
d1cfdcb49e Refactoring of StaticPrintConfig & derived classes:
1) Using boost::preprocessor to reduce code duplicities when defining
   new configuration values.
2) Implemented static hash() and operator== on StaticPrintConfig derived
   classes to support hash tables of instances thereof.
2021-04-26 18:37:10 +02:00
Lukas Matena
5783cc62fb Wipe tower priming lines are placed at origin with custom bed shapes
Custom shapes were previously detected as circular and the lines were placed off the bed
2021-04-26 09:21:18 +02:00
Vojtech Bubnik
9f4e9da5c6 Merge branch 'tm_vb_clipper_eigen' 2021-04-23 11:44:25 +02:00
enricoturri1966
d4695827ce Tech ENABLE_ALLOW_NEGATIVE_Z -> Keep sinking instances as sinking after applying rotate gizmo 2021-04-23 08:29:29 +02:00
enricoturri1966
70ec034281 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_custom_gcode_detection 2021-04-22 15:30:27 +02:00
enricoturri1966
52583bbe30 Extrusions in custom start g-code forced to be at first layer height level 2021-04-22 15:15:19 +02:00
Vojtech Bubnik
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
tamasmeszaros
ea26581959 Move iterator stuff from polygon to multipoint 2021-04-22 09:44:08 +02:00
Vojtech Bubnik
3b86cb3a3c Added missing files 2021-04-22 09:26:07 +02:00
Vojtech Bubnik
8d0950ce12 Convincing ClipperLib to use Slic3r's own Point type internally. 2021-04-21 20:15:49 +02:00
tamasmeszaros
a15c16d40d Use new libnest backend for MinAreaBoundingBox wrapper 2021-04-21 17:21:43 +02:00
tamasmeszaros
657d19482b Minor code refinements 2021-04-21 16:49:11 +02:00
tamasmeszaros
d069591514 Write hollow flag to SL1 files if any object is hollowed. 2021-04-21 16:29:12 +02:00
tamasmeszaros
dca67822d1 Eliminate warnings caused by changes to aid new libslic3r backend 2021-04-21 16:02:31 +02:00
tamasmeszaros
ad19ab219d New custom backend for libnest2d using libslic3r types
Adapted to new clipper->eigen mod
2021-04-21 16:02:25 +02:00
enricoturri1966
82d577645e Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_custom_gcode_detection 2021-04-21 14:52:52 +02:00
Vojtech Bubnik
0c1953a929 Further fixes of the first_layer_height refactoring. 2021-04-21 14:34:49 +02:00
enricoturri1966
c8b83ae011 Tech ENABLE_ALLOW_NEGATIVE_Z -> Allow move gizmo to place an object under the printbed 2021-04-21 12:41:43 +02:00
enricoturri1966
c7771a576b Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_custom_gcode_detection 2021-04-21 12:32:17 +02:00
Vojtech Bubnik
d9ed9149ae 1) Moved first_layer_heigth frrom PrintObjectConfig to PrintConfig.
Thus the first_layer_height is no more object specific. That makes
   a lot of sense due to the brim calculation being performed over
   all layers at once and due to future merging of supports of
   different objects at first layer.
2) Because now first_layer_height is print specific, the relative
   first layer height derived from the object layer height was partially
   disabled: First the relative first layer height is converted to
   an absolute value when importing config, second the side text
   was changed from "mm or %" to "mm". Still the UI allows entering %.

Both changes may be controversial, let's wait for user feedback.
2021-04-21 12:09:43 +02:00
Vojtech Bubnik
4f950343c8 MMU segmentation refactoring: Most of the MMU segmentation code
was extracted to its own file.
2021-04-20 15:07:05 +02:00
enricoturri1966
f486dedb52 Disabled tech ENABLE_PROJECT_DIRTY_STATE_DEBUG_WINDOW 2021-04-20 10:41:38 +02:00
Lukáš Hejl
40d9e51b5e WIP: Added support for top and bottom layers for MMU segmentation. 2021-04-19 19:21:06 +02:00
Lukáš Hejl
368b48b0a0 WIP: Allows regions of MMU segmentation to be trimmed by chosen width. 2021-04-19 07:12:42 +02:00
Lukáš Hejl
f49ceb1e0f WIP: MMU segmentation without top and bottom layers 2021-04-19 07:04:50 +02:00
Lukáš Hejl
e3c33844d5 WIP: Duplicated the FDM support gizmo for the MMU segmentation 2021-04-19 07:01:11 +02:00
Vojtech Bubnik
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
enricoturri1966
526233ca47 Modified version of automatic downscale on load of objects too big 2021-04-14 14:46:49 +02:00
Vojtech Bubnik
0625788583 Fixed obvious bug in move operator, discovered by clang lint ran by Tamas. 2021-04-14 14:25:30 +02:00
Vojtech Bubnik
7112ac61b6 Replacing ClipperLib::IntPoint with Eigen point as a first step to
make the ClipperLib paths and polygons compatible with Slic3r paths
and polygons without conversions and memory allocations.
2021-04-14 09:22:51 +02:00
Vojtech Bubnik
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
Vojtech Bubnik
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
Vojtech Bubnik
dbd1c09523 FDM snug supports: New parameter "closing radius", inspired by Cura's
support_join_distance
2021-04-12 14:56:36 +02:00
enricoturri1966
fbde7de98a Do not convert custom gcode extrusion to travel 2021-04-09 12:52:11 +02:00
Vojtech Bubnik
ef6ce8792d Fix of brim under supports 2021-04-08 16:36:52 +02:00
Vojtech Bubnik
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
tamasmeszaros
08ca5b29f0 Fix slow cancellation of rasterization step
fixes #6253
2021-04-08 14:36:37 +02:00
tamasmeszaros
e8af080346 Merge remote-tracking branch 'origin/tm_sl1_import_fix' 2021-04-07 13:56:14 +02:00
tamasmeszaros
bed3321324 Small improvement to "least supports" method 2021-04-07 12:51:02 +02:00
tamasmeszaros
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
tamasmeszaros
5443f77489 Increase performance of "best misalignment" method 2021-04-07 12:51:02 +02:00
tamasmeszaros
f3e3aabec7 Least supports optimization revived.
Fix missing include on Win32


Cleanup benchmarking code
2021-04-07 12:51:02 +02:00
tamasmeszaros
0194094afa Method selection implemented 2021-04-07 12:51:02 +02:00
tamasmeszaros
4eb13a407f Extend execution framework with convenience functions 2021-04-07 12:51:02 +02:00
tamasmeszaros
46fd722f3c Unite cancel callback and status function 2021-04-07 12:51:02 +02:00
tamasmeszaros
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
tamasmeszaros
7760d3fbc4 Add new execution framework
Inspired by std::execution
2021-04-07 12:51:02 +02:00
tamasmeszaros
4293a68aaa Reverting to old rotation optimizer object-function.
Keep the performance optimizations though
2021-04-07 12:51:02 +02:00
tamasmeszaros
9aac1b6fa5 Fix issue with importing sl1 files with non-ascii filenames. 2021-04-07 12:41:38 +02:00
enricoturri1966
edbb1d0f69 Project dirty state manager -> presets dirty state 2021-04-06 16:29:05 +02:00
Lukas Matena
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
enricoturri1966
9b2d9fb01a GCodeProcessor added travel acceleration 2021-04-06 15:45:49 +02:00
enricoturri1966
52af90ed8f GCodeProcessor use new flavor gcfMarlinFirmware 2021-04-06 15:45:49 +02:00
Lukas Matena
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
Lukas Matena
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
Lukas Matena
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
Lukas Matena
58a811a638 Wipe tower: correctly detect first layer even with 'No sparse layers' option enabled 2021-04-06 15:37:39 +02:00
Lukas Matena
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
Lukas Matena
5d636ab853 Wipe tower: respect first_layer_speed 2021-04-06 15:37:39 +02:00
enricoturri1966
144e37c274 1st installment of project dirty state manager 2021-04-06 10:00:17 +02:00
Lukas Matena
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
Lukas Matena
67bc2e472f Wipe tower: fix wipe moves after recent changes 2021-04-05 23:39:27 +02:00
Lukas Matena
a6ddab856b Wipe tower: refactoring of brim and solid infill on first layer 2021-04-05 23:39:27 +02:00
Lukas Matena
f6de946dd7 Wipe tower: don't use soluble filament for perimeters, sparse infill or first layer 2021-04-05 23:39:27 +02:00
Lukas Matena
3ed68ac28a Wipe tower: slightly changed finish_layer logic so it can be called after any toolchange 2021-04-05 23:39:27 +02:00
Lukas Matena
cc7ef40e20 Wipe tower: remove unfinished square wipe tower option 2021-04-05 23:39:27 +02:00
Lukas Matena
97c4c02001 Wipe tower: don't do sparse infill when there is a soluble filament above it 2021-04-05 23:39:27 +02:00
enricoturri1966
ab3890dab5 Follow-up of 3fce8398f0 - Fixed build warnings 2021-03-31 08:54:58 +02:00
enricoturri1966
3fce8398f0 Follow-up of 6ffa51da58 - Modified export of final M73 lines for remaining time to next printer stop accordingly to firmware specifications 2021-03-30 09:59:10 +02:00
Vojtech Bubnik
acce99f29b Fixed some compilation warnings in MutablePolygon.cpp 2021-03-29 14:15:18 +02:00
enricoturri1966
68303059a6 Extract bed size from gcode produced with Simplify3d 2021-03-25 09:23:14 +01:00
enricoturri1966
cfcce6f29a Follow-up of 10c3e82917 - Updated version for unpublished techs in Technologies.hpp 2021-03-24 14:30:46 +01:00
enricoturri1966
645e5b6862 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_extended_m73 2021-03-24 12:05:36 +01:00
enricoturri1966
9c951b3108 Fixed parsing of g-code files generated by newer versions of Simplify3D 2021-03-24 11:36:16 +01:00
enricoturri1966
a0feb0f652 Preview and G-code viewer - Fixed synchronization between markers for pause print, color changes, custom g-code, retractions, deretractions and current line shown in g-code window 2021-03-23 12:46:04 +01:00
Lukas Matena
cafa5b26a8 Compilation fixes 2021-03-23 12:40:29 +01:00
Vojtech Bubnik
af9c7c967f Implementing a new switch for the shape of support towers:
expanded to a grid (the old way) vs.
snug (like the upstream Slic3r, Cura or Ideamaker).

Snug supports suffered from the degeneracies when merging overhang islands
over a large number of layers when projecting the support towers down.
We borrowed the idea & a bit of code from Cura by simplifying the support
polygons by closing the concave cracks, see the smooth_outward() function
and the MutablePolygon class.

Fixes Support problems with models with hole in the walls. #555
Fixes Support in the Air #740
Fixes [Bug] Supports generated beyond bed edges (X<0 and X>250) and where none are needed. #902
Fixes Unable to remove support material/can't change support "inflation distance" #2708
Fixes FR: support inflation and support conform to boundary #4783
Fixes Support blocker not working on this model #1346
Fixes Unnecessary support material #1993
Fixes support blocker enforcer issue #6240
2021-03-23 11:06:45 +01:00
Vojtech Bubnik
00295919bf Fixes of MutablePolygon 2021-03-23 11:06:45 +01:00
enricoturri1966
6ffa51da58 1st installment of export to gcode of M73 lines for remaining time to next printer stop 2021-03-23 09:05:52 +01:00
enricoturri1966
b6470c3390 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-22 08:39:44 +01:00
tamasmeszaros
aa2d8915ef Fix crash caused by boost log trivial on mac 2021-03-19 14:03:28 +01:00
tamasmeszaros
8295f81685 Fix mac warnings 2021-03-19 14:03:28 +01:00
Vojtech Bubnik
6f3f3624c5 Fixing FDM support bottom zero interface layers, where one dense
interface layer was errorneously created.

Follow-up to 00db3dc419
73b88e6ce0
referencing the issues fixed by the above commits:
Fixes Allow to disable raft under support structures. #3772
Fixes Separate counts for floor and roof support interface layers #4288
2021-03-19 13:39:20 +01:00
Vojtech Bubnik
9f09f03228 Refactoring of FDM support generator:
1) If "support on build plate only" is enabled, the support columns are
   newly trimmed to not land on top of an object. However this may make
   the column too small to be stable.
2) Support enforcers newly take precedence over "supports on build plate only"
   and over "don't support bridges".
3) Some refactoring of the support generator code for clarity: Reduced
   some of the worst spagetti offenders.

Fixes Support generated even if support on build only activated #915
Fixes Bug: supports on build plate only #1340
Fixes Bottom interface layer is not generated , support on build plate only. (long open defect) #4199
Fixes option "supports on build plate only" does not work #3980

Fixes No support interface layers generated #1997
Fixes Feature Request: Option to combine results of 'support from build plate only' and 'support enforcers only' #2801
Fixes Support interface isn't generated: build plate only + blocked by model + support enforcer #3831
Fixes Support Enforcer don't create interface layers #5748
Fixes Support Enforcers Don't Have Top Loops/Raft #1870
Fixes Don't cancel support enforcers with "don't support bridges" #5105
2021-03-19 11:21:35 +01:00
Vojtech Bubnik
a95607d7bf Fixing an FDM support generator bug, where some of the support columns
were missing abruptly when going down.
The issue was caused by extracting support areas from a grid and
filtering the extracted islands by intersection with the input islands.
Sometimes the input islands were a bit bigger than the extracted contour,
thus some of the samples of the input islands did not fall into
the extracted contour.
2021-03-17 12:25:49 +01:00
tamasmeszaros
b13239e4ca Fix previous commit's missing include 2021-03-17 10:05:24 +01:00
tamasmeszaros
0c4fb6dfcc CGAL may have infinite face vertex ranges.
Calling vtc.size() may end up in an infinite loop. Also, quads do not appear in CGAL meshes.
2021-03-17 09:42:03 +01:00
tamasmeszaros
6d58546aef Fix unmarked failed holes on first gizmo opening 2021-03-16 09:31:03 +01:00
tamasmeszaros
3d0d96d8f9 Working hole drilling one by one without linear slowdown. 2021-03-16 09:31:03 +01:00
tamasmeszaros
6059d89bc8 Avoid mesh alteration when converting to CGAL Surface_Mesh
orient_to_bound_a_volume tends produce incorrect results.
2021-03-16 09:31:03 +01:00
tamasmeszaros
4b9de0398f Drill holes one by one and display warning of any of them fails
Drill with cgal::minus for now
2021-03-16 09:31:03 +01:00
Lukas Matena
fc7762e465 Added a missing include (Linux) 2021-03-16 07:25:31 +01:00
Vojtech Bubnik
01406fd521 Worked around some quirky Linux file system issues. Namely
the Chromebooks share their file system to Linux using the 9p file
system, which does not support setting file ownership. Newly PrusaSlicer
will detect platform and it will not panick if copy_file() cannot set
file ownership after copying. It just logs the incident, and on
chromebooks the loglevel for that incident is "Info", not "Error".

Adjusted the full screen mode to contain menu bar.
Moved Platform.cpp/hpp to libslic3r
2021-03-15 16:19:22 +01:00
enricoturri1966
db71a6308d Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-15 11:27:43 +01:00
Vojtech Bubnik
fb9d537b58 Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2021-03-15 10:36:22 +01:00
Vojtech Bubnik
ba5e8860cb Fixing some compilation warnings 2021-03-15 10:36:03 +01:00
Oleksandra Yushchenko
e002f0066f
Ys code refactoring (#6227)
* GUI_ObjectList code refactoring:
The MenuFactory structure contains functions related to the context menu and bitmaps used to different volume types.
The SettingsFactory structure contains functions to getting overridden options, its bundles and bitmaps used to setting categories.

Fixed bugs/crashes:
1. Add object -> Add Settings from 3D scene -> Right click on object => Part's Settings list instead of object's
   (Same behavior if something else but Object is selected in ObjectList)
2. Add settings to the part -> Change part type to the "Support Blocker/Enforcer" -> Settings disappears (it's OK) but =>
   Save Project -> Open project => Support Blocker/Enforcer has a settings
3. Add part for object -> Change type of part -> Change monitor DPI -> old type icon appears
4. Select all instances in ObjectList -> Context menu in 3D scene -> Add Settings -> Select some category -> Crash

* ObjectLayers: Fixed a crash on re-scaling, when some layer range is selected

* Fixed OSX build

* Added menu item "Split to Objects" for multipart objects

+ Fixed bug: Add 2 parts,
             Add some settings for one part
             Delete part without settings => Single part object without settings, but settings are applied for the object.

+ Next refactoring: use same menu for Plater and ObjectList
2021-03-15 10:04:45 +01:00
Vojtech Bubnik
75ad7f262e Linux with precompiled headers wants Config.hpp header in PrintConfig.cpp 2021-03-15 09:55:57 +01:00
Vojtech Bubnik
a9c3d270e6 ConfigOptions: GUI type as enum, not string.
Fixing compilation error in the new Platform code.
Fixing one issue in FDM support after splitting the top/bottom
interface layers.
2021-03-15 09:55:57 +01:00
Vojtech Bubnik
2494a8f384 Allowing ints with open enums in combo boxes. 2021-03-15 09:55:57 +01:00
Vojtech Bubnik
73b88e6ce0 Splitting FDM support gap to top / bottom, introducing
support_material_bottom_contact_distance
Fixing Crash in support generation after fcb714c (repro attached) #6195
2021-03-15 09:55:57 +01:00
Vojtech Bubnik
f3f10ff002 Follow up on https://github.com/prusa3d/PrusaSlicer/pull/5219#issuecomment-794515454
Initializing random generator in PlacholderParser from system clock.
2021-03-15 09:55:56 +01:00
Vojtech Bubnik
00db3dc419 WIP: Splitting the number of top / bottom support interface layers.
If the new support_material_bottom_interface_layers is left at default -1,
then support_material_interface_layers is used for both top and bottom
interface layers.
If support_material_interface_layers == 0, then neither top nor bottom
interface layers are being extruded.
2021-03-15 09:55:56 +01:00
Vojtech Bubnik
adcbe4347c Fixed unit tests. 2021-03-15 09:55:56 +01:00
Vojtech Bubnik
f01f02154c Reworked the "new" bridging to respect the bridge_flow_ratio
by maintaining extrusion spacing, but modifying the extrusion width
and / or height.
2021-03-15 09:55:56 +01:00
Vojtech Bubnik
ceea9de8b8 WIP: Refactored bridging flow from normal flow, new config value
'thick_bridges' to switch between the Slic3r vs. S3D/Cura/Ideamaker
way of printing 1st object layer over supports.
Simplified the PresetHints.
2021-03-15 09:55:56 +01:00
tamasmeszaros
3c2d0b7c6e Tiny cosmetics 2021-03-08 17:38:10 +01:00
tamasmeszaros
a62262666a Exclude triangles of original interior mesh and drillholes from trimming 2021-03-08 17:38:10 +01:00
tamasmeszaros
fbc758642b Fix crash when the interior is corrupted 2021-03-08 17:38:10 +01:00
tamasmeszaros
4374716bfb Triangle trimming should handle drilled meshes separately 2021-03-08 17:38:10 +01:00
tamasmeszaros
1ec154012e Add working version of triangle trimming for hollowed meshes 2021-03-08 17:38:10 +01:00
tamasmeszaros
b8c1c13666 Add max_concurrency method for various execution policies 2021-03-08 17:38:10 +01:00
tamasmeszaros
e3c2e513fa Do grid redistance even with zero closing distance
This prevents having a leftover grid with zero at the exterior boundary. Trimming expects zero at (offset + closing distance) inwards
2021-03-08 17:38:10 +01:00
tamasmeszaros
7830c8f8aa Add BoundingBox constructor with point set iterators 2021-03-08 17:38:10 +01:00
tamasmeszaros
195b39bb5b Eliminate memory leaks from hollowing code 2021-03-08 17:38:10 +01:00
tamasmeszaros
06bf02df69 Fix Gizmo preview with hollowed mesh 2021-03-08 17:38:10 +01:00
tamasmeszaros
d48ca7fd03 Fix incorrect mesh shown on plater after hollowing 2021-03-08 17:38:10 +01:00
tamasmeszaros
527e675294 Use triangle removal only for visualized mesh 2021-03-08 17:38:10 +01:00
tamasmeszaros
82954ba715 Group hollowing result (including grid) into one struct 2021-03-08 17:38:10 +01:00
tamasmeszaros
e57eca0289 Add voxel scale to openvdb metadata.
To be able to retrieve that information from a generated grid alone.

To avoid the copying of input mesh (for scaling) when doing the hollowing

Also remove some unused stuff from OpenVDBUtils
2021-03-08 17:38:10 +01:00
Vojtech Bubnik
8adb495e7d Fix of 589d2be442 2021-03-08 11:29:52 +01:00
enricoturri1966
14aca210cb Tech ENABLE_GCODE_WINDOW_USE_MAPPED_FILE merged into ENABLE_GCODE_WINDOW 2021-03-08 10:20:07 +01:00
Vojtech Bubnik
589d2be442 Fix of Repair with Netfabb does not work on builds after 2.3.0 release (Windows 10) #6193
This is more a workaround than a fix: Windows 10 3D model fixing API refuses
to load a zip64 encoded 3MF. We need to get in touch with Microsoft on that
issue, for now the 3MFs generated for the Windows 10 3D model fixing API
will be limited to 4GB. Saving a bigger 3MF will fail.
2021-03-08 09:36:21 +01:00
enricoturri1966
8027c94a41 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-08 08:35:49 +01:00
enricoturri1966
0472c84525 G-code window uses file mapping 2021-03-08 08:35:32 +01:00
Lukas Matena
1efa9a06f6 Adjustable wipe tower brim 2021-03-05 16:41:02 +01:00
Lukas Matena
c25c435d52 Added a new placeholder for custom toolchange gcode (toolchange_z)
This always contains the actual print_z of the toolchange, while layer_z contains the print_z
of the print. The two differ in case that wipe tower without sparse layers is used.

Related to #3834.
2021-03-05 13:58:45 +01:00
enricoturri1966
252aa9b229 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-04 13:24:08 +01:00
Lukas Matena
abd5a9a46e Add a notification when custom support enforcers are not used due to supports being off
It is now emitted from Print::validate and has a hyperlink to enable supports
2021-03-04 09:35:22 +01:00
tamasmeszaros
a7255235e5 Remove gcc warning about uninitialized values 2021-03-03 15:19:24 +01:00
enricoturri1966
d99895805c Follow-up of 6a46b71dc1 - Fix build on non-Windows platforms 2021-03-03 15:17:45 +01:00
Vojtech Bubnik
5f5de1c812 Follow-up to 5276bd98d7:
WIP: MutablePolygon - linked list based polygon implementation
allowing rapid insertion and removal of points.
WIP: porting smooth_outward() from Cura.
2021-03-03 15:04:26 +01:00
enricoturri1966
6a46b71dc1 #5843 - GCodeProcessor: added processing of lines G28 2021-03-03 13:53:37 +01:00
enricoturri1966
da7d7ae11b Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_window 2021-03-03 09:07:28 +01:00
YuSanka
28b92215c3 Follow-up 409849d238:
Added check for visibility for all loaded presets.
Added notification about this action.
 + PresetComboBox: Fixed update() function for physical printers, when some of related presets are invisible.
2021-03-02 12:19:49 +01:00
enricoturri1966
2c8f385c7f 1st installment of g-code window in preview 2021-03-02 10:01:06 +01:00
Lukas Matena
92a2951b23 Fix build caused by missing returns 2021-03-02 08:17:27 +01:00
Vojtech Bubnik
5276bd98d7 WIP: MutablePolygon - linked list based polygon implementation
allowing rapid insertion and removal of points.
WIP: porting smooth_outward() from Cura.
2021-03-01 18:41:46 +01:00
YuSanka
409849d238 Fixed loading of the project file with filament which is not installed for the selected printers
If loaded filaments are invisible/non-instaled, set them as visible
2021-03-01 16:36:05 +01:00
Vojtech Bubnik
224f3e506c Fix of Custom G-code for color change does not process macro #5782
Added macro processing of color_change_gcode, pause_print_gcode
and template_custom_gcode custom G-codes when emitting them into
the output G-code.
2021-03-01 12:52:40 +01:00
Vojtech Bubnik
d7a786e8c8 Bumping up wxWidgets to 3.1.4-patched on all platforms. 2021-03-01 11:36:11 +01:00
enricoturri1966
9a31580bde GCodeProcessor -> use boost::starts_with() 2021-02-26 16:00:32 +01:00
enricoturri1966
c9666ea257 #4402 - Review and merge of #6106 Temperature visualization in preview and G-code Viewer by combolek 2021-02-26 14:17:53 +01:00
enricoturri1966
8cb8a24ded Tech ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN set as default 2021-02-26 10:18:16 +01:00
Lukas Matena
19cfeb1a78 Fix of a crash when using active_step_add_warning on PrintObjects
PrintObjectBase::status_update_warnings called PrintBase::status_update_warnings, which in turn set
SlicingStatus flag to UPDATE_PRINT_STEP_WARNINGS (instead of UPDATE_PRINT_OBEJCT_STEP_WARNINGS) and
saved its own ObjectID. This led to spurious and hard to read thread-unsafe crashes.
2021-02-26 10:07:11 +01:00