Changes
2 changed files (+126/-24)
-
-
@@ -42,6 +42,7 @@ type alias LongPiece ={ length : Length , tip : TipShape , buckleHole : BuckleHole , flap : Length }
-
@@ -65,6 +66,8 @@ type alias ShortPiece ={ length : Length , fixedLoop : Maybe FixedLoop , freeLoop : Maybe FreeLoop , caseSideFlap : Length , claspSideFlap : Length }
-
@@ -102,6 +105,7 @@ , count = 7, interval = mm 6 , diameter = mm 3 } , flap = mm 15 } , shortPiece = { length = mm 80
-
@@ -116,6 +120,8 @@ Just{ width = mm 5 , play = mm 2 } , caseSideFlap = mm 15 , claspSideFlap = mm 20 } , profile = Straight , thickness = mm 2.5
-
-
-
@@ -55,6 +55,29 @@ :: attrs) -- TODO: Make margin configurable [ scaleChecker (BottomLeft ( 10, canvasHeight - 10 )) , defs [] [ pattern [ id "SkivingPattern" , x "0" , y "0" , width "3" , height "3" , patternUnits "userSpaceOnUse" ] [ Svg.path [ Svg.Path.d [ MoveTo Absolute ( -1, -1 ) , LineTo Absolute ( 4, 4 ) ] , fill "none" , stroke "currentColor" , strokeWidth "0.1" , strokeDasharray "1" ] [] ] ] , longPiece params (TopLeft ( 10, 10 )) , shortPiece params (TopLeft ( ceiling (toMM params.lugWidth) + 20, 10 )) ]
-
@@ -100,6 +123,11 @@ [ text "10mm" ]] skivingSeamStroke : List (Svg.Attribute msg) skivingSeamStroke = [ fill "none", stroke "currentColor", strokeWidth "0.3", strokeDasharray "1 0.5" ] longPiece : Parameters -> Anchor -> Svg msg longPiece params anchor = let
-
@@ -109,33 +137,55 @@length = toMM params.longPiece.length flap = toMM params.longPiece.flap ( ox, oy ) = topLeftFor anchor ( ceiling lugWidth, ceiling length ) in g [] [ g [ fill "none", stroke "currentColor", strokeWidth "0.3" ] [ Svg.path [ Svg.Path.d [ MoveTo Absolute ( toFloat ox, toFloat oy ) , VerticalLineTo Relative (length - lugWidth) , EllipticalArcCurve Relative { rx = lugWidth / 2 , ry = lugWidth / 2 , angle = 0.0 , largeArcFlag = LargeArc , sweepFlag = Counterclockwise , x = lugWidth , y = 0 } [] , VerticalLineTo Relative -(length - lugWidth) , ClosePath ] [ Svg.path [ Svg.Path.d [ MoveTo Absolute ( toFloat ox, toFloat oy ) , VerticalLineTo Relative (length + flap - lugWidth) , EllipticalArcCurve Relative { rx = lugWidth / 2 , ry = lugWidth / 2 , angle = 0.0 , largeArcFlag = LargeArc , sweepFlag = Counterclockwise , x = lugWidth , y = 0 } [] , VerticalLineTo Relative -(length + flap - lugWidth) , ClosePath ] [] , fill "none" , stroke "currentColor" , strokeWidth "0.3" ] [] , Svg.path (Svg.Path.d [ MoveTo Absolute ( toFloat ox, toFloat oy + flap ) , HorizontalLineTo Relative lugWidth ] :: skivingSeamStroke ) [] , Svg.path [ Svg.Path.d [ MoveTo Absolute ( toFloat ox, toFloat oy ) , HorizontalLineTo Relative lugWidth , VerticalLineTo Relative flap , HorizontalLineTo Relative -lugWidth , ClosePath ] , fill "url(#SkivingPattern)" ] [] ]
-
@@ -148,19 +198,65 @@length = toMM params.shortPiece.length caseSideFlap = toMM params.shortPiece.caseSideFlap claspSideFlap = toMM params.shortPiece.claspSideFlap ( ox, oy ) = topLeftFor anchor ( ceiling lugWidth, ceiling length ) in g [] [ g [ fill "none", stroke "currentColor", strokeWidth "0.3" ] [ Svg.path [ Svg.Path.d [ MoveTo Absolute ( toFloat ox, toFloat oy ) , VerticalLineTo Relative (length + caseSideFlap + claspSideFlap) , HorizontalLineTo Relative lugWidth , VerticalLineTo Relative -(length + caseSideFlap + claspSideFlap) , ClosePath ] , fill "none" , stroke "currentColor" , strokeWidth "0.3" ] [] , g skivingSeamStroke [ Svg.path [ Svg.Path.d [ MoveTo Absolute ( toFloat ox, toFloat oy + caseSideFlap ) , HorizontalLineTo Relative lugWidth ] ] [] , Svg.path [ Svg.Path.d [ MoveTo Absolute ( toFloat ox, toFloat oy + caseSideFlap + length ) , HorizontalLineTo Relative lugWidth ] ] [] ] , g [ fill "url(#SkivingPattern)" ] [ Svg.path [ Svg.Path.d [ MoveTo Absolute ( toFloat ox, toFloat oy ) , VerticalLineTo Relative length , HorizontalLineTo Relative lugWidth , VerticalLineTo Relative -length , VerticalLineTo Relative caseSideFlap , HorizontalLineTo Relative -lugWidth , ClosePath ] ] [] , Svg.path [ Svg.Path.d [ MoveTo Absolute ( toFloat ox, toFloat oy + caseSideFlap + length ) , HorizontalLineTo Relative lugWidth , VerticalLineTo Relative claspSideFlap , HorizontalLineTo Relative -lugWidth , ClosePath ] ]
-