mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-12 10:21:17 +00:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
@@ -31,10 +31,7 @@ boost::regex perimeters_regex("G1 X[-0-9.]* Y[-0-9.]* E[-0-9.]* ; perimeter");
|
||||
boost::regex infill_regex("G1 X[-0-9.]* Y[-0-9.]* E[-0-9.]* ; infill");
|
||||
boost::regex skirt_regex("G1 X[-0-9.]* Y[-0-9.]* E[-0-9.]* ; skirt");
|
||||
|
||||
// [NotWorking]: slice() intermittently throws clipper's "Coordinate outside allowed
|
||||
// range" in CI (Linux) while passing locally. Disabled pending a root-cause fix in a
|
||||
// follow-up PR.
|
||||
SCENARIO( "PrintGCode basic functionality", "[PrintGCode][NotWorking]") {
|
||||
SCENARIO( "PrintGCode basic functionality", "[PrintGCode]") {
|
||||
GIVEN("A default configuration and a print test object") {
|
||||
WHEN("the output is executed with no support material") {
|
||||
Slic3r::Print print;
|
||||
|
||||
@@ -32,10 +32,7 @@ using namespace Slic3r;
|
||||
return brim_tool;
|
||||
}
|
||||
|
||||
// [NotWorking]: slice() intermittently throws clipper's "Coordinate outside allowed
|
||||
// range" in CI (Linux) while passing locally. Disabled pending a root-cause fix in a
|
||||
// follow-up PR.
|
||||
TEST_CASE("Skirt height is honored", "[SkirtBrim][NotWorking]") {
|
||||
TEST_CASE("Skirt height is honored", "[SkirtBrim]") {
|
||||
DynamicPrintConfig config = Slic3r::DynamicPrintConfig::full_print_config();
|
||||
config.set_deserialize_strict({
|
||||
{ "skirt_loops", 1 },
|
||||
@@ -55,8 +52,7 @@ TEST_CASE("Skirt height is honored", "[SkirtBrim][NotWorking]") {
|
||||
REQUIRE(layers_with_role(gcode, "skirt").size() == (size_t)config.opt_int("skirt_height"));
|
||||
}
|
||||
|
||||
// [NotWorking]: see "Skirt height is honored" above; same CI-only clipper range throw.
|
||||
SCENARIO("Skirt and brim generation", "[SkirtBrim][NotWorking]") {
|
||||
SCENARIO("Skirt and brim generation", "[SkirtBrim]") {
|
||||
GIVEN("A default configuration") {
|
||||
DynamicPrintConfig config = Slic3r::DynamicPrintConfig::full_print_config();
|
||||
config.set_num_extruders(4);
|
||||
|
||||
@@ -8,6 +8,7 @@ add_executable(${_TEST_NAME}_tests
|
||||
test_arachne_walls.cpp
|
||||
test_arrange.cpp
|
||||
test_bambu_networking.cpp
|
||||
test_calib.cpp
|
||||
test_clipper_offset.cpp
|
||||
test_clipper_utils.cpp
|
||||
test_config.cpp
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#include <catch2/catch_all.hpp>
|
||||
|
||||
#include "libslic3r/calib.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "libslic3r/TriangleMesh.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
|
||||
using namespace Slic3r;
|
||||
|
||||
namespace {
|
||||
|
||||
// The width-resolution getters are protected; expose them so the resolution can be asserted directly.
|
||||
struct PaPatternProbe : public CalibPressureAdvancePattern
|
||||
{
|
||||
using CalibPressureAdvancePattern::CalibPressureAdvancePattern;
|
||||
using CalibPressureAdvancePattern::line_width;
|
||||
using CalibPressureAdvancePattern::line_width_first_layer;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
TEST_CASE("Zero calibration line width resolves to a positive default", "[Calib][Regression]")
|
||||
{
|
||||
DynamicPrintConfig config = DynamicPrintConfig::full_print_config();
|
||||
config.set_deserialize_strict({
|
||||
{"line_width", "0"},
|
||||
{"initial_layer_line_width", "0"},
|
||||
});
|
||||
|
||||
Model model;
|
||||
model.add_object("cube", "", make_cube(20, 20, 20))->add_instance();
|
||||
|
||||
Calib_Params params;
|
||||
params.mode = CalibMode::Calib_PA_Pattern;
|
||||
|
||||
PaPatternProbe pattern(params, config, /* is_bbl_machine */ true, *model.objects.front(), Vec3d(0, 0, 0));
|
||||
|
||||
REQUIRE(pattern.line_width() > 0.);
|
||||
REQUIRE(pattern.line_width_first_layer() > 0.);
|
||||
}
|
||||
Reference in New Issue
Block a user