admin管理员组文章数量:1333725
So I generate 2 rectangles, one horizontally, one vertically. They actually intersect which should give a closed square but I do get an open square. Im pretty sure there is nothing wrong with creating the paths, something wrong intersecting.What might cause this?:
PathD generateHorRectangle(float density, float nozzleThickness, PointD min, PointD max)
{
PathD infill;
float x = min.x;
float y = min.y;
PointD current = {x, y};
infill.push_back(current);
current.x = max.x;
infill.push_back(current);
current.y += step;
infill.push_back(current);
current.x = min.x;
infill.push_back(current);
current = {x, y};
infill.push_back(current);
return infill;
}
PathD horizontalRectangle = generateHorRectangle(state.infillDensity, printer.getNozzle(), min, max);
PathD verticalRectangle = generateVerRectangle(state.infillDensity, printer.getNozzle(), min, max);
auto intersectOfLeftCornerShouldBeSquare = Intersect({horizontalRectangle}, {verticalRectangle}, FillRule::EvenOdd);
Result I get.
本文标签: cClipper2 intersecting not fully closingStack Overflow
版权声明:本文标题:c++ - Clipper2 intersecting not fully closing - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742324561a2453463.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论