Skip to content

Commit

Permalink
recover again
Browse files Browse the repository at this point in the history
  • Loading branch information
Moelf committed Sep 22, 2022
1 parent eafe81e commit 01565e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Distance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function distanceToIn(shape, point, dir)
elseif shape isa BooleanIntersection
distanceToIn_booleanintersection(shape, point, dir)
elseif shape isa PlacedVolume
distanceToIn_placedvolume(shape, point, dir)
xf = shape.transformation
distanceToIn_placedvolume(shape.volume.shape, xf*point, xf*dir)
end
end
function distanceToOut(shape, point, dir)
Expand Down
4 changes: 2 additions & 2 deletions src/DistanceIn.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function distanceToIn_placedvolume(pvol::PlacedVolume{T}, p::Point3{T}, d::Vector3{T})::T where T<:AbstractFloat
distanceToIn(pvol.volume.shape, pvol.transformation * p, pvol.transformation * d)
function distanceToIn_placedvolume(pvol, p::Point3{T}, d::Vector3{T})::T where T<:AbstractFloat
distanceToIn(pvol, p, d)
end
## Boolean
function distanceToIn_booleanunion(shape::BooleanUnion{T, SL, SR}, point::Point3{T}, dir::Vector3{T})::T where {T,SL,SR}
Expand Down

0 comments on commit 01565e1

Please sign in to comment.