mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 06:55:54 +08:00
some test fixes (wip)
This commit is contained in:
parent
90a8e61c18
commit
79890248a5
@ -289,8 +289,8 @@ TEST_CASE("Fill: extrude gcode and check it")
|
||||
}
|
||||
});
|
||||
|
||||
double perimeterRoundGapRemove = unscaled(print.objects()[0]->layers()[0]->slices[0].contour.length()) * 0.1*0.1 * (2 - (PI / 2));
|
||||
double perimeterRoundGapAdd = unscaled(print.objects()[0]->layers()[0]->slices[0].contour.length()) * 0.1*0.1 * ((PI / 2));
|
||||
double perimeterRoundGapRemove = unscaled(print.objects()[0]->layers()[0]->lslices[0].contour.length()) * 0.1*0.1 * (2 - (PI / 2));
|
||||
double perimeterRoundGapAdd = unscaled(print.objects()[0]->layers()[0]->lslices[0].contour.length()) * 0.1*0.1 * ((PI / 2));
|
||||
//for (Line &l : print.objects()[0]->layers()[0]->slices.expolygons[0].contour.lines()) {
|
||||
|
||||
//}
|
||||
@ -397,8 +397,8 @@ TEST_CASE("Fill: extrude gcode and check it")
|
||||
}
|
||||
});
|
||||
|
||||
double perimeterRoundGapRemove = unscaled(print.objects()[0]->layers()[0]->slices[0].contour.length()) * 0.1*0.1 * (2 - (PI / 2));
|
||||
double perimeterRoundGapAdd = unscaled(print.objects()[0]->layers()[0]->slices[0].contour.length()) * 0.1*0.1 * ((PI / 2));
|
||||
double perimeterRoundGapRemove = unscaled(print.objects()[0]->layers()[0]->lslices[0].contour.length()) * 0.1*0.1 * (2 - (PI / 2));
|
||||
double perimeterRoundGapAdd = unscaled(print.objects()[0]->layers()[0]->lslices[0].contour.length()) * 0.1*0.1 * ((PI / 2));
|
||||
|
||||
double volumeExtrPerimeter = ExtrusionGetVolume{}.get(print.objects()[0]->layers()[0]->regions()[0]->perimeters);
|
||||
double volumeExtrInfill = ExtrusionGetVolume{}.get(print.objects()[0]->layers()[0]->regions()[0]->fills);
|
||||
|
@ -116,9 +116,15 @@ SCENARIO("set_speed emits values with fixed-point output.") {
|
||||
|
||||
GIVEN("GCodeWriter instance") {
|
||||
GCodeWriter writer;
|
||||
WHEN("set_speed is called to set speed to 1.09321e+06") {
|
||||
THEN("Output string is G1 F1093210.000") {
|
||||
REQUIRE_THAT(writer.set_speed(1.09321e+06), Catch::Equals("G1 F1093210.000\n"));
|
||||
//max in assert is 100k
|
||||
//WHEN("set_speed is called to set speed to 1.09321e+06") {
|
||||
// THEN("Output string is G1 F1093210.000") {
|
||||
// REQUIRE_THAT(writer.set_speed(1.09321e+06), Catch::Equals("G1 F1093210.000\n"));
|
||||
// }
|
||||
//}
|
||||
WHEN("set_speed is called to set speed to 9.99321e+04") {
|
||||
THEN("Output string is G1 F99932.100") {
|
||||
REQUIRE_THAT(writer.set_speed(9.99321e+04), Catch::Equals("G1 F10932.100\n"));
|
||||
}
|
||||
}
|
||||
WHEN("set_speed is called to set speed to 1") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user