Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Geometry.xsp « xsp « xs - github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: acbfb0875696d3d85894b940b1ae7c3acac8af3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
%module{Slic3r::XS};

%{
#include <myinit.h>
#include "Geometry.hpp"
%}


%package{Slic3r::Geometry};

%{

bool
directions_parallel(angle1, angle2)
    double      angle1
    double      angle2
    CODE:
        RETVAL = Slic3r::Geometry::directions_parallel(angle1, angle2);
    OUTPUT:
        RETVAL

bool
directions_parallel_within(angle1, angle2, max_diff)
    double      angle1
    double      angle2
    double      max_diff
    CODE:
        RETVAL = Slic3r::Geometry::directions_parallel(angle1, angle2, max_diff);
    OUTPUT:
        RETVAL

Polygon*
convex_hull(points)
    Points      points
    CODE:
        RETVAL = new Polygon ();
        Slic3r::Geometry::convex_hull(points, RETVAL);
    OUTPUT:
        RETVAL

std::vector<Points::size_type>
chained_path(points)
    Points      points
    CODE:
        Slic3r::Geometry::chained_path(points, RETVAL);
    OUTPUT:
        RETVAL

std::vector<Points::size_type>
chained_path_from(points, start_from)
    Points      points
    Point*      start_from
    CODE:
        Slic3r::Geometry::chained_path(points, RETVAL, *start_from);
    OUTPUT:
        RETVAL

%}