Skip to content

Commit 23d4371

Browse files
committed
Fixes for cylinder boundary.
1 parent 3d20cdd commit 23d4371

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

e3d/e3d_bv.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ inside(Point, {Center, DistSqr}) when is_number(DistSqr) ->
287287
inside(Point, {{CX,CY,CZ}=_Center, DistSqr, Height, Matrix})
288288
when is_number(DistSqr), is_number(Height) ->
289289
{X,Y,Z}=e3d_mat:mul_vector(Matrix,Point),
290-
(abs(Y - CY) < Height) andalso
290+
(abs(Y - CY) =< Height) andalso
291291
(e3d_vec:dist_sqr({CX,Y,CZ}, {X,Y,Z}) =< DistSqr).
292292

293293

plugins_src/commands/wpc_sel_absolute.erl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ sel_absolute_cyl_1(Args, #st{selmode=Mode}=St) ->
247247
end,
248248
Y=case proplists:get_value(yref, Args, center) of
249249
center -> Y_0;
250-
ground -> Y_0+(Height*0.5)
250+
ground when Axis0 =:= y -> Y_0+(Height*0.5);
251+
ground -> Y_0+Radius
251252
end,
252253
{BX1,BX2} = case Axis0 of
253254
x ->
@@ -259,7 +260,7 @@ sel_absolute_cyl_1(Args, #st{selmode=Mode}=St) ->
259260
y ->
260261
{Y-(Height*0.5), Y+(Height*0.5)};
261262
_ ->
262-
{Y-Radius,Y+Radius}
263+
{Y-Radius-1.0,Y+Radius}
263264
end,
264265
{BZ1,BZ2} = case Axis0 of
265266
z ->

0 commit comments

Comments
 (0)