                     case .subset: return .overlap(.superset)
                     }
                 case let .regions(lhs, rhs): return .regions(rhs, lhs)
-                case let .segments(segments): return .segments(segments)
-                }
-            } else {
-                
+                case let .segments(forward, backward): return self.area.sign == other.area.sign ? .segments(forward, backward) : .segments(backward, forward)
+                }
+            } else {
                 let intersectTable = ConstructiveSolidResult.Table(self, other)
-                
                 if intersectTable.looping_left.count != 0 || intersectTable.looping_right.count != 0 {
-                    constructiveSolidResultCache[other.cacheId] = .regions(ShapeRegion(solids: self.breakLoop(intersectTable.looping_left).map { ShapeRegion.Solid(solid: $0.solid) }),
-                                                                           ShapeRegion(solids: other.breakLoop(intersectTable.looping_right).map { ShapeRegion.Solid(solid: $0.solid) }))
+                    constructiveSolidResultCache[other.cacheId] = .regions(ShapeRegion(solids: self.breakLoop(intersectTable.looping_left)), ShapeRegion(solids: other.breakLoop(intersectTable.looping_right)))
                 } else {
                     
                     if intersectTable.graph.count == 0 {
                         constructiveSolidResultCache[other.cacheId] = .overlap(intersectTable.overlap)
                     } else {
-                        constructiveSolidResultCache[other.cacheId] = .segments(createSegments(other, intersectTable.graph))
+                        let segments = createSegments(other, intersectTable.graph)
+                        let forward = segments.filter { self.area.sign == $0.solid.area.sign }
+                        let backward = segments.filter { self.area.sign != $0.solid.area.sign }
+                        constructiveSolidResultCache[other.cacheId] = .segments(forward, backward)
                     }
                 }
             }

            if superset {
                let self_holes = ShapeRegion(solids: self.holes.flatMap { ShapeRegion.Solid(solid: $0) })
                let a = self_holes.union(ShapeRegion(solid: other))
                cache.subtracting[other.cacheId] = [ShapeRegion.Solid(components: [self.solid] + a.solids.map { $0.solid })] + a.solids.flatMap { $0.holes.map { ShapeRegion.Solid(solid: $0) } }
            } else if let subtracting = _subtracting {
                let self_holes = ShapeRegion(solids: self.holes.flatMap { ShapeRegion.Solid(solid: $0) })
                let other_holes = ShapeRegion(solids: other.holes.flatMap { ShapeRegion.Solid(solid: $0) })

        }
        
        fileprivate init(solid: Shape.Component) {
            self.init(components: [solid])
        }
        
        fileprivate init<S : Sequence>(solid: Shape.Component, holes: S) where S.Element == Shape.Component {
            self.init(components: [solid] + holes)
        }
    }
}
