Skip to content

Commit 01565e1

Browse files
committed
recover again
1 parent eafe81e commit 01565e1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Distance.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ function distanceToIn(shape, point, dir)
2020
elseif shape isa BooleanIntersection
2121
distanceToIn_booleanintersection(shape, point, dir)
2222
elseif shape isa PlacedVolume
23-
distanceToIn_placedvolume(shape, point, dir)
23+
xf = shape.transformation
24+
distanceToIn_placedvolume(shape.volume.shape, xf*point, xf*dir)
2425
end
2526
end
2627
function distanceToOut(shape, point, dir)

src/DistanceIn.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
function distanceToIn_placedvolume(pvol::PlacedVolume{T}, p::Point3{T}, d::Vector3{T})::T where T<:AbstractFloat
2-
distanceToIn(pvol.volume.shape, pvol.transformation * p, pvol.transformation * d)
1+
function distanceToIn_placedvolume(pvol, p::Point3{T}, d::Vector3{T})::T where T<:AbstractFloat
2+
distanceToIn(pvol, p, d)
33
end
44
## Boolean
55
function distanceToIn_booleanunion(shape::BooleanUnion{T, SL, SR}, point::Point3{T}, dir::Vector3{T})::T where {T,SL,SR}

0 commit comments

Comments
 (0)