mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-04 01:48:44 +03:00
QIDISlicer1.0.0
This commit is contained in:
60
xs/xsp/Geometry.xsp
Normal file
60
xs/xsp/Geometry.xsp
Normal file
@@ -0,0 +1,60 @@
|
||||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <xsinit.h>
|
||||
#include "libslic3r/Geometry.hpp"
|
||||
#include "libslic3r/Geometry/ConvexHull.hpp"
|
||||
#include "libslic3r/ShortestPath.hpp"
|
||||
%}
|
||||
|
||||
|
||||
%package{Slic3r::Geometry};
|
||||
|
||||
%{
|
||||
|
||||
Clone<Polygon>
|
||||
convex_hull(points)
|
||||
Points points
|
||||
CODE:
|
||||
RETVAL = Slic3r::Geometry::convex_hull(points);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
std::vector<Points::size_type>
|
||||
chained_path_from(points, start_from)
|
||||
Points points
|
||||
Point* start_from
|
||||
CODE:
|
||||
RETVAL = chain_points(points, start_from);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
double
|
||||
rad2deg(angle)
|
||||
double angle
|
||||
CODE:
|
||||
RETVAL = Slic3r::Geometry::rad2deg(angle);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
double
|
||||
deg2rad(angle)
|
||||
double angle
|
||||
CODE:
|
||||
RETVAL = Slic3r::Geometry::deg2rad(angle);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
IV
|
||||
_constant()
|
||||
ALIAS:
|
||||
X = X
|
||||
Y = Y
|
||||
Z = Z
|
||||
PROTOTYPE:
|
||||
CODE:
|
||||
RETVAL = ix;
|
||||
OUTPUT: RETVAL
|
||||
|
||||
%}
|
||||
|
||||
Reference in New Issue
Block a user