more clang warnings enabled, performance measuring

Succesfull build on mingw-w64


fix sandboxes


Mingw fixes and full parallel support tree gen.
This commit is contained in:
tamasmeszaros 2019-08-16 16:17:37 +02:00
parent 7d25d8c677
commit 7e0199746e
27 changed files with 1393 additions and 1148 deletions

View file

@ -5,6 +5,7 @@
#include <libslic3r/libslic3r.h>
#include <libslic3r/TriangleMesh.hpp>
#include <libslic3r/Tesselate.hpp>
#include <libslic3r/ClipperUtils.hpp>
#include <libslic3r/SLA/SLABasePool.hpp>
#include <libslic3r/SLA/SLABoilerPlate.hpp>
#include <libnest2d/tools/benchmark.h>
@ -15,8 +16,8 @@ const std::string USAGE_STR = {
namespace Slic3r { namespace sla {
Contour3D create_base_pool(const Polygons &ground_layer,
const Polygons &holes = {},
Contour3D create_base_pool(const Polygons &ground_layer,
const ExPolygons &holes = {},
const PoolConfig& cfg = PoolConfig());
Contour3D walls(const Polygon& floor_plate, const Polygon& ceiling,
@ -43,22 +44,22 @@ int main(const int argc, const char *argv[]) {
model.ReadSTLFile(argv[1]);
model.align_to_origin();
Polygons ground_slice;
ExPolygons ground_slice;
sla::base_plate(model, ground_slice, 0.1f);
if(ground_slice.empty()) return EXIT_FAILURE;
Polygon gndfirst; gndfirst = ground_slice.front();
sla::offset_with_breakstick_holes(gndfirst, 0.5, 10, 0.3);
ground_slice = offset_ex(ground_slice, 0.5);
ExPolygon gndfirst; gndfirst = ground_slice.front();
sla::breakstick_holes(gndfirst, 0.5, 10, 0.3);
sla::Contour3D mesh;
bench.start();
sla::PoolConfig cfg;
cfg.min_wall_height_mm = 0;
cfg.edge_radius_mm = 0;
mesh = sla::create_base_pool(ground_slice, {}, cfg);
mesh = sla::create_base_pool(to_polygons(ground_slice), {}, cfg);
bench.stop();
@ -75,7 +76,7 @@ int main(const int argc, const char *argv[]) {
if(std::abs(a) < 1e-6) std::cout << "degenerate triangle" << std::endl;
}
// basepool.write_ascii("out.stl");
// basepool.write_ascii("out.stl");
std::fstream outstream("out.obj", std::fstream::out);
mesh.to_obj(outstream);