mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-30 16:42:43 +00:00
Refactored signatures of many C++ methods for more efficient and safer style. Includes a bugfix for Point::nearest_point() which was returning a pointer to freed memory. #1961
This commit is contained in:
@@ -12,13 +12,21 @@
|
||||
void clear()
|
||||
%code{% THIS->polylines.clear(); %};
|
||||
PolylineCollection* chained_path(bool no_reverse)
|
||||
%code{% const char* CLASS = "Slic3r::Polyline::Collection"; RETVAL = THIS->chained_path(no_reverse); %};
|
||||
%code{%
|
||||
const char* CLASS = "Slic3r::Polyline::Collection";
|
||||
RETVAL = new PolylineCollection();
|
||||
THIS->chained_path(RETVAL, 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); %};
|
||||
%code{%
|
||||
const char* CLASS = "Slic3r::Polyline::Collection";
|
||||
RETVAL = new PolylineCollection();
|
||||
THIS->chained_path_from(*start_near, RETVAL, no_reverse);
|
||||
%};
|
||||
int count()
|
||||
%code{% RETVAL = THIS->polylines.size(); %};
|
||||
Point* leftmost_point()
|
||||
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = THIS->leftmost_point(); %};
|
||||
%code{% const char* CLASS = "Slic3r::Point"; RETVAL = new Point(THIS->leftmost_point()); %};
|
||||
%{
|
||||
|
||||
PolylineCollection*
|
||||
|
||||
Reference in New Issue
Block a user