mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-28 15:45:30 +00:00
Optimizations for better usage of XS code
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
Lines lines();
|
||||
Point* first_point()
|
||||
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = new Point(*(THIS->first_point())); %};
|
||||
Point* last_point()
|
||||
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = new Point(*(THIS->last_point())); %};
|
||||
%{
|
||||
|
||||
Polyline*
|
||||
@@ -44,6 +46,14 @@ Polyline::append(...)
|
||||
THIS->points.push_back(p);
|
||||
}
|
||||
|
||||
void
|
||||
Polyline::append_polyline(polyline)
|
||||
Polyline* polyline;
|
||||
CODE:
|
||||
for (Points::const_iterator it = polyline->points.begin(); it != polyline->points.end(); ++it) {
|
||||
THIS->points.push_back((*it));
|
||||
}
|
||||
|
||||
void
|
||||
Polyline::rotate(angle, center_sv)
|
||||
double angle;
|
||||
|
||||
Reference in New Issue
Block a user