diff options
author | Marius Kintel <marius@kintel.net> | 2011-12-21 16:43:01 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-12-21 16:43:01 (GMT) |
commit | 8d10aa298295a31c2bc2ad1bae4f2edc364bed38 (patch) | |
tree | eb141dab203e438177c9789ddae3dd3ce7786a8b /src | |
parent | 9113cf42d08e828a2ba7c4e40ac24a937f17b306 (diff) |
bugfix: surface() modules with center=true wasn't exactly centered in the XY plane
Diffstat (limited to 'src')
-rw-r--r-- | src/surface.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/surface.cc b/src/surface.cc index 1a5f9bd..39d1972 100644 --- a/src/surface.cc +++ b/src/surface.cc @@ -129,8 +129,8 @@ PolySet *SurfaceNode::evaluate_polyset(class PolySetEvaluator *) const p->convexity = convexity; - double ox = center ? -columns/2.0 : 0; - double oy = center ? -lines/2.0 : 0; + double ox = center ? -(columns-1)/2.0 : 0; + double oy = center ? -(lines-1)/2.0 : 0; for (int i = 1; i < lines; i++) for (int j = 1; j < columns; j++) |