         self.isIntersection = isIntersection
     }
 
-    internal func emitTo(_ end: CGPoint, using transition: VertexTransition) -> BezierCurve {
+    func emitTo(_ end: CGPoint, using transition: VertexTransition) -> BezierCurve {
         switch transition {
         case .line:
             return LineSegment(p0: self.location, p1: end)

    }
}

internal class Vertex {
    public var location: CGPoint
    public let isIntersection: Bool
    // pointers must be set after initialization

    public struct IntersectionInfo {
        public var isEntry: Bool = false
        public var isExit: Bool = false
        public weak var neighbor: Vertex?
    }
    public var intersectionInfo: IntersectionInfo = IntersectionInfo()

    public var isCrossing: Bool {
        guard let neighborInfo = self.intersectionInfo.neighbor?.intersectionInfo else {
            return false
        }
        return self.isIntersection && (self.intersectionInfo.isEntry || self.intersectionInfo.isExit) && (neighborInfo.isEntry || neighborInfo.isExit)
    }

    internal struct SplitInfo {
        var t: CGFloat
    }
    internal var splitInfo: SplitInfo? // non-nil only when vertex is inserted by splitting an element

    public private(set) var next: Vertex! = nil
    public private(set) weak var previous: Vertex! = nil
    public private(set) var nextTransition: VertexTransition! = nil

    public func setNextVertex(_ vertex: Vertex, transition: VertexTransition) {
        self.next = vertex
        self.nextTransition = transition
    }

    public func setPreviousVertex(_ vertex: Vertex) {
        self.previous = vertex
    }


                assert(end !== list[location.elementIndex+1])
                end = end.next
            }
            insertIntersectionVertex(v, between: start, and: end, at: location.t, for: path.elementAtComponentIndex(location.componentIndex, elementIndex: location.elementIndex))
        }
        self.lists[location.componentIndex] = list
    }
