mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 14:51:11 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
142
xs/xsp/ExtrusionPath.xsp
Normal file
142
xs/xsp/ExtrusionPath.xsp
Normal file
|
@ -0,0 +1,142 @@
|
|||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <xsinit.h>
|
||||
#include "libslic3r/ExtrusionEntity.hpp"
|
||||
#include "libslic3r/ExtrusionEntityCollection.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::ExtrusionPath} class ExtrusionPath {
|
||||
~ExtrusionPath();
|
||||
SV* arrayref()
|
||||
%code{% RETVAL = to_AV(&THIS->polyline); %};
|
||||
SV* pp()
|
||||
%code{% RETVAL = to_SV_pureperl(&THIS->polyline); %};
|
||||
void pop_back()
|
||||
%code{% THIS->polyline.points.pop_back(); %};
|
||||
void reverse();
|
||||
Lines lines()
|
||||
%code{% RETVAL = THIS->polyline.lines(); %};
|
||||
Clone<Point> first_point();
|
||||
Clone<Point> last_point();
|
||||
void clip_end(double distance);
|
||||
void simplify(double tolerance);
|
||||
double length();
|
||||
ExtrusionRole role() const;
|
||||
bool is_bridge()
|
||||
%code{% RETVAL = is_bridge(THIS->role()); %};
|
||||
Polygons polygons_covered_by_width();
|
||||
Polygons polygons_covered_by_spacing();
|
||||
%{
|
||||
|
||||
ExtrusionPath*
|
||||
_new(CLASS, polyline_sv, role, mm3_per_mm, width, height)
|
||||
char* CLASS;
|
||||
SV* polyline_sv;
|
||||
ExtrusionRole role;
|
||||
double mm3_per_mm;
|
||||
float width;
|
||||
float height;
|
||||
CODE:
|
||||
RETVAL = new ExtrusionPath (role);
|
||||
from_SV_check(polyline_sv, &RETVAL->polyline);
|
||||
RETVAL->mm3_per_mm = mm3_per_mm;
|
||||
RETVAL->width = width;
|
||||
RETVAL->height = height;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
Ref<Polyline>
|
||||
ExtrusionPath::polyline(...)
|
||||
CODE:
|
||||
if (items > 1) {
|
||||
from_SV_check(ST(1), &THIS->polyline);
|
||||
}
|
||||
RETVAL = &(THIS->polyline);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
double
|
||||
ExtrusionPath::mm3_per_mm(...)
|
||||
CODE:
|
||||
if (items > 1) {
|
||||
THIS->mm3_per_mm = (double)SvNV(ST(1));
|
||||
}
|
||||
RETVAL = THIS->mm3_per_mm;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
float
|
||||
ExtrusionPath::width(...)
|
||||
CODE:
|
||||
if (items > 1) {
|
||||
THIS->width = (float)SvNV(ST(1));
|
||||
}
|
||||
RETVAL = THIS->width;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
float
|
||||
ExtrusionPath::height(...)
|
||||
CODE:
|
||||
if (items > 1) {
|
||||
THIS->height = (float)SvNV(ST(1));
|
||||
}
|
||||
RETVAL = THIS->height;
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
ExtrusionPath::append(...)
|
||||
CODE:
|
||||
for (unsigned int i = 1; i < items; i++) {
|
||||
Point p;
|
||||
from_SV_check(ST(i), &p);
|
||||
THIS->polyline.points.push_back(p);
|
||||
}
|
||||
|
||||
ExtrusionEntityCollection*
|
||||
ExtrusionPath::intersect_expolygons(ExPolygonCollection* collection)
|
||||
CODE:
|
||||
RETVAL = new ExtrusionEntityCollection ();
|
||||
THIS->intersect_expolygons(*collection, RETVAL);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
ExtrusionEntityCollection*
|
||||
ExtrusionPath::subtract_expolygons(ExPolygonCollection* collection)
|
||||
CODE:
|
||||
RETVAL = new ExtrusionEntityCollection ();
|
||||
THIS->subtract_expolygons(*collection, RETVAL);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
%}
|
||||
};
|
||||
|
||||
%package{Slic3r::ExtrusionPath};
|
||||
%{
|
||||
|
||||
IV
|
||||
_constant()
|
||||
ALIAS:
|
||||
EXTR_ROLE_NONE = erNone
|
||||
EXTR_ROLE_PERIMETER = erPerimeter
|
||||
EXTR_ROLE_EXTERNAL_PERIMETER = erExternalPerimeter
|
||||
EXTR_ROLE_OVERHANG_PERIMETER = erOverhangPerimeter
|
||||
EXTR_ROLE_FILL = erInternalInfill
|
||||
EXTR_ROLE_SOLIDFILL = erSolidInfill
|
||||
EXTR_ROLE_TOPSOLIDFILL = erTopSolidInfill
|
||||
EXTR_ROLE_BRIDGE = erBridgeInfill
|
||||
EXTR_ROLE_GAPFILL = erGapFill
|
||||
EXTR_ROLE_SKIRT = erSkirt
|
||||
EXTR_ROLE_SUPPORTMATERIAL = erSupportMaterial
|
||||
EXTR_ROLE_SUPPORTMATERIAL_INTERFACE = erSupportMaterialInterface
|
||||
EXTR_ROLE_MIXED = erMixed
|
||||
PROTOTYPE:
|
||||
CODE:
|
||||
RETVAL = ix;
|
||||
OUTPUT: RETVAL
|
||||
|
||||
%}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue