Mercurial > repos > public > sbplib_julia
diff src/Grids/geometry.jl @ 2056:00b274a118e0 feature/grids/geometry_functions tip
Add review comments
| author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
|---|---|
| date | Thu, 12 Feb 2026 14:04:22 +0100 |
| parents | 6478c29effce |
| children |
line wrap: on
line diff
--- a/src/Grids/geometry.jl Sat Feb 07 22:52:17 2026 +0100 +++ b/src/Grids/geometry.jl Thu Feb 12 14:04:22 2026 +0100 @@ -5,6 +5,11 @@ Line{PT}(p::PT, tangent::PT) where PT = new{PT}(p,tangent) end + +# REVIEW: +# 1. Explain the parametrization, i.e., l(1) = p + s*t +# 2. Now, if p and t are ints, l(1) returns an int +# while l(0.5) returns a float. Is this intended/desirable? """ Line(p,t) @@ -47,6 +52,13 @@ LineSegment{PT}(p::PT, tangent::PT) where PT = new{PT}(p,tangent) end + +# REVIEW: +# 1. Explain the parametrization. +# 2. Now, if a and b are ints, l(1) returns an int +# while l(0.5) returns a float. Is this intended/desirable? +# 3. Do we want s in [0, 1]? Currently the line segment +# can return values "outside" of the interval [a,b]. """ LineSegment(a,b) @@ -87,6 +99,7 @@ Grids.jacobian(c::LineSegment, s) = c.b - c.a + """ linesegments(ps...) @@ -112,6 +125,7 @@ return [LineSegment(ps[i], ps[mod1(i+1,n)]) for i ∈ eachindex(ps)] end + struct Circle{PT,T} c::PT r::T @@ -155,6 +169,7 @@ r*@SVector[-sin(θ), cos(θ)] end + struct Arc{PT,T} c::Circle{PT,T} θ₀::T @@ -224,6 +239,9 @@ return Arc(Circle(c,abs(r)), θₐ, θₐ+Δθ) end +# REVIEW: +# 1. Explain parametrisation +# 2. Boundscheck for the parametrisation argumetns, i.e. within [0,1]? """ TransfiniteInterpolationSurface(c₁, c₂, c₃, c₄)
