mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 18:35:57 +08:00
Add comments
This commit is contained in:
parent
6c94f5609b
commit
b39df3e6fe
@ -147,6 +147,8 @@ static std::vector<SupportPointGenerator::MyLayer> make_layers(
|
|||||||
SupportPointGenerator::MyLayer &layer = layers[layer_id];
|
SupportPointGenerator::MyLayer &layer = layers[layer_id];
|
||||||
const ExPolygons & islands = slices[layer_id];
|
const ExPolygons & islands = slices[layer_id];
|
||||||
// FIXME WTF?
|
// FIXME WTF?
|
||||||
|
// It is used only for support point Z coordinate.
|
||||||
|
// Possibly some kind of big foot compensation ??
|
||||||
const float height = (layer_id > 2 ?
|
const float height = (layer_id > 2 ?
|
||||||
heights[layer_id - 3] :
|
heights[layer_id - 3] :
|
||||||
heights[0] - (heights[1] - heights[0]));
|
heights[0] - (heights[1] - heights[0]));
|
||||||
|
@ -55,6 +55,7 @@ public:
|
|||||||
|
|
||||||
struct MyLayer;
|
struct MyLayer;
|
||||||
|
|
||||||
|
// Keep data for one area(ExPlygon) on the layer
|
||||||
struct Structure {
|
struct Structure {
|
||||||
Structure(MyLayer &layer, const ExPolygon& poly, const BoundingBox &bbox, const Vec2f ¢roid, float area, float h) :
|
Structure(MyLayer &layer, const ExPolygon& poly, const BoundingBox &bbox, const Vec2f ¢roid, float area, float h) :
|
||||||
layer(&layer), polygon(&poly), bbox(bbox), centroid(centroid), area(area), zlevel(h)
|
layer(&layer), polygon(&poly), bbox(bbox), centroid(centroid), area(area), zlevel(h)
|
||||||
@ -62,7 +63,9 @@ public:
|
|||||||
, unique_id(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()))
|
, unique_id(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()))
|
||||||
#endif /* SLA_SUPPORTPOINTGEN_DEBUG */
|
#endif /* SLA_SUPPORTPOINTGEN_DEBUG */
|
||||||
{}
|
{}
|
||||||
|
// Parent layer - with all ExPolygons in layer + layer_height
|
||||||
MyLayer *layer;
|
MyLayer *layer;
|
||||||
|
// Source ExPolygon
|
||||||
const ExPolygon* polygon = nullptr;
|
const ExPolygon* polygon = nullptr;
|
||||||
const BoundingBox bbox;
|
const BoundingBox bbox;
|
||||||
const Vec2f centroid = Vec2f::Zero();
|
const Vec2f centroid = Vec2f::Zero();
|
||||||
@ -143,8 +146,10 @@ public:
|
|||||||
|
|
||||||
struct MyLayer {
|
struct MyLayer {
|
||||||
MyLayer(const size_t layer_id, coordf_t print_z) : layer_id(layer_id), print_z(print_z) {}
|
MyLayer(const size_t layer_id, coordf_t print_z) : layer_id(layer_id), print_z(print_z) {}
|
||||||
|
// index into heights + slices
|
||||||
size_t layer_id;
|
size_t layer_id;
|
||||||
coordf_t print_z;
|
// Absolute distance from Zero - copy value from heights<float>
|
||||||
|
coordf_t print_z; // [in mm]
|
||||||
std::vector<Structure> islands;
|
std::vector<Structure> islands;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user