Changes
1 changed files (+105/-5)
-
-
@@ -24,8 +24,12 @@ | BottomLeft ( Float, Float )| BottomRight ( Float, Float ) topLeftFor : Anchor -> ( Float, Float ) -> ( Float, Float ) topLeftFor anchor ( width, height ) = type alias Size = { width : Float, height : Float } topLeftFor : Anchor -> Size -> ( Float, Float ) topLeftFor anchor { width, height } = case anchor of TopLeft ( x, y ) -> ( x, y )
-
@@ -56,6 +60,7 @@ :: class "print":: attrs ) [ scaleChecker (BottomLeft ( margin, canvasHeight - margin )) , legends params (BottomLeft ( margin + scaleCheckerSize.width + 10, canvasHeight - margin )) , defs [] [ pattern
-
@@ -82,13 +87,18 @@ ], longPiece params (TopLeft ( margin, margin )) , shortPiece params (TopLeft ( toMM params.lugWidth + margin + 10, margin )) ] scaleCheckerSize : Size scaleCheckerSize = Size 10 10 scaleChecker : Anchor -> Svg msg scaleChecker anchor = let ( ox, oy ) = topLeftFor anchor ( 10, 10 ) topLeftFor anchor scaleCheckerSize px : Float -> String px n =
-
@@ -124,6 +134,96 @@ [ text "10mm" ]] legendsSize : Size legendsSize = Size 34 23 legends : Parameters -> Anchor -> Svg msg legends params anchor = let ( ox, oy ) = topLeftFor anchor legendsSize px : Float -> String px n = String.fromFloat (ox + n) py : Float -> String py n = String.fromFloat (oy + n) in g [] [ Svg.path [ Svg.Path.d [ MoveTo Absolute ( ox, oy + 5 ) , HorizontalLineTo Relative 8 ] , stroke "currentColor" , strokeWidth (params.rendering.lineWidth |> toMM |> String.fromFloat) ] [] , text_ [ x (px 10) , y (py 6) , fontSize "4" , fontWeight "100" , textAnchor "left" , fill "currentColor" ] [ text "Cut line" ] , rect [ x (px 0) , y (py 10) , stroke "currentColor" , width "8" , height "5" , strokeWidth "0.2" , fill "url(#SkivingPattern)" ] [] , text_ [ x (px 10) , y (py 14) , fontSize "4" , fontWeight "100" , textAnchor "left" , fill "currentColor" ] [ text "Skiving area" ] , g [ fill "none" , stroke "currentColor" , strokeWidth "0.1" ] [ Svg.path [ Svg.Path.d [ MoveTo Absolute ( ox + 1.5, oy + 20.5 ) , HorizontalLineTo Relative 5 ] ] [] , Svg.path [ Svg.Path.d [ MoveTo Absolute ( ox + 4, oy + 18 ) , VerticalLineTo Relative 5 ] ] [] ] , text_ [ x (px 10) , y (py 22) , fontSize "4" , fontWeight "100" , textAnchor "left" , fill "currentColor" ] [ text "Hole center" ] ] skivingSeamStroke : Parameters -> List (Svg.Attribute msg) skivingSeamStroke params = [ fill "none"
-
@@ -146,7 +246,7 @@ flap =toMM params.longPiece.flap ( ox, oy ) = topLeftFor anchor ( lugWidth, length ) topLeftFor anchor (Size lugWidth length) in g []
-
@@ -271,7 +371,7 @@ claspSideFlap =toMM params.shortPiece.claspSideFlap ( ox, oy ) = topLeftFor anchor ( lugWidth, length ) topLeftFor anchor (Size lugWidth length) in g []
-