diff --git a/README.md b/README.md index a0ca52b..004069d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # TapeMeasure +[](image.png) [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://co1emi11er2.github.io/TapeMeasure.jl/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://co1emi11er2.github.io/TapeMeasure.jl/dev/) diff --git a/assets/tape_measure_large_logo.svg b/assets/tape_measure_large_logo.svg new file mode 100644 index 0000000..c85d66b --- /dev/null +++ b/assets/tape_measure_large_logo.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + TapeMeasure + .JL + A Dimensioning Tool for Julia + + + diff --git a/docs/Project.toml b/docs/Project.toml index c6544b4..19951ac 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,7 @@ [deps] -TapeMeasure = "80345c00-9166-4d3e-8c72-003f651600ad" +CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589" +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +TapeMeasure = "80345c00-9166-4d3e-8c72-003f651600ad" +Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" diff --git a/docs/make.jl b/docs/make.jl index b89f933..2ae4463 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -14,6 +14,10 @@ makedocs(; ), pages=[ "Home" => "index.md", + "Details" => "details.md", + "Working with Plots.jl" => "plots.md", + "Working with Makie" => "makie.md", + "Reference" => "reference.md", ], ) diff --git a/docs/src/details.md b/docs/src/details.md new file mode 100644 index 0000000..e4f3ac6 --- /dev/null +++ b/docs/src/details.md @@ -0,0 +1,90 @@ +# Details + +The goal of this package is to be able to get measurements for objects (geometric shapes) as well as plot dimensions. Currently, objects are defined differently depending on the package. Plots, for instance, takes objects in the form of two separate x and y vectors, while Makie uses `Polygon` objects. The Meshes.jl package uses `Ngon` objects. Makie `Polygon` objects currently do not support unitful, so still debating on the best approach there. + +The short term goals are: + - Feature parity with both Makie.jl and Plots.jl + - Sensible API for the package + - Meshes.jl integration + - Measurements for radius or diameter of a circle + - Angle Measurements + +## Current Capabilities +There are two main use cases for TapeMeasure currently. One use case is for objects and the other is for a single object. The term object here is specifically for a set of points that define a polygon. + +### Multiple Objects +When dealing with a set of objects, there are two main functions currently. +- [`h_dimension`](@ref h_dimension) (may be renamed to `h_dim`) +- [`v_dimension`](@ref v_dimension) (may be renamed to `v_dim`) + +These functions will calculate the middle of the each object. This is trivial currently. It is just finding the middle point of the xs and ys of each object (using the `middle` function from the Statistics package), and then it determines either the horizontal or vertical spacing between the middles of each object. The function will then return a `TopDimensions` or `BottomDimensions` object or a `LeftDimensions` or `RightDimensions` object that can then be plotted in Plots.jl and Makie.jl. The user can provide an keyword `offset` value to the functions to change the location of where the dimension will be plotted. + +```@setup plots +using TapeMeasure +using Plots +using Unitful + +const ft = u"ft" + +# Define a few objects consisting of x and y coordinates + x = [ + [2.5ft, 2.5ft, 3.7083333329999997ft, 3.7083333329999997ft, 2.666666667ft, 2.666666667ft, 5.333333333000001ft, 5.333333333000001ft, 4.291666667ft, 4.291666667ft, 5.5ft, 5.5ft, 2.5ft], + [10.5ft, 10.5ft, 11.708333333ft, 11.708333333ft, 10.666666667ft, 10.666666667ft, 13.333333333ft, 13.333333333ft, 12.291666667ft, 12.291666667ft, 13.5ft, 13.5ft, 10.5ft], + [18.5ft, 18.5ft, 19.708333333ft, 19.708333333ft, 18.666666667ft, 18.666666667ft, 21.333333333ft, 21.333333333ft, 20.291666667ft, 20.291666667ft, 21.5ft, 21.5ft, 18.5ft], + [26.5ft, 26.5ft, 27.708333333ft, 27.708333333ft, 26.666666667ft, 26.666666667ft, 29.333333333ft, 29.333333333ft, 28.291666667ft, 28.291666667ft, 29.5ft, 29.5ft, 26.5ft], + [34.5ft, 34.5ft, 35.708333333ft, 35.708333333ft, 34.666666667ft, 34.666666667ft, 37.333333333ft, 37.333333333ft, 36.291666667ft, 36.291666667ft, 37.5ft, 37.5ft, 34.5ft] + ] + +y = [ + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft] +] +``` + +*Continuing the example from the Home page* +```@example plots +# lets add some vertical spacing between each object as well +for (i, ys) in enumerate(y) + y[i] = ys .+ (5*i)*ft +end + +dims = h_dimension(x, y, offset=3ft) + +plot(x, y, seriestype=:shape, color=:lightgrey, legend=false, aspectratio=1) +plot!(dims) +``` +```@example plots +dims = v_dimension(x, y, offset=-3ft) + +plot(x, y, seriestype=:shape, color=:lightgrey, legend=false, aspectratio=1) +plot!(dims) +``` + +### Single Object +When dealing with a single object, there are four main functions currently. +- [`dim_top`](@ref dim_top) +- [`dim_bottom`](@ref dim_bottom) +- [`dim_left`](@ref dim_left) +- [`dim_right`](@ref dim_right) + +These functions attempt to calculate the dimensions of the respective side of the object. These functions are really for rectangular/symetric type objects. The current implementation is limited. The user can provide an keyword `offset` value to the functions to change the location of where the dimension will be plotted. See example below. + +```@example plots +top = dim_top(x[1], y[1], offset=1ft) +bottom = dim_bottom(x[1], y[1]) +left = dim_left(x[1], y[1]) +right = dim_right(x[1], y[1]) + +plot(x[1], y[1], seriestype=:shape, color=:lightgrey, legend=false, aspectratio=1) +plot!(top) +plot!(bottom) +plot!(left) +plot!(right) +``` + +You can see from the plot that the bottom dimension is finding the dimension of the max overall width and not the relative width at the bottom. + + diff --git a/docs/src/index.md b/docs/src/index.md index 2547faa..69d83ee 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -2,13 +2,106 @@ CurrentModule = TapeMeasure ``` -# TapeMeasure +# TapeMeasure.jl -Documentation for [TapeMeasure](https://github.com/co1emi11er2/TapeMeasure.jl). +[](image.png) -```@index +TapeMeasure.jl is a Julia package for handling physical dimensions and units in scientific computing. It provides a robust framework for defining, converting, and manipulating dimensions. + +## Installation + +To install TapeMeasure.jl, use the Julia package manager: + +```julia +using Pkg +Pkg.add("TapeMeasure") ``` -```@autodocs -Modules = [TapeMeasure] +## Basic Usage + +Here's a basic example of how to use TapeMeasure.jl: + +```@example plots +using TapeMeasure +using Plots +using Unitful + +const ft = u"ft" + +# Define a few objects consisting of x and y coordinates + x = [ + [2.5ft, 2.5ft, 3.7083333329999997ft, 3.7083333329999997ft, 2.666666667ft, 2.666666667ft, 5.333333333000001ft, 5.333333333000001ft, 4.291666667ft, 4.291666667ft, 5.5ft, 5.5ft, 2.5ft], + [10.5ft, 10.5ft, 11.708333333ft, 11.708333333ft, 10.666666667ft, 10.666666667ft, 13.333333333ft, 13.333333333ft, 12.291666667ft, 12.291666667ft, 13.5ft, 13.5ft, 10.5ft], + [18.5ft, 18.5ft, 19.708333333ft, 19.708333333ft, 18.666666667ft, 18.666666667ft, 21.333333333ft, 21.333333333ft, 20.291666667ft, 20.291666667ft, 21.5ft, 21.5ft, 18.5ft], + [26.5ft, 26.5ft, 27.708333333ft, 27.708333333ft, 26.666666667ft, 26.666666667ft, 29.333333333ft, 29.333333333ft, 28.291666667ft, 28.291666667ft, 29.5ft, 29.5ft, 26.5ft], + [34.5ft, 34.5ft, 35.708333333ft, 35.708333333ft, 34.666666667ft, 34.666666667ft, 37.333333333ft, 37.333333333ft, 36.291666667ft, 36.291666667ft, 37.5ft, 37.5ft, 34.5ft] + ] + +y = [ + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft] +] + +dims = h_dimension(x, y) + +plot(x, y, seriestype=:shape, color=:lightgrey, legend=false, aspectratio=1) +plot!(dims) +``` + +*Can work similarly with Makie* + +```@example makie +using TapeMeasure +using CairoMakie +using Unitful + +const ft = u"ft" +uc = Makie.UnitfulConversion(ft) + +# Define a few objects consisting of x and y coordinates + x = [ + [2.5ft, 2.5ft, 3.7083333329999997ft, 3.7083333329999997ft, 2.666666667ft, 2.666666667ft, 5.333333333000001ft, 5.333333333000001ft, 4.291666667ft, 4.291666667ft, 5.5ft, 5.5ft, 2.5ft], + [10.5ft, 10.5ft, 11.708333333ft, 11.708333333ft, 10.666666667ft, 10.666666667ft, 13.333333333ft, 13.333333333ft, 12.291666667ft, 12.291666667ft, 13.5ft, 13.5ft, 10.5ft], + [18.5ft, 18.5ft, 19.708333333ft, 19.708333333ft, 18.666666667ft, 18.666666667ft, 21.333333333ft, 21.333333333ft, 20.291666667ft, 20.291666667ft, 21.5ft, 21.5ft, 18.5ft], + [26.5ft, 26.5ft, 27.708333333ft, 27.708333333ft, 26.666666667ft, 26.666666667ft, 29.333333333ft, 29.333333333ft, 28.291666667ft, 28.291666667ft, 29.5ft, 29.5ft, 26.5ft], + [34.5ft, 34.5ft, 35.708333333ft, 35.708333333ft, 34.666666667ft, 34.666666667ft, 37.333333333ft, 37.333333333ft, 36.291666667ft, 36.291666667ft, 37.5ft, 37.5ft, 34.5ft] + ] + +y = [ + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft] +] + +dims = h_dimension(x, y) + +f = Figure() +ax = Axis(f[1,1], autolimitaspect=1, dim1_conversion=uc, dim2_conversion=uc) +lines!.(ax, x, y, color=:lightgrey) +plot!(ax, dims) +f ``` + +## Features + +- Makes dimensioning easy +- Works with Unitful +- Dimensional consistency checks +- Hope to integrate with Meshes ecosystem + +## Contributing + +Contributions are welcome! Please open an issue or submit a pull request on GitHub. + +## License + +This project is licensed under the MIT License. + +## Acknowledgements + +Thanks to the Julia community and the amazing Plots and Makie packages. diff --git a/docs/src/makie.md b/docs/src/makie.md new file mode 100644 index 0000000..d8aa268 --- /dev/null +++ b/docs/src/makie.md @@ -0,0 +1,65 @@ +# Working with Makie.jl + +TapeMeasure.jl provides an extension that loads when the user calls `using Makie`, `using CairoMakie`, or other makie package in their code. + +## Changing Plot Settings: + +You can change the plot settings using the following keyword arguments. + +### Settings + +- `color::Symbol` - changes the color of the dimension lines as well as the labels +- `with_mask::Bool` - the label will not "mask" over the dimension line +- `linewidth` - the line width of the dimension lines +- `fontsize` - the size of the label font +- `rotation` - radians of rotation for the label + +The keywords are a bit different from Plots.jl in order to be more consistent with Makie ecosystem, but that may change if it is an issue for users. See below for examples: + +## Examples +```@setup plots +using TapeMeasure +using CairoMakie +using Unitful + +const ft = u"ft" + +# Define a few objects consisting of x and y coordinates + x = [ + [2.5ft, 2.5ft, 3.7083333329999997ft, 3.7083333329999997ft, 2.666666667ft, 2.666666667ft, 5.333333333000001ft, 5.333333333000001ft, 4.291666667ft, 4.291666667ft, 5.5ft, 5.5ft, 2.5ft], + [10.5ft, 10.5ft, 11.708333333ft, 11.708333333ft, 10.666666667ft, 10.666666667ft, 13.333333333ft, 13.333333333ft, 12.291666667ft, 12.291666667ft, 13.5ft, 13.5ft, 10.5ft], + [18.5ft, 18.5ft, 19.708333333ft, 19.708333333ft, 18.666666667ft, 18.666666667ft, 21.333333333ft, 21.333333333ft, 20.291666667ft, 20.291666667ft, 21.5ft, 21.5ft, 18.5ft], + [26.5ft, 26.5ft, 27.708333333ft, 27.708333333ft, 26.666666667ft, 26.666666667ft, 29.333333333ft, 29.333333333ft, 28.291666667ft, 28.291666667ft, 29.5ft, 29.5ft, 26.5ft], + [34.5ft, 34.5ft, 35.708333333ft, 35.708333333ft, 34.666666667ft, 34.666666667ft, 37.333333333ft, 37.333333333ft, 36.291666667ft, 36.291666667ft, 37.5ft, 37.5ft, 34.5ft] + ] + +y = [ + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft] +] + +uc = Makie.UnitfulConversion(ft) +``` + +```@example plots +dims = h_dimension(x, y) + +f = Figure() +ax = Axis(f[1,1], autolimitaspect=1, dim1_conversion=uc, dim2_conversion=uc) +lines!.(ax, x, y, color=:lightgrey) +plot!(ax, dims, color=:blue, with_mask=false, fontsize = 10) +f +``` + +```@example plots +dims = v_dimension(y, x) + +f = Figure() +ax = Axis(f[1,1], autolimitaspect=1, dim1_conversion=uc, dim2_conversion=uc) +lines!.(ax, y, x, color=:lightgrey) +plot!(ax, dims, rotation = 0) +f +``` \ No newline at end of file diff --git a/docs/src/plots.md b/docs/src/plots.md new file mode 100644 index 0000000..6268af8 --- /dev/null +++ b/docs/src/plots.md @@ -0,0 +1,56 @@ +# Working with Plots.jl + +TapeMeasure.jl provides an extension that loads when the user calls `using Plots` in their code. + +## Changing Plot Settings: + +You can change the plot settings using the following keyword arguments. + +### Settings + +- `dim_color::Symbol` - changes the color of the dimension lines as well as the labels +- `with_mask::Bool` - the label will not "mask" over the dimension line +- `font_size` - changes the size of the label font +- `text_rotation` - degree of rotation for the label + +See below for examples: + +## Examples +```@setup plots +using TapeMeasure +using Plots +using Unitful + +const ft = u"ft" + +# Define a few objects consisting of x and y coordinates + x = [ + [2.5ft, 2.5ft, 3.7083333329999997ft, 3.7083333329999997ft, 2.666666667ft, 2.666666667ft, 5.333333333000001ft, 5.333333333000001ft, 4.291666667ft, 4.291666667ft, 5.5ft, 5.5ft, 2.5ft], + [10.5ft, 10.5ft, 11.708333333ft, 11.708333333ft, 10.666666667ft, 10.666666667ft, 13.333333333ft, 13.333333333ft, 12.291666667ft, 12.291666667ft, 13.5ft, 13.5ft, 10.5ft], + [18.5ft, 18.5ft, 19.708333333ft, 19.708333333ft, 18.666666667ft, 18.666666667ft, 21.333333333ft, 21.333333333ft, 20.291666667ft, 20.291666667ft, 21.5ft, 21.5ft, 18.5ft], + [26.5ft, 26.5ft, 27.708333333ft, 27.708333333ft, 26.666666667ft, 26.666666667ft, 29.333333333ft, 29.333333333ft, 28.291666667ft, 28.291666667ft, 29.5ft, 29.5ft, 26.5ft], + [34.5ft, 34.5ft, 35.708333333ft, 35.708333333ft, 34.666666667ft, 34.666666667ft, 37.333333333ft, 37.333333333ft, 36.291666667ft, 36.291666667ft, 37.5ft, 37.5ft, 34.5ft] + ] + +y = [ + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft], + [-0.25ft, -0.541666667ft, -0.875ft, -3.375ft, -4.020833333000001ft, -4.75ft, -4.75ft, -4.020833333000001ft, -3.375ft, -0.875ft, -0.541666667ft, -0.25ft, -0.25ft] +] +``` + +```@example plots +dims = h_dimension(x, y) + +plot(x, y, seriestype=:shape, color=:lightgrey, legend=false, aspectratio=1) +plot!(dims, dim_color=:blue, with_mask=false, font_size=8) +``` + +```@example plots +dims = v_dimension(y, x) + +plot(y, x, seriestype=:shape, color=:lightgrey, legend=false, aspectratio=1) +plot!(dims, dim_color=:blue, text_rotation=0) +``` diff --git a/docs/src/reference.md b/docs/src/reference.md new file mode 100644 index 0000000..1300a5c --- /dev/null +++ b/docs/src/reference.md @@ -0,0 +1,8 @@ +## References + +```@index +``` + +```@autodocs +Modules = [TapeMeasure] +``` \ No newline at end of file diff --git a/src/Utils.jl b/src/Utils.jl index 7abce54..8a179d2 100644 --- a/src/Utils.jl +++ b/src/Utils.jl @@ -147,7 +147,7 @@ function _get_major_minor_lines(x_or_y_dims, y_or_x_mid, y_or_x_max::T) where T major_lines = zeros(T, length(y_or_x_mid)) for (i, y_or_x) in enumerate(y_or_x_mid) - major_line = abs(y_or_x_max - y_or_x)*0.9 + major_line = abs(y_or_x_max - y_or_x) major_line = major_line == zero(T) ? min_length : major_line major_lines[i] = major_line end diff --git a/test/BottomDimensions.jl b/test/BottomDimensions.jl index 3dfcb2c..157cab0 100644 --- a/test/BottomDimensions.jl +++ b/test/BottomDimensions.jl @@ -14,7 +14,7 @@ let # check with offset of 5ft ys .-= 5ft lbl_ys .-= 5ft - major_lines = [4.5ft for _ in xs] + major_lines = [5.0ft for _ in xs] expected = BottomDimensions(xs, ys, labels, minor_lines, major_lines) calc = h_dimension(multi_girders_xs_plot_format, multi_girders_ys_plot_format, offset=-5ft) test_dimension_fields(expected, calc) diff --git a/test/LeftDimensions.jl b/test/LeftDimensions.jl index cc44bab..9d38a50 100644 --- a/test/LeftDimensions.jl +++ b/test/LeftDimensions.jl @@ -20,7 +20,7 @@ let # check with offset of 5ft xs .-= 5ft lbl_xs .-= 5ft - major_lines = [4.5ft for _ in xs] + major_lines = [5.0ft for _ in xs] expected = LeftDimensions(xs, ys, labels, minor_lines, major_lines) calc = v_dimension(multi_girders_ys_plot_format, multi_girders_xs_plot_format, offset=-5ft) test_dimension_fields(expected, calc) diff --git a/test/RightDimensions.jl b/test/RightDimensions.jl index 1265dd0..2092eba 100644 --- a/test/RightDimensions.jl +++ b/test/RightDimensions.jl @@ -20,7 +20,7 @@ let # check with offset of 5ft xs .+= 5ft lbl_xs .+= 5ft - major_lines = [4.5ft for _ in xs] + major_lines = [5.0ft for _ in xs] expected = RightDimensions(xs, ys, labels, minor_lines, major_lines) calc = v_dimension(multi_girders_ys_plot_format, multi_girders_xs_plot_format, offset=5ft) test_dimension_fields(expected, calc) diff --git a/test/TopDimensions.jl b/test/TopDimensions.jl index 19b284e..55f2a6d 100644 --- a/test/TopDimensions.jl +++ b/test/TopDimensions.jl @@ -19,7 +19,7 @@ let # check with offset of 5ft ys .+= 5ft lbl_ys .+= 5ft - major_lines = [4.5ft for _ in xs] + major_lines = [5.0ft for _ in xs] expected = TopDimensions(xs, ys, labels, minor_lines, major_lines) calc = h_dimension(multi_girders_xs_plot_format, multi_girders_ys_plot_format, offset=5ft) test_dimension_fields(expected, calc)