aboutsummaryrefslogtreecommitdiff
path: root/src/out_flattener.cpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-01-26 23:52:10 +0100
committerjaseg <git@jaseg.de>2021-01-26 23:52:10 +0100
commit70d0021df14faa412d9a94d0e59bfcd4c7082a9d (patch)
treee41b6d1f18439c042f79d834b1027214b4b0e804 /src/out_flattener.cpp
parentf9a871f9b2737881e23f1ef1b06583394bc4043d (diff)
downloadgerbolyze-70d0021df14faa412d9a94d0e59bfcd4c7082a9d.tar.gz
gerbolyze-70d0021df14faa412d9a94d0e59bfcd4c7082a9d.tar.bz2
gerbolyze-70d0021df14faa412d9a94d0e59bfcd4c7082a9d.zip
Remove randomization from flattener
Diffstat (limited to 'src/out_flattener.cpp')
-rw-r--r--src/out_flattener.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/out_flattener.cpp b/src/out_flattener.cpp
index 4351ecc..5816f88 100644
--- a/src/out_flattener.cpp
+++ b/src/out_flattener.cpp
@@ -17,7 +17,6 @@
*/
#include <cmath>
-#include <random>
#include <algorithm>
#include <string>
#include <iostream>
@@ -72,10 +71,6 @@ void Flattener::header(d2p origin, d2p size) {
}
void Flattener::render_out_clear_polys() {
- std::random_device rd;
- std::mt19937 g(rd());
- std::shuffle(d->clear_polys.begin(), d->clear_polys.end(), g);
-
for (auto &sub : d->clear_polys) {
vector<cavc::Polyline<double>> new_dark_polys;
new_dark_polys.reserve(d->dark_polys.size());
@@ -159,6 +154,7 @@ Flattener &Flattener::operator<<(const Polygon &poly) {
} else { /* clear */
cerr << "clear primitive " << j++ << endl;
d->add_clear_polygon(poly);
+ render_out_clear_polys();
}
return *this;