mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 12:41:18 -07:00
Ported three PrintObject methods to XS
This commit is contained in:
parent
f8986d0ef5
commit
33fe53fd7c
5 changed files with 31 additions and 21 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue