mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
Ported Slic3r::Print::State to XS
This commit is contained in:
41
xs/xsp/Print.xsp
Normal file
41
xs/xsp/Print.xsp
Normal file
@@ -0,0 +1,41 @@
|
||||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <myinit.h>
|
||||
#include "Print.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::Print::State} class PrintState {
|
||||
PrintState();
|
||||
~PrintState();
|
||||
bool started(PrintStep step) const;
|
||||
bool done(PrintStep step) const;
|
||||
void set_started(PrintStep step);
|
||||
void set_done(PrintStep step);
|
||||
void invalidate(PrintStep step);
|
||||
%{
|
||||
|
||||
%}
|
||||
};
|
||||
|
||||
%package{Slic3r::Print::State};
|
||||
%{
|
||||
|
||||
IV
|
||||
_constant()
|
||||
ALIAS:
|
||||
STEP_INIT_EXTRUDERS = psInitExtruders
|
||||
STEP_SLICE = psSlice
|
||||
STEP_PERIMETERS = psPerimeters
|
||||
STEP_PREPARE_INFILL = prPrepareInfill
|
||||
STEP_INFILL = psInfill
|
||||
STEP_SUPPORTMATERIAL = psSupportMaterial
|
||||
STEP_SKIRT = psSkirt
|
||||
STEP_BRIM = psBrim
|
||||
PROTOTYPE:
|
||||
CODE:
|
||||
RETVAL = ix;
|
||||
OUTPUT: RETVAL
|
||||
|
||||
%}
|
||||
|
||||
@@ -12,10 +12,12 @@ ExPolygonCollection* O_OBJECT
|
||||
ExtrusionEntityCollection* O_OBJECT
|
||||
ExtrusionPath* O_OBJECT
|
||||
ExtrusionLoop* O_OBJECT
|
||||
PrintState* O_OBJECT
|
||||
Surface* O_OBJECT
|
||||
SurfaceCollection* O_OBJECT
|
||||
|
||||
ExtrusionRole T_UV
|
||||
PrintStep T_UV
|
||||
SurfaceType T_UV
|
||||
ClipperLib::JoinType T_UV
|
||||
ClipperLib::PolyFillType T_UV
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
%typemap{Lines};
|
||||
%typemap{Polygons};
|
||||
%typemap{Polylines};
|
||||
%typemap{PrintState};
|
||||
%typemap{ExPolygons};
|
||||
%typemap{Surfaces};
|
||||
%typemap{Polygons*};
|
||||
@@ -35,3 +36,9 @@
|
||||
$CVar = (ExtrusionRole)SvUV($PerlVar);
|
||||
%};
|
||||
};
|
||||
%typemap{PrintStep}{parsed}{
|
||||
%cpp_type{PrintStep};
|
||||
%precall_code{%
|
||||
$CVar = (PrintStep)SvUV($PerlVar);
|
||||
%};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user