mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-18 10:05:57 +08:00
Fix mishmash with height of layer.
Variable height was used only for fill Structure::zlevel and zlevel is used only for fill z coordinate of support point
This commit is contained in:
parent
4f161607c7
commit
ec9175541d
@ -142,17 +142,14 @@ static std::vector<SupportPointGenerator::MyLayer> make_layers(
|
||||
|
||||
SupportPointGenerator::MyLayer &layer = layers[layer_id];
|
||||
const ExPolygons & islands = slices[layer_id];
|
||||
// FIXME WTF?
|
||||
const float height = (layer_id > 2 ?
|
||||
heights[layer_id - 3] :
|
||||
heights[0] - (heights[1] - heights[0]));
|
||||
layer.islands.reserve(islands.size());
|
||||
for (const ExPolygon &island : islands) {
|
||||
float area = float(island.area() * SCALING_FACTOR * SCALING_FACTOR);
|
||||
if (area >= pixel_area)
|
||||
// FIXME this is not a correct centroid of a polygon with holes.
|
||||
layer.islands.emplace_back(layer, island, get_extents(island.contour),
|
||||
unscaled<float>(island.contour.centroid()), area, height);
|
||||
unscaled<float>(island.contour.centroid()),
|
||||
area, heights[layer_id]);
|
||||
}
|
||||
}, 32 /*gransize*/);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user