From 3288447e705cd106c48e4d1bdb15ff305db427e1 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 23 Jan 2014 20:52:47 -0500 Subject: [PATCH] Added note for future enhancement of rotate_extrude --- src/GeometryEvaluator.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/GeometryEvaluator.cc b/src/GeometryEvaluator.cc index 1314529a..50f4b5f1 100644 --- a/src/GeometryEvaluator.cc +++ b/src/GeometryEvaluator.cc @@ -713,6 +713,20 @@ static void fill_ring(std::vector &ring, const Outline2d &o, double a) /*! Input to extrude should be clean. This means non-intersecting, correct winding order etc., the input coming from a library like Clipper. + + FIXME: We should handle some common corner cases better: + o 2D polygon having an edge being on the Y axis: + In this case, we don't need to generate geometry involving this edge as it + will be an internal edge. + o 2D polygon having a vertex touching the Y axis: + This is more complex as the resulting geometry will (may?) be nonmanifold. + In any case, the previous case is a specialization of this, so the following + should be handled for both cases: + Since the ring associated with this vertex will have a radius of zero, it will + collapse to one vertex. Any quad using this ring will be collapsed to a triangle. + + Currently, we generate a lot of zero-area triangles + */ static Geometry *rotatePolygon(const RotateExtrudeNode &node, const Polygon2d &poly) {