mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-02 08:58:43 +03:00
update to latest version
This commit is contained in:
@@ -55,6 +55,25 @@ struct IrregularBed {
|
||||
|
||||
using ArrangeBed = boost::variant<InfiniteBed, RectangleBed, CircleBed, SegmentedRectangleBed, IrregularBed>;
|
||||
|
||||
BoundingBox bounding_box(const InfiniteBed &bed);
|
||||
inline BoundingBox bounding_box(const RectangleBed &b) { return b.bb; }
|
||||
inline BoundingBox bounding_box(const SegmentedRectangleBed &b) { return b.bb; }
|
||||
inline BoundingBox bounding_box(const CircleBed &b)
|
||||
{
|
||||
auto r = static_cast<coord_t>(std::round(b.radius()));
|
||||
Point R{r, r};
|
||||
|
||||
return {b.center() - R, b.center() + R};
|
||||
}
|
||||
inline BoundingBox bounding_box(const ArrangeBed &b)
|
||||
{
|
||||
BoundingBox ret;
|
||||
auto visitor = [&ret](const auto &b) { ret = bounding_box(b); };
|
||||
boost::apply_visitor(visitor, b);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
ArrangeBed to_arrange_bed(const Points &bedpts);
|
||||
|
||||
/// A logical bed representing an object not being arranged. Either the arrange
|
||||
|
||||
Reference in New Issue
Block a user