Remove wrapper around std::mt19937
This commit is contained in:
parent
402ae12db2
commit
e6bdec4aa5
4 changed files with 25 additions and 52 deletions
|
@ -108,7 +108,8 @@ TEST_CASE("Support point generator should be deterministic if seeded",
|
|||
std::vector<ExPolygons> slices;
|
||||
slicer.slice(slicegrid, CLOSING_RADIUS, &slices, []{});
|
||||
|
||||
point_gen.execute(slices, slicegrid, 0);
|
||||
point_gen.seed(0);
|
||||
point_gen.execute(slices, slicegrid);
|
||||
|
||||
auto get_chksum = [](const std::vector<sla::SupportPoint> &pts){
|
||||
long long chksum = 0;
|
||||
|
@ -126,7 +127,7 @@ TEST_CASE("Support point generator should be deterministic if seeded",
|
|||
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
point_gen.output().clear();
|
||||
point_gen.execute(slices, slicegrid, 0);
|
||||
point_gen.execute(slices, slicegrid);
|
||||
REQUIRE(point_gen.output().size() == ptnum);
|
||||
REQUIRE(checksum == get_chksum(point_gen.output()));
|
||||
}
|
||||
|
|
|
@ -112,8 +112,8 @@ void test_supports(const std::string &obj_filename,
|
|||
autogencfg.head_diameter = float(2 * supportcfg.head_front_radius_mm);
|
||||
sla::SupportPointGenerator point_gen{emesh, autogencfg, [] {}, [](int) {}};
|
||||
|
||||
long seed = 0; // Make the test repeatable
|
||||
point_gen.execute(out.model_slices, out.slicegrid, seed);
|
||||
point_gen.seed(0); // Make the test repeatable
|
||||
point_gen.execute(out.model_slices, out.slicegrid);
|
||||
|
||||
// Get the calculated support points.
|
||||
std::vector<sla::SupportPoint> support_points = point_gen.output();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue