mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 13:19:05 +08:00
Added method for returning bed printable volume and general rectangular bed when building PrinterGeometry.
This commit is contained in:
parent
ac659a3c9b
commit
7ae5f05af2
@ -92,7 +92,21 @@ static Sequential::PrinterGeometry get_printer_geometry(const ConfigBase& config
|
||||
|
||||
// Convert the read data so libseqarrange understands them.
|
||||
Sequential::PrinterGeometry out;
|
||||
out.plate = { { 0, 0 }, { scaled(bed_x), 0}, {scaled(bed_x), scaled(bed_y)}, {0, scaled(bed_y)}};
|
||||
//out.plate = { { 0, 0 }, { scaled(bed_x), 0}, {scaled(bed_x), scaled(bed_y)}, {0, scaled(bed_y)}};
|
||||
|
||||
BoundingBox bed_bounding_box = s_multiple_beds.get_bed_box();
|
||||
|
||||
double min_x = bed_bounding_box.min.x();
|
||||
double min_y = bed_bounding_box.min.y();
|
||||
|
||||
double max_x = bed_bounding_box.max.x();
|
||||
double max_y = bed_bounding_box.max.y();
|
||||
|
||||
out.plate = { { scaled(min_x), scaled(min_y)},
|
||||
{ scaled(max_x), scaled(min_y)},
|
||||
{ scaled(max_x), scaled(max_y)},
|
||||
{ scaled(min_x), scaled(max_y)}};
|
||||
|
||||
for (const ExtruderSlice& slice : slices) {
|
||||
(slice.shape_type == CONVEX ? out.convex_heights : out.box_heights).emplace(slice.height);
|
||||
out.extruder_slices.insert(std::make_pair(slice.height, slice.polygons));
|
||||
|
@ -87,7 +87,9 @@ public:
|
||||
m_build_volume_bb = build_volume_bb;
|
||||
}
|
||||
Vec2d get_bed_size() const { return m_build_volume_bb.size(); }
|
||||
Vec2d bed_gap() const;
|
||||
BoundingBox get_bed_box() const { return BoundingBox({m_build_volume_bb.min.x(), m_build_volume_bb.min.y()},
|
||||
{m_build_volume_bb.max.x(), m_build_volume_bb.max.y()}); }
|
||||
Vec2d bed_gap() const;
|
||||
Vec2crd get_bed_gap() const;
|
||||
void ensure_wipe_towers_on_beds(Model& model, const std::vector<std::unique_ptr<Print>>& prints);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user