Skip to content

Commit d7573a1

Browse files
committed
Add test for get_physical_group_bounding_box
1 parent 30f1415 commit d7573a1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/test_solidmodel.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ import DeviceLayout.SolidModels.STP_UNIT
999999
sm = test_sm()
10001000
render!(sm, cs) # runs without error
10011001

1002-
# Use get_boundary and set_periodic!
1002+
# Use get_boundary, get_physical_group_bounding_box, and set_periodic!
10031003
cs = CoordinateSystem("test", nm)
10041004
place!(cs, centered(Rectangle(500μm, 100μm)), :l1)
10051005
postrender_ops = [("ext", SolidModels.extrude_z!, (:l1, 20μm))]
@@ -1021,6 +1021,13 @@ import DeviceLayout.SolidModels.STP_UNIT
10211021
"set_periodic! only supports distinct parallel axis-aligned surfaces."
10221022
) SolidModels.set_periodic!(sm, "Xmin", "Ymax")
10231023
)
1024+
@test all(
1025+
isapprox.(
1026+
SolidModels.get_physical_group_bounding_box(2, [3, 5]),
1027+
ustrip.(STP_UNIT, (-250μm, -50μm, 0μm, 250μm, 50μm, 20μm)),
1028+
atol=1e-6
1029+
)
1030+
)
10241031
periodic_tags = SolidModels.set_periodic!(sm["Xmin", 2], sm["Xmax", 2])
10251032
@test !isempty(periodic_tags)
10261033

0 commit comments

Comments
 (0)