Commit Graph

3959 Commits

Author SHA1 Message Date
Lukáš Hejl
945bebd224 Follow-up to e20d041fc9: Fixed a wrong calculation of indices when object instances were used.
Also, it was fixed polygon intersection detection, which was not working when a polygon intersected another polygon by only one edge.
2022-02-18 16:45:50 +01:00
Lukáš Hejl
5d72f18dc6 Follow-up to a4ecf2f2a6. Refactoring of the function for removing duplicate points. 2022-02-16 09:20:45 +01:00
Lukáš Hejl
eef741b095 Fixed a copy-paste typo that could lead to duplicate edges in MMU_Graph in the multi-material segmentation. 2022-02-16 09:20:41 +01:00
Vojtech Bubnik
3e9e3fd102 Follow-up to 58d64bae77
Disabled check for "G92 E0" in layer change G-code for other firmware types
than Marlin 2 and Marlin Legacy. We don't know whether other firmware
flavors are sensitive to E axis accumulation error and we know that
RepRapFirmware is not.

Fixes #7846
2022-02-14 15:11:19 +01:00
Vojtech Bubnik
a062a889d8 Follow-up to a1746e3e66
Fix for #7849 - "Save Project" command doesn't work properly
2022-02-14 14:13:48 +01:00
Lukáš Hejl
a4ecf2f2a6 Replaced smooth_outward in multi-material segmentation with a function that removes duplicate points with angle threshold. It should fix #7838 and #6892.
The main contribution of the smooth_outward function for multi-material segmentation was the removal of duplicate points in polygons using MutablePolygon::remove_duplicates().
But the issue with this function is that it deletes points only based on their distances, which could cause problems like in #7838.
2022-02-07 13:38:22 +01:00
YuSanka
a1746e3e66 Fix for #7849 - "Save Project" command doesn't work properly
Don't update saved presets on
   * preset selection
   * initialization of PresetCollection
, but update them on
   * load another project
   * initialization of an application
2022-02-07 11:59:39 +01:00
Lukáš Hejl
e20d041fc9 Fixed an issue with a gap in brim when inner brim was used.
This gap still can appear for holes that contain another object.
Also fixed an issue that a huge outer brim can overflow into holes of another object.
2022-02-07 10:48:52 +01:00
YuSanka
874da0281d Fixed SPE-1192
Wrong list of SLA-materials, when no SLA-printer is installed, but 3MF with SLA print is loaded
2022-02-07 10:00:49 +01:00
enricoturri1966
1fb41a8e22 #4881 - #5073 - #6336 - GCodeProcessor::AxisCoords using doubles in place of floats 2022-02-02 11:22:45 +01:00
Lukas Matena
5c616c5931 Sync to 2.4.1-beta1 2022-02-01 14:16:13 +01:00
Lukas Matena
ebb9041041 Merge branch 'master' into stable - no conflicts fixed 2022-02-01 14:15:18 +01:00
Vojtech Bubnik
be60775077 get_wraped_wxString(): Adapted to work with UTF8 2022-01-31 16:25:20 +01:00
Vojtech Bubnik
56e189943f Follow-up to 3e7a4d4648
Allowed for localization of error messages.
2022-01-31 11:27:32 +01:00
Vojtech Bubnik
58d64bae77 Fix of #6336 #5073: Throw an error if G92 E0 is missing in layer change
G-code with relative extruder addressing. Also thrown an error,
if G92 E0 is used with absolute extruder addressing.
2022-01-31 10:19:01 +01:00
Vojtech Bubnik
7da4bebe7a WIP GCode substitutions: Changed the format of gcode_substitutions by
adding an empty comment as a fourth parameter to each substitution.
In the future, we will provide a UI to show / edit the comment.
2022-01-27 17:02:16 +01:00
Vojtech Bubnik
9828abb443 GCode find/replace: Another try to make a sensible "default" behavior
with the boost::regex implementation:
With no "single line", don't accept new lines with a dot '.'.
2022-01-26 13:57:30 +01:00
Vojtech Bubnik
e83d89dee7 Fix of escape_strings_cstyle(), which did not enclose a single word
string containing semicolon ';' character into quotes.
2022-01-26 13:18:52 +01:00
Vojtech Bubnik
a7520f47a6 GCodeFindReplace: Implemented perl's "match single line" option
to the back-end.
2022-01-25 16:28:18 +01:00
Lukas Matena
ed508d49d6 Changed the inner seam replacement threshold to 3*nozzle_diameter 2022-01-25 15:40:28 +01:00
Lukas Matena
b86effada0 Fixed one possible crash and a warning 2022-01-25 15:40:28 +01:00
Lukas Matena
9e23795137 Trying to make the inner seam placement a bit more intelligent:
place external seams first, then place inner seam using the normal seam placement
function, only limited to vicinity of the closest external seam.
2022-01-25 15:40:27 +01:00
Lukas Matena
3cc907b361 Seams: changed the overhang penalty calculation, it might have been too much compared to the rest
Also reduced penalty for flat surfaces a bit, based on some testing (hopefully it is not overfitting on the test models)
2022-01-25 15:40:27 +01:00
Lukas Matena
689f923aaf Seam fixes:
- turned off staggering
- fixed a bug in one of the heuristics (distance between indices measured instead of actual distance)
2022-01-25 15:40:27 +01:00
Vojtech Bubnik
79a0345201 Further GCodeFindReplace adjustmnets of regular expressions:
match_single_line: ^$ will NOT match \n
2022-01-25 10:36:30 +01:00
Vojtech Bubnik
6817120932 GCodeFindReplace: Removed boost::match_not_dot_newline | boost::match_not_dot_null 2022-01-25 09:40:24 +01:00
Lukas Matena
cb99d491af Fix of a possible locales mismatch during GCode export
There is a mysterious issue with GCode annotations printed with decimal
commas instead of points. tbb threads should be set to "C" locales when started,
either another thread is spawned by tbb, or someone switches the thread locales
and leaves it in the pool.
2022-01-24 16:21:21 +01:00
Lukas Matena
d2664ea295 Fixed crashes with specific configuration of draft shield:
the crashing cases were:
- skirts=0 + dsEnabled
- skirt_height=0 + dsLimited

