Changes
1 changed files (+149/-110)
-
-
@@ -90,6 +90,15 @@ , strokeDasharray "1 0.5"] guideStroke : List (Svg.Attribute msg) guideStroke = [ fill "none" , stroke "currentColor" , strokeWidth "0.1" , strokeDasharray "0.5 1" ] longPieceShape : ( Float, Float ) -> Parameters -> Maybe Key -> List Path.PathCommand -> Svg msg longPieceShape ( x, y ) params highlighting commands = let
-
@@ -115,58 +124,76 @@buckleWidth = lugWidth - taper in Svg.path [ Path.d (MoveTo Absolute ( x, y ) :: CubicBezierCurve Relative ( ( taper / 2, taperUntil ) , ( taper / 2, taperUntil ) , ( taper / 2, length - buckleWidth / 2 ) ) [] :: EllipticalArcCurve Relative { rx = buckleWidth / 2 , ry = buckleWidth / 2 , angle = 0.0 , largeArcFlag = LargeArc , sweepFlag = Counterclockwise , x = buckleWidth , y = 0 } [] :: CubicBezierCurve Absolute ( ( x + lugWidth - taper / 2, y + taperUntil ) , ( x + lugWidth - taper / 2, y + taperUntil ) , ( x + lugWidth, y ) ) [] :: commands ) , fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , highlightStroke (highlighting == Just LongPieceLength || highlighting == Just LugWidth || highlighting == Just Profile || highlighting == Just TaperTo || (case params.profile of Straight -> False Svg.g [] [ Svg.path [ Path.d (MoveTo Absolute ( x, y ) :: LineTo Relative ( taper / 2, taperUntil ) :: VerticalLineTo Relative (length - buckleWidth / 2 - taperUntil) :: EllipticalArcCurve Relative { rx = buckleWidth / 2 , ry = buckleWidth / 2 , angle = 0.0 , largeArcFlag = LargeArc , sweepFlag = Counterclockwise , x = buckleWidth , y = 0 } [] :: VerticalLineTo Relative -(length - buckleWidth / 2 - taperUntil) :: LineTo Relative ( taper / 2, -taperUntil ) :: commands ) , fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , highlightStroke (highlighting == Just LongPieceLength || highlighting == Just LugWidth || highlighting == Just Profile || highlighting == Just TaperTo || (case params.profile of Straight -> False Tapered _ -> highlighting == Just BuckleHoleOffset || highlighting == Just BuckleHoleInterval ) ) ] [] , case params.profile of Straight -> g [] [] Tapered _ -> highlighting Tapered _ -> Svg.path (Path.d [ MoveTo Absolute ( x + taper / 2, y + taperUntil ) , HorizontalLineTo Relative buckleWidth ] :: highlightStroke (highlighting == Just LugWidth || highlighting == Just TaperTo || highlighting == Just BuckleHoleOffset || highlighting == Just BuckleHoleInterval ) ) == Just BuckleHoleDiameter ) :: guideStroke ) [] ] [] longPiece : Parameters -> Maybe Key -> Item msg
-
@@ -323,75 +350,87 @@( x, y ) = at in Svg.path [ Path.d ([ Just (MoveTo Absolute ( x, y )) , if includeCaseSideFlap then Just (VerticalLineTo Relative (toMM params.shortPiece.caseSideFlap)) g [] [ Svg.path [ Path.d ([ Just (MoveTo Absolute ( x, y )) , if includeCaseSideFlap then Just (VerticalLineTo Relative (toMM params.shortPiece.caseSideFlap)) else Nothing , Just (LineTo Relative ( taper / 2, taperUntil )) , Just (VerticalLineTo Relative (length - taperUntil)) , if includeClaspSideFlap then Just (VerticalLineTo Relative (toMM params.shortPiece.claspSideFlap)) else Nothing , Just (HorizontalLineTo Relative (lugWidth - taper)) , if includeClaspSideFlap then Just (VerticalLineTo Relative -(toMM params.shortPiece.claspSideFlap)) else Nothing , Just (VerticalLineTo Relative -(length - taperUntil)) , Just (LineTo Relative ( taper / 2, -taperUntil )) , if includeCaseSideFlap then Just (VerticalLineTo Relative -(toMM params.shortPiece.caseSideFlap)) else Nothing , Just ClosePath ] |> List.filterMap identity ) , fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , highlightStroke (highlighting == Just ShortPieceLength || highlighting == Just LugWidth || highlighting == Just Profile || highlighting == Just TaperTo || (case params.profile of Straight -> False else Nothing , Just (CubicBezierCurve Relative ( ( taper / 2, taperUntil ) , ( taper / 2, taperUntil ) , ( taper / 2, length ) ) [] Tapered _ -> highlighting == Just BuckleHoleOffset || highlighting == Just BuckleHoleInterval ) ) , if includeClaspSideFlap then Just (VerticalLineTo Relative (toMM params.shortPiece.claspSideFlap)) ] [] , case params.profile of Straight -> g [] [] else Nothing , Just (HorizontalLineTo Relative (lugWidth - taper)) , if includeClaspSideFlap then Just (VerticalLineTo Relative -(toMM params.shortPiece.claspSideFlap)) Tapered _ -> Svg.path (Path.d [ MoveTo Absolute ( x + taper / 2, y + taperUntil ) , MoveTo Relative ( 0 , if includeCaseSideFlap then toMM params.shortPiece.caseSideFlap else Nothing , Just (CubicBezierCurve Relative ( ( 0, -length + taperUntil ) , ( 0, -length + taperUntil ) , ( taper / 2, -length ) else 0 ) , HorizontalLineTo Relative (lugWidth - taper) ] :: guideStroke ) [] ) , if includeCaseSideFlap then Just (VerticalLineTo Relative -(toMM params.shortPiece.caseSideFlap)) else Nothing , Just ClosePath ] |> List.filterMap identity ) , fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , highlightStroke (highlighting == Just ShortPieceLength || highlighting == Just LugWidth || highlighting == Just Profile || highlighting == Just TaperTo || (case params.profile of Straight -> False Tapered _ -> highlighting == Just BuckleHoleOffset || highlighting == Just BuckleHoleInterval ) ) ] [] shortPiece : Parameters -> Maybe Key -> Item msg
-