16 Commits

Author SHA1 Message Date
Jan Bařtipán
2b01d14f7b Catch2 updated to v3.8, all tests migrated 2025-02-06 15:55:09 +01:00
jalapenopuzzle
944844131c Fix fff_print_tests and add documentation (PR#13886 from @jalapenopuzzle)
PrusaSlicer/src/libslic3r/GCodeReader.cpp:24: char Slic3r::get_extrusion_axis_char(const Slic3r::GCodeConfig&): Assertion `axis.size() <= 1' failed.
The set_deserialise_strict() method converts 'A' to the string "65" instead of "A". Perhaps this should be fixed more robustly.

Fix fff_print_tests test name Temeperatures -> Temperatures

Fix fff_print_tests All travel moves happen within skirt

Remove the last travel_moves point which returns to the origin (0,0) which is outside the convex hull. This point was causing CHECK(convex_hull.contains(travel_move)) to fail.

Fix fff_print_tests "Used Filament" test Assertion `std::abs(length) < 1000.0' failed

The test configured a retract_length of 10000000 which is larger than the asserted maximum retraction length of 1000.
PrusaSlicer/src/libslic3r/GCode/GCodeWriter.cpp:473: std::string Slic3r::GCodeWriter::_retract(double, double, std::string_view): Assertion `std::abs(length) < 1000.0' failed.
Fixed by doing the print with two different (legal) retraction lengths and checking that the total_used_filament agrees in both cases.

Fix fff_print_tests "Slicing with retraction and lifting" remove illegal negative restart_extra test case

Negative restart_extra is asserted against at PrusaSlicer/src/libslic3r/Extrucer.cpp:58

How to build - add instructions on how to run the unit tests
2025-02-04 09:24:12 +01:00
Martin Šach
5199d8fb48 Arrange: Move arrange into separate cmake targets
- Create a slicer specific arrange target
- Create a general arrange target from the arrange core
2024-11-20 16:04:15 +01:00
Martin Šach
ea9dfa9a8d Use path generation even on layer change 2024-03-20 14:42:27 +01:00
Martin Šach
f850433e2b Cancel instance before moving to a next object in sequential print 2024-03-14 15:42:52 +01:00
Martin Šach
5f9f5be614 Add lift to first travel move on layer. Add retraction_length 0 to test, to avoid lifting back up and going back down. 2024-02-14 16:58:47 +01:00
Martin Šach
6b0dcc658d Fix narrowing conversion and memory leak in tests 2024-01-08 10:27:38 +01:00
Martin Šach
6e871a874a Rewrite gcode.t to c++ 2024-01-08 10:27:38 +01:00
Martin Šach
e298593a2e Refactor: Separate gcode generator layer changes utilities to a file. 2023-12-06 09:49:56 +01:00
Martin Šach
e13d3cdbf2 Refactor: Move gcode travel utils to a separate file. 2023-12-06 09:49:56 +01:00
Martin Šach
2175fc3f4d Fix lift before obstacle over multiple instances. 2023-12-06 09:49:56 +01:00
Martin Šach
384d245be7 Add basic implementation of an obstacle finding algorithm during travels.
A line distancer over previous layer is constructed. It is then queried
during travel planing. If an obstacle is found in the travel path,
the travel algorithm ensures minimal elevation before the obstacle.
2023-11-10 12:19:39 +01:00
Martin Šach
a4a7ac4a4e Add helical layer change.
Previously the layer change was straight up which caused stringing.
To solve this, a helical travel is implemented when changing layers.
2023-11-10 12:19:39 +01:00
Martin Šach
49455cf427 Replace GCode.cpp travel_to with more general z-hop strategy.
The new travel has an initial flat part, sloped part and
once the travel height reaches maxima a flat part again.
Also, the notion of extruder lift is removed. It is used no more.
Consequently the retract_lift parameter lost its original meaning.
2023-11-10 12:19:39 +01:00
Vojtech Bubnik
19062b4d5f ArcWelder path interpolation based on the work by Brad Hochgesang @FormerLurker.
WIP GCode/SmoothPath.cpp,hpp cache for interpolating extrusion path with arches.
Removed Perl test t/geometry.t, replaced with C++ tests.
Refactored ExtrusionEntity and derived classes to hold extrusion attributes in new ExtrusionFlow/ExtrusionAttributes classes.
Reworked path ordering in G-code export to never copy polylines, but to work with a new "flipped" attribute.
Reworked G-code export to interpolate extrusion paths with smooth paths and to extrude those smooth paths.
New parameters: arc_fitting, arc_fitting_tolerance
Renamed GCode class to GCodeGenerator
Moved GCodeWriter.cpp/hpp to GCode/
Moved Wipe from from GCode.cpp,hpp to GCode/Wipe.cpp,hpp
Moved WipeTowerIntegration from GCode.cpp,hpp to GCode/WipeTowerIntegration.cpp,hpp
New variant of douglas_peucker() to simplify range of iterators in place.
Refactored wipe in general and wipe on perimeters / hiding seams.

WIP: Convert estimate_speed_from_extrusion_quality() and its application to smooth paths.
WIP: Cooling buffer to process G2G3, disable arc fitting for filters that cannot process it.
2023-07-13 11:54:42 +02:00
bubnikv
2e7e95adae Disabled broken tests, ported some more tests to C++,
removed Perl tests that were already ported to C++.
2019-10-25 18:23:42 +02:00