Changes
6 changed files (+129/-422)
-
-
@@ -45,14 +45,13 @@type alias FixedLoop = { width : Length , play : Length , offset : Length , length : Length } type alias FreeLoop = { width : Length , play : Length , length : Length , overlap : Length }
-
@@ -76,23 +75,15 @@ type alias Loops ={ fixed : Maybe FixedLoop , free : Maybe FreeLoop , style : LoopStyle , thickness : Length } {-| Clasp / Buckle. -} type alias Buckle = { springBarDiameter : Length } {-| Parameters for the short piece, which has clasp at the end. This does not have to be shorter than `LongPiece`. -} type alias ShortPiece = { length : Length , loops : Loops , buckle : Buckle }
-
@@ -151,8 +142,6 @@ type alias Parameters ={ lugWidth : Length , longPiece : LongPiece , shortPiece : ShortPiece , thickness : Length , lining : Length , profile : Profile , rendering : Rendering }
-
@@ -160,16 +149,15 @@defaultFixedLoop : FixedLoop defaultFixedLoop = { offset = mm 8 { length = mm 55 , width = mm 6 , play = mm 1 } defaultFreeLoop : FreeLoop defaultFreeLoop = { width = mm 5 , play = mm 2 , length = mm 55 , overlap = mm 5 }
-
@@ -193,12 +181,8 @@ , loops ={ fixed = Just defaultFixedLoop , free = Just defaultFreeLoop , style = Simple , thickness = mm 1.0 } , buckle = { springBarDiameter = mm 1.4 } } , thickness = mm 2.5 , lining = mm 0.5 , profile = Straight , rendering = { size = A4
-
@@ -219,12 +203,8 @@ toDict : Parameters -> ParametersDicttoDict params = [ ( "version", "1.0" ) , ( Key.toString LugWidth, String.fromFloat (toMM params.lugWidth) ) , ( Key.toString SurfaceThickness, String.fromFloat (toMM params.thickness) ) , ( Key.toString LiningThickness, String.fromFloat (toMM params.lining) ) , ( Key.toString LongPieceLength, String.fromFloat (toMM params.longPiece.length) ) , ( Key.toString LoopThickness, String.fromFloat (toMM params.shortPiece.loops.thickness) ) , ( Key.toString LoopStyle, loopStyleToString params.shortPiece.loops.style ) , ( Key.toString BuckleSpringBarDiameter, String.fromFloat (toMM params.shortPiece.buckle.springBarDiameter) ) , ( Key.toString ShortPieceLength, String.fromFloat (toMM params.shortPiece.length) ) , ( Key.toString CanvasMargin, String.fromFloat (toMM params.rendering.margin) ) , ( Key.toString LineWidth, String.fromFloat (toMM params.rendering.lineWidth) )
-
@@ -255,7 +235,7 @@ (case params.shortPiece.loops.fixed ofJust fixed -> [ ( Key.toString HasFixedLoop, "" ) , ( Key.toString FixedLoopWidth, String.fromFloat (toMM fixed.width) ) , ( Key.toString FixedLoopPlay, String.fromFloat (toMM fixed.play) ) , ( Key.toString FixedLoopLength, String.fromFloat (toMM fixed.length) ) ] Nothing ->
-
@@ -266,7 +246,7 @@ (case params.shortPiece.loops.free ofJust free -> [ ( Key.toString HasFreeLoop, "" ) , ( Key.toString FreeLoopWidth, String.fromFloat (toMM free.width) ) , ( Key.toString FreeLoopPlay, String.fromFloat (toMM free.play) ) , ( Key.toString FreeLoopLength, String.fromFloat (toMM free.length) ) , ( Key.toString FreeLoopOverlap, String.fromFloat (toMM free.overlap) ) ]
-
@@ -290,9 +270,9 @@ fallbackValues : ParametersDictfallbackValues = [ ( Key.toString TaperTo, "18" ) , ( Key.toString FixedLoopWidth, String.fromFloat (toMM defaultFixedLoop.width) ) , ( Key.toString FixedLoopPlay, String.fromFloat (toMM defaultFixedLoop.play) ) , ( Key.toString FixedLoopLength, String.fromFloat (toMM defaultFixedLoop.length) ) , ( Key.toString FreeLoopWidth, String.fromFloat (toMM defaultFreeLoop.width) ) , ( Key.toString FreeLoopPlay, String.fromFloat (toMM defaultFreeLoop.play) ) , ( Key.toString FreeLoopLength, String.fromFloat (toMM defaultFreeLoop.length) ) , ( Key.toString FreeLoopOverlap, String.fromFloat (toMM defaultFreeLoop.overlap) ) , ( Key.toString BuckleHoleDiameter, String.fromFloat (toMM default.longPiece.buckleHole.diameter) ) ]
-
-
-
@@ -563,22 +563,6 @@ , disabled = model.parameters.profile == Parameters.Straight, attrs = step "1.0" :: lengthFieldAttrs constraints.taperTo } , numberField model { key = SurfaceThickness , title = [ text "Surface Leather Thickness" ] , description = [ text "Thickness of surface leather." ] , unit = Just "mm" , disabled = False , attrs = step "0.1" :: lengthFieldAttrs constraints.thickness } , numberField model { key = LiningThickness , title = [ text "Lining Leather Thickness" ] , description = [ text "Thickness of lining leather." ] , unit = Just "mm" , disabled = False , attrs = step "0.1" :: lengthFieldAttrs constraints.lining } , numberField model { key = LongPieceLength , title = [ text "Length (Tail Side)" ] , description =
-
@@ -640,16 +624,6 @@ , disabled = False, attrs = step "0.5" :: lengthFieldAttrs constraints.longPiece.buckleHole.interval } , numberField model { key = BuckleSpringBarDiameter , title = [ text "Spring Bar Diameter" ] , description = [ text "Diameter of the spring bar to use for buckle / clasp." ] , unit = Just "mm" , disabled = False , attrs = step "0.1" :: lengthFieldAttrs constraints.shortPiece.buckle.springBarDiameter } ] , hr [] [] , group
-
@@ -673,17 +647,6 @@ , value = loopStyleToString Folded} ] } , numberField model { key = LoopThickness , title = [ text "Loop Leather Thickness" ] , description = [ text "Thickness of the leather to use for loops. Final thickness will be doubled if you choose \"Folded\" style." ] , unit = Just "mm" , disabled = not (hasKey HasFixedLoop model.fields) && not (hasKey HasFreeLoop model.fields) , attrs = step "0.1" :: lengthFieldAttrs constraints.shortPiece.loops.thickness } , boolField model { key = HasFixedLoop , title = [ text "Fixed Loop" ]
-
@@ -709,13 +672,13 @@ , attrs =step "0.1" :: lengthFieldAttrs constraints.shortPiece.loops.fixed.width } , numberField model { key = FixedLoopPlay , title = [ text "Fixed Loop Play" ] , description = [ text "Extra length to add to the fixed loop, for adjusting tightness." ] { key = FixedLoopLength , title = [ text "Fixed Loop Length" ] , description = [ text "Length of the fixed loop. This should be at least double the strap width and thickness." ] , unit = Just "mm" , disabled = not (hasKey HasFixedLoop model.fields) , attrs = step "0.1" :: lengthFieldAttrs constraints.shortPiece.loops.fixed.play step "0.1" :: lengthFieldAttrs constraints.shortPiece.loops.fixed.length } , boolField model { key = HasFreeLoop
-
@@ -742,13 +705,13 @@ , attrs =step "0.1" :: lengthFieldAttrs constraints.shortPiece.loops.free.width } , numberField model { key = FreeLoopPlay , title = [ text "Free Loop Play" ] , description = [ text "Extra length to add to the free loop, for adjusting tightness." ] { key = FreeLoopLength , title = [ text "Free Loop Length" ] , description = [ text "Length of the free loop. This should be at least double the strap width and thickness." ] , unit = Just "mm" , disabled = not (hasKey HasFreeLoop model.fields) , attrs = step "0.1" :: lengthFieldAttrs constraints.shortPiece.loops.free.play step "0.1" :: lengthFieldAttrs constraints.shortPiece.loops.free.length } , numberField model { key = FreeLoopOverlap
-
-
-
@@ -21,13 +21,13 @@type alias FixedLoop = { width : NumberConstraints Length , play : NumberConstraints Length , length : NumberConstraints Length } type alias FreeLoop = { width : NumberConstraints Length , play : NumberConstraints Length , length : NumberConstraints Length , overlap : NumberConstraints Length }
-
@@ -35,25 +35,12 @@type alias Loops = { fixed : FixedLoop , free : FreeLoop , thickness : NumberConstraints Length } type alias BuckleTongue = { thickness : NumberConstraints Length , width : NumberConstraints Length } type alias Buckle = { springBarDiameter : NumberConstraints Length } type alias ShortPiece = { loops : Loops , length : NumberConstraints Length , buckle : Buckle }
-
@@ -81,8 +68,6 @@ type alias Parameters ={ lugWidth : NumberConstraints Length , longPiece : LongPiece , shortPiece : ShortPiece , lining : NumberConstraints Length , thickness : NumberConstraints Length , taperTo : NumberConstraints Length , rendering : Rendering }
-
@@ -104,22 +89,16 @@ , shortPiece ={ loops = { fixed = { width = { min = Just (mm 1), max = Just (mm 15) } , play = { min = Just (mm 0), max = Just (mm 10) } , length = { min = Just (mm 10), max = Just (mm 100) } } , free = { width = { min = Just (mm 1), max = Just (mm 15) } , play = { min = Just (mm 0), max = Just (mm 10) } , length = { min = Just (mm 10), max = Just (mm 100) } , overlap = { min = Just (mm 0), max = Just (mm 10) } } , thickness = { min = Just (mm 0.1), max = Just (mm 1) } } , length = { min = Just (mm 5), max = Just (mm 150) } , buckle = { springBarDiameter = { min = Just (mm 1), max = Just (mm 3) } } } , lining = { min = Just (mm 0.1), max = Just (mm 5) } , thickness = { min = Just (mm 0.1), max = Just (mm 5) } , taperTo = { min = Just (mm 5), max = Just (mm 28) } , rendering = { margin = { min = Just (mm 0), max = Just (mm 20) }
-
-
-
@@ -14,22 +14,18 @@ type Key= LugWidth | Profile | TaperTo | SurfaceThickness | LiningThickness | BuckleHoleOffset | BuckleHoleCount | BuckleHoleInterval | BuckleHoleDiameter | BuckleSpringBarDiameter | LongPieceLength | LoopThickness | LoopStyle | HasFixedLoop | FixedLoopWidth | FixedLoopPlay | FixedLoopLength | HasFreeLoop | FreeLoopWidth | FreeLoopPlay | FreeLoopLength | FreeLoopOverlap | ShortPieceLength | CanvasMargin
-
@@ -53,12 +49,6 @@ "taper-to"LugWidth -> "lug-width" SurfaceThickness -> "thickness" LiningThickness -> "lining-thickness" BuckleHoleOffset -> "buckle-hole-offset"
-
@@ -72,14 +62,8 @@BuckleHoleInterval -> "buckle-hole-interval" BuckleSpringBarDiameter -> "buckle-spring-bar-diameter" LongPieceLength -> "long-piece-length" LoopThickness -> "loop-thickness" LoopStyle -> "loop-style"
-
@@ -90,8 +74,8 @@FixedLoopWidth -> "fixed-loop-width" FixedLoopPlay -> "fixed-loop-play" FixedLoopLength -> "fixed-loop-length" HasFreeLoop -> "has-free-loop"
-
@@ -99,8 +83,8 @@FreeLoopWidth -> "free-loop-width" FreeLoopPlay -> "free-loop-play" FreeLoopLength -> "free-loop-length" FreeLoopOverlap -> "free-loop-overlap"
-
-
-
@@ -177,21 +177,21 @@ parseFixedLoop fields =if hasKey HasFixedLoop fields then case ( parseField FixedLoopWidth (parseLength constraints.shortPiece.loops.fixed.width) fields , parseField FixedLoopPlay (parseLength constraints.shortPiece.loops.fixed.play) fields , parseField FixedLoopLength (parseLength constraints.shortPiece.loops.fixed.length) fields ) of ( Ok width, Ok play ) -> ( Ok width, Ok length ) -> let base = Parameters.defaultFixedLoop in Ok (Just { base | width = width, play = play }) Ok (Just { base | width = width, length = length }) ( width, play ) -> ( width, length ) -> Err (mkErrors [ ( FixedLoopWidth, getError width ) , ( FixedLoopPlay, getError play ) , ( FixedLoopLength, getError length ) ] )
-
@@ -204,18 +204,18 @@ parseFreeLoop fields =if hasKey HasFreeLoop fields then case ( parseField FreeLoopWidth (parseLength constraints.shortPiece.loops.free.width) fields , parseField FreeLoopPlay (parseLength constraints.shortPiece.loops.free.play) fields , parseField FreeLoopLength (parseLength constraints.shortPiece.loops.free.length) fields , parseField FreeLoopOverlap (parseLength constraints.shortPiece.loops.free.overlap) fields ) of ( Ok width, Ok play, Ok overlap ) -> Ok (Just { width = width, play = play, overlap = overlap }) ( Ok width, Ok length, Ok overlap ) -> Ok (Just { width = width, length = length, overlap = overlap }) ( width, play, overlap ) -> ( width, length, overlap ) -> Err (mkErrors [ ( FreeLoopWidth, getError width ) , ( FreeLoopPlay, getError play ) , ( FreeLoopLength, getError length ) , ( FreeLoopOverlap, getError overlap ) ] )
-
@@ -228,18 +228,16 @@ parseLoops : ParametersDict -> Result Errors Parameters.LoopsparseLoops fields = case ( ( parseFixedLoop fields, parseFreeLoop fields ) , ( parseField LoopStyle parseLoopStyle fields , parseField LoopThickness (parseLength constraints.shortPiece.loops.thickness) fields ) , parseField LoopStyle parseLoopStyle fields ) of ( ( Ok fixed, Ok free ), ( Ok style, Ok thickness ) ) -> Ok { fixed = fixed, free = free, style = style, thickness = thickness } ( ( Ok fixed, Ok free ), Ok style ) -> Ok { fixed = fixed, free = free, style = style } ( ( fixed, free ), ( style, thickness ) ) -> ( ( fixed, free ), style ) -> [ getError fixed |> Maybe.withDefault Dict.empty , getError free |> Maybe.withDefault Dict.empty , mkErrors [ ( LoopStyle, getError style ), ( LoopThickness, getError thickness ) ] , mkErrors [ ( LoopStyle, getError style ) ] ] |> List.map Dict.toList |> List.concat
-
@@ -247,37 +245,23 @@ |> Dict.fromList|> Err parseBuckle : ParametersDict -> Result Errors Parameters.Buckle parseBuckle fields = case parseField BuckleSpringBarDiameter (parseLength constraints.shortPiece.buckle.springBarDiameter) fields of Ok springBarDiameter -> Ok { springBarDiameter = springBarDiameter } Err err -> Err (mkErrors [ ( BuckleSpringBarDiameter, Just err ) ]) parseShortPiece : ParametersDict -> Result Errors Parameters.ShortPiece parseShortPiece fields = case ( parseLoops fields , parseField ShortPieceLength (parseLength constraints.shortPiece.length) fields , parseBuckle fields ) of ( Ok loops, Ok length, Ok buckle ) -> ( Ok loops, Ok length ) -> let base = Parameters.default.shortPiece in Ok { base | loops = loops, length = length, buckle = buckle } Ok { base | loops = loops, length = length } ( loops, length, buckle ) -> ( loops, length ) -> [ getError loops |> Maybe.withDefault Dict.empty , mkErrors [ ( ShortPieceLength, getError length ) ] , getError buckle |> Maybe.withDefault Dict.empty ] |> List.map Dict.toList |> List.concat
-
@@ -391,10 +375,7 @@ parse fields =case getKey Version fields of Just "1.0" -> case ( ( parseField LugWidth (parseLength constraints.lugWidth) fields , parseField LiningThickness (parseLength constraints.lining) fields , parseField SurfaceThickness (parseLength constraints.thickness) fields ) ( parseField LugWidth (parseLength constraints.lugWidth) fields , ( parseLongPiece fields , parseShortPiece fields , parseProfile fields
-
@@ -402,22 +383,18 @@ ), parseRendering fields ) of ( ( Ok lugWidth, Ok lining, Ok thickness ), ( Ok longPiece, Ok shortPiece, Ok profile ), Ok rendering ) -> ( Ok lugWidth, ( Ok longPiece, Ok shortPiece, Ok profile ), Ok rendering ) -> Ok { lugWidth = lugWidth , lining = lining , thickness = thickness , longPiece = longPiece , shortPiece = shortPiece , rendering = rendering , profile = profile } ( ( lugWidth, lining, thickness ), ( longPiece, shortPiece, profile ), rendering ) -> ( lugWidth, ( longPiece, shortPiece, profile ), rendering ) -> [ mkErrors [ ( LugWidth, getError lugWidth ) , ( LiningThickness, getError lining ) , ( SurfaceThickness, getError thickness ) ] , getError longPiece |> Maybe.withDefault Dict.empty , getError shortPiece |> Maybe.withDefault Dict.empty
-
-
-
@@ -421,10 +421,11 @@ , textAnchor "middle", dominantBaseline "hanging" , fill "currentColor" ] [ text ("Loops / t = " ++ (toMM root.thickness |> String.fromFloat) ++ "mm") ] [ text "Loops" ] ) , columns |> gapped (toMM params.rendering.gap) |> aligned Container.Center |> Container.build ([ fixedLoop params highlighting , freeLoop params highlighting
-
@@ -438,19 +439,9 @@fixedLoop : Parameters -> Maybe Key -> Maybe (Item msg) fixedLoop params highlighting = Maybe.map (\{ width, play } -> let strapThickness = toMM params.thickness + toMM params.lining lugWidth = toMM params.lugWidth length = lugWidth * 2 + strapThickness * 2 + toMM play in (\{ width, length } -> { size = { width = Exactly length { width = Exactly (toMM length) , height = Exactly (case params.shortPiece.loops.style of
-
@@ -463,132 +454,48 @@ )} , element = \p size -> let hCutLine : Float -> Svg msg hCutLine yOffset = g [ fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) ] [ Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y + yOffset ) , HorizontalLineTo Relative lugWidth ] , highlightStroke (highlighting == Just LugWidth) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + lugWidth, p.y + yOffset ) , HorizontalLineTo Relative strapThickness ] , highlightStroke (highlighting == Just SurfaceThickness || highlighting == Just LiningThickness) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + lugWidth + strapThickness, p.y + yOffset ) , HorizontalLineTo Relative lugWidth ] , highlightStroke (highlighting == Just LugWidth) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + lugWidth * 2 + strapThickness, p.y + yOffset ) , HorizontalLineTo Relative strapThickness ] , highlightStroke (highlighting == Just SurfaceThickness || highlighting == Just LiningThickness) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + lugWidth * 2 + strapThickness * 2, p.y + yOffset ) , HorizontalLineTo Relative (toMM play) ] , highlightStroke (highlighting == Just FixedLoopPlay) ] [] ] in g [] [ hCutLine 0 , hCutLine size.height [ Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y ) , HorizontalLineTo Relative size.width , VerticalLineTo Relative size.height , HorizontalLineTo Relative -size.width , ClosePath ] , fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , highlightStroke (highlighting == Just FixedLoopWidth || highlighting == Just FixedLoopLength) ] [] , case params.shortPiece.loops.style of Simple -> g [] [] Folded -> g [ fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , strokeDasharray "1 0.5" ] [ Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y ) , VerticalLineTo Relative (toMM width) [ MoveTo Absolute ( p.x, p.y + toMM width / 2 ) , HorizontalLineTo Relative size.width ] , highlightStroke (highlighting == Just FixedLoopWidth) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + length, p.y ) , VerticalLineTo Relative (toMM width) [ MoveTo Absolute ( p.x, p.y + toMM width * 1.5 ) , HorizontalLineTo Relative size.width ] , highlightStroke (highlighting == Just FixedLoopWidth) ] [] ] Folded -> g [] [ g [ fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , strokeDasharray "1 0.5" ] [ Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y + toMM width / 2 ) , HorizontalLineTo Relative length ] ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y + toMM width * 1.5 ) , HorizontalLineTo Relative length ] ] [] ] , g [ fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) ] [ Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y ) , VerticalLineTo Relative (toMM width * 2) ] , highlightStroke (highlighting == Just FixedLoopWidth) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + length, p.y ) , VerticalLineTo Relative (toMM width * 2) ] , highlightStroke (highlighting == Just FixedLoopWidth) ] [] ] ] ] } )
-
@@ -598,173 +505,90 @@freeLoop : Parameters -> Maybe Key -> Maybe (Item msg) freeLoop params highlighting = Maybe.map (\{ width, play, overlap } -> let strapThickness = toMM params.thickness + toMM params.lining lugWidth = toMM params.lugWidth length = lugWidth * 2 + strapThickness * 2 + toMM play + toMM overlap materialWidth = case params.shortPiece.loops.style of Simple -> toMM width Folded -> toMM width * 2 in (\{ width, length, overlap } -> { size = { width = Exactly length, height = Exactly materialWidth } { width = Exactly (toMM length + toMM overlap) , height = Exactly (case params.shortPiece.loops.style of Simple -> toMM width Folded -> toMM width * 2 ) } , element = \p _ -> let hCutLine : Float -> Svg msg hCutLine yOffset = g [ fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) ] [ Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y + yOffset ) , HorizontalLineTo Relative lugWidth ] , highlightStroke (highlighting == Just LugWidth) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + lugWidth, p.y + yOffset ) , HorizontalLineTo Relative strapThickness ] , highlightStroke (highlighting == Just SurfaceThickness || highlighting == Just LiningThickness) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + lugWidth + strapThickness, p.y + yOffset ) , HorizontalLineTo Relative lugWidth ] , highlightStroke (highlighting == Just LugWidth) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + lugWidth * 2 + strapThickness, p.y + yOffset ) , HorizontalLineTo Relative strapThickness ] , highlightStroke (highlighting == Just SurfaceThickness || highlighting == Just LiningThickness) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + lugWidth * 2 + strapThickness * 2, p.y + yOffset ) , HorizontalLineTo Relative (toMM play) ] , highlightStroke (highlighting == Just FreeLoopPlay) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + lugWidth * 2 + strapThickness * 2 + toMM play, p.y + yOffset ) , HorizontalLineTo Relative (toMM overlap) ] , highlightStroke (highlighting == Just FreeLoopOverlap) ] [] ] in \p size -> g [] [ hCutLine 0 , hCutLine materialWidth , Svg.path [ Svg.path [ Path.d [ MoveTo Absolute ( p.x + length - toMM overlap, p.y ) , VerticalLineTo Relative materialWidth [ MoveTo Absolute ( p.x, p.y ) , HorizontalLineTo Relative size.width , VerticalLineTo Relative size.height , HorizontalLineTo Relative -size.width , ClosePath ] , fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , strokeDasharray "1 0.5" , highlightStroke (highlighting == Just FreeLoopWidth || highlighting == Just FreeLoopLength || highlighting == Just FreeLoopOverlap ) ] [] , g [ fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , strokeDasharray "1 0.5" ] [ Svg.path [ Path.d [ MoveTo Absolute ( p.x + toMM overlap, p.y ) , VerticalLineTo Relative size.height ] ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + size.width - toMM overlap, p.y ) , VerticalLineTo Relative size.height ] ] [] ] , case params.shortPiece.loops.style of Simple -> g [] [] Folded -> g [ fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , strokeDasharray "1 0.5" ] [ Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y ) , VerticalLineTo Relative (toMM width) [ MoveTo Absolute ( p.x, p.y + toMM width / 2 ) , HorizontalLineTo Relative size.width ] , highlightStroke (highlighting == Just FreeLoopWidth) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + length, p.y ) , VerticalLineTo Relative (toMM width) [ MoveTo Absolute ( p.x, p.y + toMM width * 1.5 ) , HorizontalLineTo Relative size.width ] , highlightStroke (highlighting == Just FreeLoopWidth) ] [] ] Folded -> g [] [ g [ fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) , strokeDasharray "1 0.5" ] [ Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y + toMM width / 2 ) , HorizontalLineTo Relative length ] ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y + toMM width * 1.5 ) , HorizontalLineTo Relative length ] ] [] ] , g [ fill "none" , stroke "currentColor" , strokeWidth (toMM params.rendering.lineWidth |> String.fromFloat) ] [ Svg.path [ Path.d [ MoveTo Absolute ( p.x, p.y ) , VerticalLineTo Relative (toMM width * 2) ] , highlightStroke (highlighting == Just FreeLoopWidth) ] [] , Svg.path [ Path.d [ MoveTo Absolute ( p.x + length, p.y ) , VerticalLineTo Relative (toMM width * 2) ] , highlightStroke (highlighting == Just FreeLoopWidth) ] [] ] ] ] }
-