Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ version = "0.5.10"

[deps]
EarCut_jll = "5ae413db-bbd1-5e63-b57d-d24a61df00f5"
Extents = "411431e0-e8b7-467b-b5e0-f676ba4f2910"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[weakdeps]
Extents = "411431e0-e8b7-467b-b5e0-f676ba4f2910"
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"

[extensions]
ExtentsExt = "Extents"
GeometryBasicsGeoInterfaceExt = "GeoInterface"

[compat]
Expand All @@ -24,7 +24,6 @@ EarCut_jll = "2"
Extents = "0.1"
GeoInterface = "1.0.1"
GeoJSON = "0.7, 0.8"
IterTools = "1.3.0"
LinearAlgebra = "<0.0.1,1"
OffsetArrays = "1"
PrecompileTools = "1.0"
Expand All @@ -35,11 +34,12 @@ julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Extents = "411431e0-e8b7-467b-b5e0-f676ba4f2910"
GeoJSON = "61d90e0f-e114-555e-ac52-39dfb47a3ef9"
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "GeoInterface", "GeoJSON", "OffsetArrays", "Random", "Test"]
test = ["Aqua", "Extents", "GeoInterface", "GeoJSON", "OffsetArrays", "Random", "Test"]
16 changes: 16 additions & 0 deletions ext/ExtentsExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module ExtentsExt

import GeometryBasics
import Extents

function Extents.extent(rect::GeometryBasics.Rect2)
(xmin, ymin), (xmax, ymax) = extrema(rect)
return Extents.Extent(X=(xmin, xmax), Y=(ymin, ymax))
end

function Extents.extent(rect::GeometryBasics.Rect3)
(xmin, ymin, zmin), (xmax, ymax, zmax) = extrema(rect)
return Extents.Extent(X=(xmin, xmax), Y=(ymin, ymax), Z=(zmin, zmax))
end

end
3 changes: 1 addition & 2 deletions src/GeometryBasics.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module GeometryBasics

using IterTools, LinearAlgebra, StaticArrays
import Extents
using LinearAlgebra, StaticArrays
using EarCut_jll
import Base: *

Expand Down
9 changes: 0 additions & 9 deletions src/primitives/rectangles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,3 @@ function faces(::Rect3)
(3, 4, 8, 7), (1, 3, 7, 5), (6, 8, 4, 2)
]
end

function Extents.extent(rect::Rect2)
(xmin, ymin), (xmax, ymax) = extrema(rect)
return Extents.Extent(X=(xmin, xmax), Y=(ymin, ymax))
end
function Extents.extent(rect::Rect3)
(xmin, ymin, zmin), (xmax, ymax, zmax) = extrema(rect)
return Extents.Extent(X=(xmin, xmax), Y=(ymin, ymax), Z=(zmin, zmax))
end
2 changes: 1 addition & 1 deletion src/primitives/spheres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ end

function texturecoordinates(::Sphere, nvertices=24)
ux = LinRange(0, 1, nvertices)
return ivec(((φ, θ) for θ in reverse(ux), φ in ux))
return ((φ, θ) for φ in ux for θ in reverse(ux))
end

function faces(::Sphere, nvertices=24)
Expand Down
Loading