Skip to content

Commit eafe81e

Browse files
committed
bad case
1 parent 4399af8 commit eafe81e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/Distance.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ function distanceToIn(shape, point, dir)
1919
distanceToIn_booleansubtraction(shape, point, dir)
2020
elseif shape isa BooleanIntersection
2121
distanceToIn_booleanintersection(shape, point, dir)
22+
elseif shape isa PlacedVolume
23+
distanceToIn_placedvolume(shape, point, dir)
2224
end
2325
end
2426
function distanceToOut(shape, point, dir)

src/DistanceIn.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
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)
3+
end
14
## Boolean
25
function distanceToIn_booleanunion(shape::BooleanUnion{T, SL, SR}, point::Point3{T}, dir::Vector3{T})::T where {T,SL,SR}
36
(; left, right, transformation) = shape

src/Volume.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ end
6464
function contains(vol::Volume{T}, p::Point3{T})::Bool where T<:AbstractFloat
6565
inside(vol.shape, p) == kInside
6666
end
67-
function distanceToIn(pvol::PlacedVolume{T}, p::Point3{T}, d::Vector3{T})::T where T<:AbstractFloat
68-
distanceToIn(pvol.volume.shape, pvol.transformation * p, pvol.transformation * d)
69-
end
7067

7168

7269
function placeDaughter!(volume::Volume{T}, placement::Transformation3D{T}, subvol::Volume{T}) where T<:AbstractFloat

0 commit comments

Comments
 (0)