mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
64bit coord_t
Vec3i as a vertex index to TriangleMesh constructor
This commit is contained in:
parent
bf5d52f221
commit
c27297f6cc
16 changed files with 117 additions and 120 deletions
|
@ -15,7 +15,7 @@ SCENARIO("Constant offset", "[ClipperUtils]") {
|
|||
coord_t s = 1000000;
|
||||
GIVEN("20mm box") {
|
||||
ExPolygon box20mm;
|
||||
box20mm.contour.points = { { 0, 0 }, { 20 * s, 0 }, { 20 * s, 20 * s}, { 0, 20 * s} };
|
||||
box20mm.contour.points = { Vec2crd{ 0, 0 }, Vec2crd{ 20 * s, 0 }, Vec2crd{ 20 * s, 20 * s}, Vec2crd{ 0, 20 * s} };
|
||||
std::vector<float> deltas_plus(box20mm.contour.points.size(), 1. * s);
|
||||
std::vector<float> deltas_minus(box20mm.contour.points.size(), - 1. * s);
|
||||
Polygons output;
|
||||
|
@ -87,8 +87,8 @@ SCENARIO("Constant offset", "[ClipperUtils]") {
|
|||
|
||||
GIVEN("20mm box with 10mm hole") {
|
||||
ExPolygon box20mm;
|
||||
box20mm.contour.points = { { 0, 0 }, { 20 * s, 0 }, { 20 * s, 20 * s}, { 0, 20 * s} };
|
||||
box20mm.holes.emplace_back(Slic3r::Polygon({ { 5 * s, 5 * s }, { 5 * s, 15 * s}, { 15 * s, 15 * s}, { 15 * s, 5 * s } }));
|
||||
box20mm.contour.points = { Vec2crd{ 0, 0 }, Vec2crd{ 20 * s, 0 }, Vec2crd{ 20 * s, 20 * s}, Vec2crd{ 0, 20 * s} };
|
||||
box20mm.holes.emplace_back(Slic3r::Polygon({ Vec2crd{ 5 * s, 5 * s }, Vec2crd{ 5 * s, 15 * s}, Vec2crd{ 15 * s, 15 * s}, Vec2crd{ 15 * s, 5 * s } }));
|
||||
std::vector<float> deltas_plus(box20mm.contour.points.size(), 1. * s);
|
||||
std::vector<float> deltas_minus(box20mm.contour.points.size(), -1. * s);
|
||||
ExPolygons output;
|
||||
|
@ -164,7 +164,7 @@ SCENARIO("Constant offset", "[ClipperUtils]") {
|
|||
|
||||
GIVEN("20mm right angle triangle") {
|
||||
ExPolygon triangle20mm;
|
||||
triangle20mm.contour.points = { { 0, 0 }, { 20 * s, 0 }, { 0, 20 * s} };
|
||||
triangle20mm.contour.points = { Vec2crd{ 0, 0 }, Vec2crd{ 20 * s, 0 }, Vec2crd{ 0, 20 * s } };
|
||||
Polygons output;
|
||||
double offset = 1.;
|
||||
// Angle of the sharp corner bisector.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue