Commit Graph

946 Commits

Author SHA1 Message Date
Vojtech Bubnik
84b28a25e8 Support for forward compatibility of configurations, user and system
config bundles, project files (3MFs, AMFs). When loading these files,
the caller may decide whether to substitute some of the configuration
values the current PrusaSlicer version does not understand with
some reasonable default value, and whether to report it. If substitution
is disabled, an exception is being thrown as before this commit.
If substitution is enabled, list of substitutions is returned by the
API to be presented to the user. This allows us to introduce for example
new firmware flavor key in PrusaSlicer 2.4 while letting PrusaSlicer
2.3.2 to fall back to some default and to report it to the user.

As a preparation for PrusaSlicer 2.4.0, the new firmware_flavor
"marlinfirmware" (signifying Marlin 2.0 and newer) that is not
supported by 2.3.2 yet will default to "marlin" (signifying legacy
Marlin).

When slicing from command line, substutions are performed by default
and reported into the console, however substitutions may be either
disabled or made silent with the new "config-compatibility" command
line option.

Substitute enums and bools only.  Allow booleans to be parsed as
    true: "1", "enabled", "on" case insensitive
    false: "0", "disabled", "off" case insensitive
This will allow us in the future for example to switch the draft_shield
boolean to an enum with the following values: "disabled" / "enabled" / "limited".

Added "enum_bitmask.hpp" - support for type safe sets of options.
See for example PresetBundle::load_configbundle(...
LoadConfigBundleAttributes flags) for an example of intended usage.

WIP: GUI for reporting the list of config substitutions needs to be
implemented by @YuSanka.
2021-06-27 16:14:16 +02:00
Vojtech Bubnik
19d38f8498 Follow-up to
Cherry-pick of 2e55898d78
    Fix of an extremely slow bridging calculation, caused by an extremely
    slow bridged area detection function, of which the results were never used.
    Fixes "slicing fails or takes too long #5974"
2021-06-25 17:24:34 +02:00
Vojtech Bubnik
a2959ec944 Fix of re-slicing with multiple regions.
This is a fix of a bug, which was in Slic3r forever, where raw slices
were not cached, but recalculated from classified regions, where
merging the regions did not produce the original contour reliably.
Fixes [2.3.0-beta2] Odd bad slicing related to infill (?) percentage #5407
2020-12-11 12:21:07 +01:00
Vojtech Bubnik
364300055e Fix of spiral vase mode with holes in the bottom: Holes in the bottom layers
(non-spiral vase layers) were being closed.
Fixes Bad slicing in vase mode (unexpected bridge and solid infill layers) #3326
Fixes Model with holes in the base does not slice properly in "Vase Mode" #5359
2020-12-09 14:54:26 +01:00
Lukáš Hejl
87879034f6 Merge remote-tracking branch 'origin/master' into lh_avoid_crossing_perimeters
# Conflicts:
#	src/libslic3r/MotionPlanner.cpp
#	src/libslic3r/libslic3r.h
2020-11-29 17:27:23 +01:00
Vojtech Bubnik
ddc9e26f19 Follow-up to 80e8b5e985
Removed the legacy PreviewData.cpp,hpp
2020-11-21 11:02:20 +01:00
Vojtech Bubnik
04c2fde671 Removed the old motion planner. 2020-11-17 09:33:30 +01:00
Vojtech Bubnik
812cbade4d Fills:
1) New algorithm for connecting along the perimeters is now applied
   to Honeycomb, Hilbert and similar planar filling curves.
2) The old expensive path chaining is not applied if the new algorithm
   to connect along the perimeter lines is called afterwards.
2020-11-16 12:51:51 +01:00
Vojtech Bubnik
e77fc43159 Merge remote-tracking branch 'remotes/origin/master' into lh_adaptive_infill_hooks 2020-11-16 10:54:19 +01:00
Vojtech Bubnik
4280fdb5f2 Reworked connection of infill lines to perimeter lines.
Added a new "infill_anchor" parameter.
2020-11-16 10:54:00 +01:00
enricoturri1966
28b4ad92ea Fix of previous commit 2020-11-11 17:35:29 +01:00
enricoturri1966
66f325cef4 Follow-up of 80e8b5e985 -> Fixed include in GCode.xsp 2020-11-11 17:28:56 +01:00
Vojtech Bubnik
e0b0a2cdcf Fix of previous commit. 2020-09-24 20:32:52 +02:00
Vojtech Bubnik
8f04a76337 Final fix of Perl bindings 2020-09-24 14:52:05 +02:00
Vojtech Bubnik
7cdc61b67a Trying to patch the Perl bindings. 2020-09-24 16:41:47 +02:00
Vojtech Bubnik
aa0335a750 Trying to fix perl bindings 2020-09-24 16:18:56 +02:00
enricoturri1966
dea641183c Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_viewer 2020-08-10 14:22:46 +02:00
enricoturri1966
510e787bc7 Fixed Print.xsp 2020-08-04 10:26:08 +02:00
YuSanka
f138978fe7 Merge remote-tracking branch 'origin/master' into ys_ph_printers 2020-07-21 09:47:29 +02:00
YuSanka
89035febfa Fixed includes 2020-06-24 09:20:04 +02:00
enricoturri1966
5c7b0948bc Fixed conflict after merge with master 2020-06-19 11:49:59 +02:00
Vojtech Bubnik
81b809f2a1 Fixed broken compilation of Perl bindings. 2020-06-16 14:39:08 +02:00
enricoturri1966
2eb4b2caed Fixed conflicts after merge with master 2020-05-27 10:32:02 +02:00
Lukas Matena
3e855d36dc Fixed unit tests after previous include manipulations 2020-05-26 15:33:44 +02:00
enricoturri1966
277b340481 Attempt to fix build on OsX 2020-05-07 12:03:17 +02:00
enricoturri1966
27b9f85607 Fixed build when tech ENABLE_GCODE_VIEWER is disabled + fixed perl code 2020-05-07 11:24:36 +02:00
enricoturri1966
e5c45405d4 Fixed conflicts after merge with master 2020-04-24 10:59:03 +02:00
tamasmeszaros
1bffc2b99b Add ModelArrange.hpp as extension to Model.hpp, use it for duplicating
Refactored Arrange interface: remove the union based BedShapeHint, replace it with proper function overloads

