                 guard let reverse_start = _reverse_start else { continue }
                 
                 result.append(Shape.Component(start: start, closed: true, segments: segments1 + [.line(reverse_start)] + segments2.reversed()))
+                result.append(last_max.shape)
                 
-                last = p3
-                last_width = width
+                last_max = current
             }
         }
         
-        if isClosed && !start.almostEqual(last) {
+        if isClosed && !start.almostEqual(last.center) {
             
             let width = abs(widths[0])
-            let segment = LineSegment(last, start)
+            let segment = LineSegment(last.center, start)
             
-            guard let s0 = segment.offset(0.5 * last_width, 0.5 * width) else { return result }
-            guard let s1 = segment.offset(-0.5 * last_width, -0.5 * width) else { return result }
+            guard let s0 = segment.offset(last.radius, 0.5 * width) else { return result }
+            guard let s1 = segment.offset(-last.radius, -0.5 * width) else { return result }
             
             result.append(Shape.Component(start: s0.p0, closed: true, segments: [.line(s0.p1), .line(s1.p1), .line(s1.p0)]))
         }
+        
+        result.append(last_max.shape)
         
         return result
     }

            switch segment {
            case let .line(p1):
                
                result.append(_circle(p1, 0.5 * width))
                
                let segment = LineSegment(last, p1)
                
                guard let s0 = segment.offset(0.5 * last_width, 0.5 * width) else { continue }
                guard let s1 = segment.offset(-0.5 * last_width, -0.5 * width) else { continue }
                
                result.append(Shape.Component(start: s0.p0, closed: true, segments: [.line(s0.p1), .line(s1.p1), .line(s1.p0)]))
                
                last = p1
                last_width = width
                
            case let .quad(p1, p2):
                
                result.append(_circle(p2, 0.5 * width))
                
                let segment = QuadBezier(last, p1, p2)
                
                var _start: Point?
                var _reverse_start: Point?
                var segments1: [Shape.Segment] = []
                var segments2: [Shape.Segment] = []
                
                segment.offset(0.5 * last_width, 0.5 * width) { _, segment in
                    if _start == nil {
                        _start = segment.p0
                    }

                
                guard let start = _start else { continue }
                
                segment.offset(-last.radius, -0.5 * width) { _, segment in
                    _reverse_start = segment.p3
                    segments2.append(.cubic(segment.p2, segment.p1, segment.p0))
                }
