mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 06:41:14 -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
59
xs/xsp/ExPolygon.xsp
Normal file
59
xs/xsp/ExPolygon.xsp
Normal file
|
@ -0,0 +1,59 @@
|
|||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <xsinit.h>
|
||||
#include "libslic3r/ExPolygon.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::ExPolygon} class ExPolygon {
|
||||
~ExPolygon();
|
||||
Clone<ExPolygon> clone()
|
||||
%code{% RETVAL = THIS; %};
|
||||
SV* arrayref()
|
||||
%code{% RETVAL = to_AV(THIS); %};
|
||||
SV* pp()
|
||||
%code{% RETVAL = to_SV_pureperl(THIS); %};
|
||||
Ref<Polygon> contour()
|
||||
%code{% RETVAL = &(THIS->contour); %};
|
||||
Polygons* holes()
|
||||
%code{% RETVAL = &(THIS->holes); %};
|
||||
void scale(double factor);
|
||||
void translate(double x, double y);
|
||||
double area();
|
||||
bool is_valid();
|
||||
bool contains_line(Line* line)
|
||||
%code{% RETVAL = THIS->contains(*line); %};
|
||||
bool contains_polyline(Polyline* polyline)
|
||||
%code{% RETVAL = THIS->contains(*polyline); %};
|
||||
bool contains_point(Point* point)
|
||||
%code{% RETVAL = THIS->contains(*point); %};
|
||||
ExPolygons simplify(double tolerance);
|
||||
Polygons simplify_p(double tolerance);
|
||||
Polylines medial_axis(double max_width, double min_width)
|
||||
%code{% THIS->medial_axis(max_width, min_width, &RETVAL); %};
|
||||
%{
|
||||
|
||||
ExPolygon*
|
||||
ExPolygon::new(...)
|
||||
CODE:
|
||||
RETVAL = new ExPolygon ();
|
||||
// ST(0) is class name, ST(1) is contour and others are holes
|
||||
from_SV_check(ST(1), &RETVAL->contour);
|
||||
RETVAL->holes.resize(items-2);
|
||||
for (unsigned int i = 2; i < items; i++) {
|
||||
from_SV_check(ST(i), &RETVAL->holes[i-2]);
|
||||
}
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
void
|
||||
ExPolygon::rotate(angle, center_sv)
|
||||
double angle;
|
||||
SV* center_sv;
|
||||
CODE:
|
||||
Point center;
|
||||
from_SV_check(center_sv, ¢er);
|
||||
THIS->rotate(angle, center);
|
||||
|
||||
%}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue