diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2015-12-02 20:06:18 +0300 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2015-12-02 20:06:18 +0300 |
commit | ed752192152150886907a5ba05c5db559337fd51 (patch) | |
tree | 54b3a1529d9b03d01b4fc8d1c23c7a6b77ba95b8 /xs/src/libslic3r/Geometry.cpp | |
parent | dfce3a3138798a2592fa20820f1a4ed1e3761351 (diff) |
Ported mode Model methods to XS
Diffstat (limited to 'xs/src/libslic3r/Geometry.cpp')
-rw-r--r-- | xs/src/libslic3r/Geometry.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xs/src/libslic3r/Geometry.cpp b/xs/src/libslic3r/Geometry.cpp index 62a6d8f7c..f85078b92 100644 --- a/xs/src/libslic3r/Geometry.cpp +++ b/xs/src/libslic3r/Geometry.cpp @@ -168,15 +168,15 @@ 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) +arrange(size_t total_parts, Pointf part, coordf_t dist, const BoundingBoxf* bb) { // use actual part size (the largest) plus separation distance (half on each side) in spacing algorithm part.x += dist; part.y += dist; Pointf area; - if (bb.defined) { - area = bb.size(); + if (bb != NULL) { + area = bb->size(); } else { // bogus area size, large enough not to trigger the error below area.x = part.x * total_parts; @@ -278,10 +278,10 @@ arrange(size_t total_parts, Pointf part, coordf_t dist, const BoundingBoxf &bb) positions.push_back(Pointf(cx * part.x, cy * part.y)); } - if (bb.defined) { + if (bb != NULL) { for (Pointfs::iterator p = positions.begin(); p != positions.end(); ++p) { - p->x += bb.min.x; - p->y += bb.min.y; + p->x += bb->min.x; + p->y += bb->min.y; } } return positions; |