WARN: this commit is only intermediate, it does not compile.
2020-04-23 18:19:03 +02:00
tamasmeszaros
89d376dc35 Add min_object_distance method as free function taking ConfigBase argument 2020-04-23 18:17:37 +02:00
enricoturri1966
ece4f10bf7 Updated Print.xsp 2020-04-02 12:30:54 +02:00
bubnikv
e7d2fcf0be Fixed unit tests broken with the previous commit (Spiral Vase fix).
Fixed a crash in the previous commit.
2020-02-09 09:43:15 +01:00
bubnikv
b8c898bf40 Fixed a bug in validation of the FDM Print to check for extruder
collisions against already printed objects: Rotation of an object
was not being taken into account.
Fixes #2450 PrusaSlicer 2.0 Sequential printing vs rotate object
Fixes #3585 Always Sequential Printing Error (Regardless of setting, placement or object size)

Fixed some collisions in sequential print just after arrangement by
making the validation using a slightly lower extruder radius value
than the arrangement.

Refactored PrintObject coordinate system so that the PrintObject's
coordinate system is always centered in respect to its ModelObject's
geometries. This refactoring may improve path planning a bit and
it may lower the requirements on bits representing Clipper coordinates
by 1 bit.
2020-02-07 14:10:27 +01:00
bubnikv
4f8f619686 Fixed Perl bindings after refactoring. 2020-01-23 10:35:03 +01:00
bubnikv
afbc4a4cf2 Fixing perl bindings after refactoring 2020-01-06 09:36:03 +01:00
bubnikv
6585e58e83 Fix of perl bindings 2019-10-16 11:34:45 +02:00
bubnikv
69c8b1cd21 new cheaper constructor for DynamicPrintConfig from FullPrintConfig:
DynamicPrintConfig::full_print_config()
new cheaper constructors of DynamicConfig / DynamicPrintConfig from ConfigBase
Unit tests: ported test_model from upstream Slic3r, thanks @lordofhyphens
Unit tests refactored to use less autos and initializer lists for readibility,
DynamicPrintConfig is handled by value, not by shared pointer.
2019-10-16 11:16:50 +02:00
bubnikv
f8ff23638f Fixed regression due to ExPolygonCollection to ExPolygons refactoring.
Fixed crashes in BridgeDetector due to unexpected implicit conversion
to a const temporary.
2019-10-04 16:50:01 +02:00
bubnikv
564eddd99d FDM Print refactoring:
Layer newly remembers bounding boxes of slices,
the bounding boxes are used by G-code generator & newly the support
generator.
Slices are stored as ExPolygons, not ExPolygonCollection.
2019-10-01 17:17:08 +02:00
bubnikv
331c187b39 Rest of the path chaining has been replaced with the new algorithm.
PolylineCollection.cpp/hpp was removed, use Polylines instead.
Various first_point() / last_point() now return references, not copies.
2019-09-27 18:17:21 +02:00
bubnikv
d06831076d WIP: Consolidation of shortest path calculations,
various chaining algorithms are replaced with the improved TSP
algorithm.
2019-09-26 17:30:03 +02:00
bubnikv
2414dab85a Fix of perl bindings 2019-09-19 14:31:50 +02:00
bubnikv
519f2b62e5 Fix of Perl bindings after ExtrusionEntity::clone() refactoring 2019-09-16 15:38:27 +02:00
bubnikv
d146a0237e WIP: Reworked the infill generator to merge areas with the same
properties.

Note for Vojtech:
Review src/libslic3r/Fill/Fill.cpp once again,
add test for G-code generator properties (extrusion speed, cooling?)

Fixes Modifier slice/move efficiency #1005
2019-09-04 16:11:16 +02:00
bubnikv
34013ad142 Fixed broken Perl bindings. 2019-07-25 14:52:51 +02:00
bubnikv
c7cc760067 Merge remote-tracking branch 'origin/master' into vb_undo_redo 2019-07-04 20:22:15 +02:00
bubnikv
27ee68d2f9 WIP Undo / Redo: ModelID / ModelBase renamed to ObjectID / ObjectBase 2019-06-27 11:02:45 +02:00
bubnikv
ac6969c992 Reworked the Perl unit / integration tests to use the same Print
interface that the application is using. Old interface used just
for the integration tests was removed.
2019-06-20 20:23:05 +02:00
bubnikv
8bf6e69851 Removed the layer_height_ranges from the Perl bindings and unit tests. 2019-06-20 16:28:37 +02:00
bubnikv
35b3fd3176 Integrated the new layer height spans with configs into the backend.
Fixed some compiler warnings.
2019-06-20 16:15:09 +02:00
bubnikv
0bb8ee149e Sharing TriangleMesh objects between the front end (UI) and back end
(background processing)
2019-06-11 17:08:47 +02:00