If I put a SimpleMesh geometry into a GeometrySet, I get a StackOverflowError:
using Meshes
# test using primitive geometries
s1 = Meshes.Sphere((0, 0, 0), 1)
s2 = Meshes.Sphere((1, 1, 1), 1)
gs1 = GeometrySet([s1, s2]) # works fine
# test using Meshes
s3 = discretize(s1, RegularDiscretization(10, 10))
s4 = discretize(s2, RegularDiscretization(10, 10))
gs2 = GeometrySet([s3, s4]) # throws StackOverflowError
StackOverflowError:
Stacktrace:
[1] _stable_typeof
@ ./operators.jl:910 [inlined]
[2] Base.Fix2(f::typeof(isequal), x::Type)
@ Base ./operators.jl:1121
[3] isequal
@ ./operators.jl:1136 [inlined]
[4] allequal
@ ./set.jl:533 [inlined]
[5] GeometrySet(geoms::Vector{SimpleMesh{๐ผ{3}, Cartesian3D{NoDatum, Quantity{Float64, ๐, Unitful.FreeUnits{(m,), ๐, nothing}}}, Vector{Meshes.Point{๐ผ{3}, Cartesian3D{NoDatum, Quantity{Float64, ๐, Unitful.FreeUnits{(m,), ๐, nothing}}}}}, SimpleTopology{Connectivity}}})
@ Meshes ~/.julia/packages/Meshes/fFipW/src/domains/sets.jl:29
[6] GeometrySet(geoms::Vector{SimpleMesh{๐ผ{3}, Cartesian3D{NoDatum, Quantity{Float64, ๐, Unitful.FreeUnits{(m,), ๐, nothing}}}, Vector{Meshes.Point{๐ผ{3}, Cartesian3D{NoDatum, Quantity{Float64, ๐, Unitful.FreeUnits{(m,), ๐, nothing}}}}}, SimpleTopology{Connectivity}}}) (repeats 74533 times)
@ Meshes ~/.julia/packages/Meshes/fFipW/src/domains/sets.jl:35
[7] eval
@ ./boot.jl:370 [inlined]
[8] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1903
...
Thoughts, suggestions? Iโm new to Meshes.jl, so very possibly doing something stupid. I am headed in this direction (meshes in GeometrySets) because ultimately I want to save multiple geometries into an OBJ or PLY file and it seems like using a geotable and GeoIO would be a convenient way to do that.
Many thanks!
Iโm using Julia 1.9.2 and Meshes.jl 0.51.19