Ported Slic3r::Geometry::arrange() to C++/XS

This commit is contained in:
Alessandro Ranellucci 2015-04-29 19:19:07 +02:00
parent 5eb3bc52ef
commit d6d7880507
6 changed files with 160 additions and 120 deletions

View file

@ -23,6 +23,21 @@ double rad2deg_dir(double angle);
double deg2rad(double angle);
void simplify_polygons(const Polygons &polygons, double tolerance, Polygons* retval);
class ArrangeItem {
public:
Pointf pos;
size_t index_x, index_y;
coordf_t dist;
};
class ArrangeItemIndex {
public:
coordf_t index;
ArrangeItem item;
ArrangeItemIndex(coordf_t _index, ArrangeItem _item) : index(_index), item(_item) {};
};
double linint(double value, double oldmin, double oldmax, double newmin, double newmax);
Pointfs arrange(size_t total_parts, Pointf part, coordf_t dist, const BoundingBoxf &bb = BoundingBoxf());
class MedialAxis {
public:
Points points;