From 8d10aa298295a31c2bc2ad1bae4f2edc364bed38 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 17:43:01 +0100 Subject: bugfix: surface() modules with center=true wasn't exactly centered in the XY plane 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++) -- cgit v0.10.1