mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-01 17:42:44 +00:00
Ported PrintObject::bounding_box() to XS
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
#include "BoundingBox.hpp"
|
||||
#include "Flow.hpp"
|
||||
#include "PrintConfig.hpp"
|
||||
#include "Point.hpp"
|
||||
@@ -108,6 +109,7 @@ class PrintObject
|
||||
bool delete_all_copies();
|
||||
bool set_copies(const Points &points);
|
||||
bool reload_model_instances();
|
||||
void bounding_box(BoundingBox* bb) const;
|
||||
|
||||
// adds region_id, too, if necessary
|
||||
void add_region_volume(int region_id, int volume_id);
|
||||
|
||||
@@ -111,6 +111,16 @@ PrintObject::reload_model_instances()
|
||||
return this->set_copies(copies);
|
||||
}
|
||||
|
||||
void
|
||||
PrintObject::bounding_box(BoundingBox* bb) const
|
||||
{
|
||||
// since the object is aligned to origin, bounding box coincides with size
|
||||
Points pp;
|
||||
pp.push_back(Point(0,0));
|
||||
pp.push_back(this->size);
|
||||
*bb = BoundingBox(pp);
|
||||
}
|
||||
|
||||
void
|
||||
PrintObject::add_region_volume(int region_id, int volume_id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user