Skip to content

Commit

Permalink
Pass Matrix to LazySets.VPolygon
Browse files Browse the repository at this point in the history
To be reverted when JuliaReach/LazySets.jl#3632 is merged.
  • Loading branch information
ederag committed Aug 7, 2024
1 parent 459a82b commit 6936fa5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/RepeatingStructures/LensletAssembly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ function beamenergy(assy::LensletAssembly{T}, displaypoint::AbstractVector{T}, p
lensverts3D = vcat(lensverts, temp)
beamlens = SphericalPolygon(lensverts3D, virtpoint, T(1))

projpoly = LazySets.VPolygon(projectedpoints)
lenspoly = LazySets.VPolygon(lensverts)
# build regular Matrix as a workaround until
# https://github.com/JuliaReach/LazySets.jl/pull/3632 is merged
projpoly = LazySets.VPolygon(Matrix(projectedpoints))
lenspoly = LazySets.VPolygon(Matrix(lensverts))
intsct = projpoly lenspoly # this could be slow, especially multithreaded, because it will allocate. Lazysets.vertices returns Vector{SVector}, rather than SMatrix or SVector{SVector}.

if isempty(intsct)
Expand Down

0 comments on commit 6936fa5

Please sign in to comment.