From 7a2f477429baf8c6f51f4c480699a36afe3d98e6 Mon Sep 17 00:00:00 2001
From: Neil Gershenfeld <gersh@cba.mit.edu>
Date: Wed, 6 Jun 2018 17:35:11 -0400
Subject: [PATCH] slicing has parity artifacts

---
 modules/mesh/slice raster | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/modules/mesh/slice raster b/modules/mesh/slice raster
index 7dea0e5..af5f05e 100644
--- a/modules/mesh/slice raster	
+++ b/modules/mesh/slice raster	
@@ -1,10 +1,6 @@
 //
 // mesh slice raster
 //
-// todo
-//    fill interior
-//    slice planar vertices
-//
 // Neil Gershenfeld
 // (c) Massachusetts Institute of Technology 2018
 //
@@ -496,9 +492,9 @@ function worker() {
          //
          // check for crossings
          //
-         if ((v[0][2] <= (zmax-depth)) && (v[2][2] >= (zmax-depth))) {
+         if ((v[0][2] < (zmax-depth)) && (v[2][2] > (zmax-depth))) {
             //
-            //  crossing found, check for side and stroke
+            //  crossing found, check for side and save
             //
             if (v[1][2] < (zmax-depth)) {
                var x0 = v[2][0]+(v[0][0]-v[2][0])
@@ -527,14 +523,6 @@ function worker() {
             }
          }
       //
-      // sort segments
-      // map reduce filter foreach sort summon heroes
-      //
-      //var y0 = segs.map((p,index) => [p[1],index])
-      //var y1 = segs.map((p,index) => [p[3],index])
-      //y0.sort((a,b) => (a[0]-b[0]))
-      //y1.sort((a,b) => (a[0]-b[0]))
-      //
       // fill interior
       //
       for (var row = 0; row < h; ++row) {
-- 
GitLab