mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-30 16:42:43 +00:00
Ported three PrintObject methods to XS
This commit is contained in:
@@ -103,6 +103,9 @@ class PrintObject
|
||||
ModelObject* model_object();
|
||||
|
||||
Points copies() const;
|
||||
bool add_copy(const Pointf &point);
|
||||
bool delete_last_copy();
|
||||
bool delete_all_copies();
|
||||
bool set_copies(const Points &points);
|
||||
bool reload_model_instances();
|
||||
|
||||
|
||||
@@ -53,6 +53,29 @@ PrintObject::copies() const
|
||||
return this->_copies;
|
||||
}
|
||||
|
||||
bool
|
||||
PrintObject::add_copy(const Pointf &point)
|
||||
{
|
||||
Points points = this->_copies;
|
||||
points.push_back(Point::new_scale(point.x, point.y));
|
||||
return this->set_copies(points);
|
||||
}
|
||||
|
||||
bool
|
||||
PrintObject::delete_last_copy()
|
||||
{
|
||||
Points points = this->_copies;
|
||||
points.pop_back();
|
||||
return this->set_copies(points);
|
||||
}
|
||||
|
||||
bool
|
||||
PrintObject::delete_all_copies()
|
||||
{
|
||||
Points points;
|
||||
return this->set_copies(points);
|
||||
}
|
||||
|
||||
bool
|
||||
PrintObject::set_copies(const Points &points)
|
||||
{
|
||||
|
||||
@@ -74,6 +74,10 @@ _constant()
|
||||
void set_shifted_copies(Points value)
|
||||
%code%{ THIS->_shifted_copies = value; %};
|
||||
|
||||
bool add_copy(Pointf* point)
|
||||
%code%{ RETVAL = THIS->add_copy(*point); %};
|
||||
bool delete_last_copy();
|
||||
bool delete_all_copies();
|
||||
bool set_copies(Points copies);
|
||||
bool reload_model_instances();
|
||||
void set_layer_height_ranges(t_layer_height_ranges layer_height_ranges)
|
||||
|
||||
Reference in New Issue
Block a user