Also, when ooze_prevention is enabled with multiple extruders and skirt is disabled, 2.4.0 does not generate infinite skirt.
Version 2.3.3 does, ooze prevention overrides the disabled skirt. This commit reinstates the old behaviour.

The issues were introduced in b466f18.
2022-01-21 11:07:18 +01:00
enricoturri1966
803d797bd7 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_z_offset 2022-01-20 13:46:03 +01:00
YuSanka
ded855d0c2 Fix for #7781 - Entering value in Thumbnail setting causes PrusaSlicer to crash
Follow-up 106e520a - During code refactoring "thumbnails" option wasn't correctly processed
2022-01-20 10:07:26 +01:00
Lukáš Hejl
e0883910dd Added a missing include (Clang 12 without PCH). 2022-01-19 20:39:28 +01:00
Lukas Matena
06cca525d0 Added a missing include for gcc 2022-01-19 15:16:46 +01:00
enricoturri1966
ab171441aa Follow-up of 4b4d1c2f2a - Restored line deleted by mistake 2022-01-19 13:26:58 +01:00
enricoturri1966
4b4d1c2f2a #7773 - Fixed GCodeReader::parse_line_internal() to skip whitespaces between axis digit and axis value 2022-01-19 12:08:00 +01:00
enricoturri1966
76ce53f095 Tech ENABLE_Z_OFFSET_CORRECTION - Correction of toolpaths zs when z offset is set 2022-01-18 15:53:59 +01:00
YuSanka
f497ba7bf0 Follow-up to 99f510d4 - fixed a typo 2022-01-17 12:29:47 +01:00
YuSanka
106e520a10 Invalidate print when G-code substitution is changed
+ DiffDialog: Fixed get_string_value() for "gcode_substitution"
+ some code refactoring :
    For PresetCollection added is_independent_from_extruder_number_option(opt_key)
    to check if option is from the list of options with vector variable, which is independent from number of extruders
2022-01-17 12:29:47 +01:00
YuSanka
8a387fc52d WIP: First IU implementation for G-code substitutions 2022-01-17 12:29:47 +01:00
Vojtech Bubnik
aa62868ccb WIP G-code find & replace: Unit tests and some bug fixes. 2022-01-17 12:29:47 +01:00
Vojtech Bubnik
2da3d80a62 Fixing compilation on non-MSVC. 2022-01-17 12:29:46 +01:00
Vojtech Bubnik
d4fd95bd4a WIP: G-code find & replace: Support for non-regular expression,
whole word and case insensitive search.
2022-01-17 12:29:46 +01:00
Vojtech Bubnik
add1e994fa WIP G-code Find-Replace: Optimize regexps, process complete G-code,
not only G-code of layers.
2022-01-17 12:29:46 +01:00
Vojtech Bubnik
658f01b64b WIP: G-code find / replace using a new gcode_substitutions PrintConfig
parameter.
2022-01-17 12:29:46 +01:00
Lukáš Hejl
c54b8908dd Follow-up of 878dce1fdf. 2022-01-17 12:25:02 +01:00
Lukáš Hejl
878dce1fdf Workaround for "Internal compiler error" in 32-bit MSVC (19.29.30037) compiler after dc00f0bf98. 2022-01-17 12:22:19 +01:00
Lukáš Hejl
dc00f0bf98 Modified variable offset in the avoid crossing perimeters to not cause scars on thin objects (#7699).
Previously, the minimum contour width was chosen too conservative and, on some thin objects, only allowed minimal (or non) offset. This could result in travels being planned along the outer perimeter.

Now, the minimum contour width is chosen much smaller at the start and tested if the variable offset wasn't failed (the outer contour broke up into more parts, more or fewer holes, etc.).
If any problem is detected, the variable offset is recalculated with a larger minimum contour width.
2022-01-14 00:59:25 +01:00
enricoturri1966
0cb0f56a80 Tech ENABLE_ENHANCED_PRINT_VOLUME_FIT set as default 2022-01-12 14:12:13 +01:00
enricoturri1966
243f5c38ee Tech ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT set as default 2022-01-12 13:36:31 +01:00
enricoturri1966
b4308f4245 Tech ENABLE_MODIFIERS_ALWAYS_TRANSPARENT set as default 2022-01-12 12:35:36 +01:00
Vojtech Bubnik
123fc13123 Fixing perl tests. 2022-01-12 11:46:51 +01:00