mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 23:31:13 -06:00
Ported LayerRegion::make_slices() to XS
This commit is contained in:
parent
948793e570
commit
b69caff93c
11 changed files with 78 additions and 77 deletions
|
@ -28,6 +28,7 @@
|
|||
|
||||
Flow* flow(FlowRole role, bool bridge = false, double width = -1)
|
||||
%code%{ RETVAL = new Flow(THIS->flow(role, bridge, width)); %};
|
||||
void merge_slices();
|
||||
};
|
||||
|
||||
%name{Slic3r::Layer} class Layer {
|
||||
|
|
|
@ -31,9 +31,7 @@ _new(CLASS, expolygon, surface_type, thickness, thickness_layers, bridge_angle,
|
|||
double bridge_angle;
|
||||
unsigned short extra_perimeters;
|
||||
CODE:
|
||||
RETVAL = new Surface ();
|
||||
RETVAL->expolygon = *expolygon;
|
||||
RETVAL->surface_type = surface_type;
|
||||
RETVAL = new Surface (surface_type, *expolygon);
|
||||
RETVAL->thickness = thickness;
|
||||
RETVAL->thickness_layers = thickness_layers;
|
||||
RETVAL->bridge_angle = bridge_angle;
|
||||
|
|
|
@ -6,27 +6,17 @@
|
|||
%}
|
||||
|
||||
%name{Slic3r::Surface::Collection} class SurfaceCollection {
|
||||
%name{_new} SurfaceCollection();
|
||||
~SurfaceCollection();
|
||||
void clear()
|
||||
%code{% THIS->surfaces.clear(); %};
|
||||
void append(Surface* surface)
|
||||
%code{% THIS->surfaces.push_back(*surface); %};
|
||||
int count()
|
||||
%code{% RETVAL = THIS->surfaces.size(); %};
|
||||
void simplify(double tolerance);
|
||||
%{
|
||||
|
||||
SurfaceCollection*
|
||||
SurfaceCollection::new(...)
|
||||
CODE:
|
||||
RETVAL = new SurfaceCollection;
|
||||
// ST(0) is class name, others are surfaces
|
||||
RETVAL->surfaces.resize(items-1);
|
||||
for (unsigned int i = 1; i < items; i++) {
|
||||
// Note: a COPY of the input is stored
|
||||
RETVAL->surfaces[i-1].from_SV_check(ST(i));
|
||||
}
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
SV*
|
||||
SurfaceCollection::arrayref()
|
||||
CODE:
|
||||
|
@ -52,15 +42,6 @@ SurfaceCollection::filter_by_type(surface_type)
|
|||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
SurfaceCollection::append(...)
|
||||
CODE:
|
||||
for (unsigned int i = 1; i < items; i++) {
|
||||
Surface surface;
|
||||
surface.from_SV_check( ST(i) );
|
||||
THIS->surfaces.push_back(surface);
|
||||
}
|
||||
|
||||
void
|
||||
SurfaceCollection::replace(index, surface)
|
||||
int index
|
||||
|
|
|
@ -83,6 +83,10 @@
|
|||
%typemap{Ref<MotionPlanner>}{simple};
|
||||
%typemap{Clone<MotionPlanner>}{simple};
|
||||
|
||||
%typemap{Surface*};
|
||||
%typemap{Ref<Surface>}{simple};
|
||||
%typemap{Clone<Surface>}{simple};
|
||||
|
||||
%typemap{PrintState*};
|
||||
%typemap{Ref<PrintState>}{simple};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue