mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Introduce a ->count method for all collections to save time
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
void scale(double factor);
|
||||
void translate(double x, double y);
|
||||
void rotate(double angle, Point* center);
|
||||
int count()
|
||||
%code{% RETVAL = THIS->expolygons.size(); %};
|
||||
%{
|
||||
|
||||
ExPolygonCollection*
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = THIS->first_point(); %};
|
||||
Point* last_point()
|
||||
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = THIS->last_point(); %};
|
||||
int count()
|
||||
%code{% RETVAL = THIS->entities.size(); %};
|
||||
%{
|
||||
|
||||
void
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
%code{% const char* CLASS = "Slic3r::Polyline::Collection"; RETVAL = THIS->chained_path(no_reverse); %};
|
||||
PolylineCollection* chained_path_from(Point* start_near, bool no_reverse)
|
||||
%code{% const char* CLASS = "Slic3r::Polyline::Collection"; RETVAL = THIS->chained_path_from(start_near, no_reverse); %};
|
||||
int count()
|
||||
%code{% RETVAL = THIS->polylines.size(); %};
|
||||
%{
|
||||
|
||||
PolylineCollection*
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
~SurfaceCollection();
|
||||
void clear()
|
||||
%code{% THIS->surfaces.clear(); %};
|
||||
int count()
|
||||
%code{% RETVAL = THIS->surfaces.size(); %};
|
||||
%{
|
||||
|
||||
SurfaceCollection*
|
||||
|
||||
Reference in New Issue
Block a user