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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742324562a4422485.html
评论列表(0条)