File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
tests/compas/datastructures Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1281,3 +1281,26 @@ def test_face_attributes_includes_all_defaults(box):
12811281 ]
12821282
12831283 assert box .face_attribute (random_fkey , "attr3" ) == "value3"
1284+
1285+
1286+ # --------------------------------------------------------------------------
1287+ # bounding volumes
1288+ # --------------------------------------------------------------------------
1289+
1290+
1291+ def test_compute_aabb ():
1292+ mesh = Mesh .from_obj (compas .get ("tubemesh.obj" ))
1293+ aabb = mesh .compute_aabb ()
1294+
1295+ assert isinstance (aabb , Box )
1296+ assert len (aabb .points ) == 8
1297+ assert aabb .contains_points (mesh .to_points ())
1298+
1299+
1300+ def test_compute_obb ():
1301+ mesh = Mesh .from_obj (compas .get ("tubemesh.obj" ))
1302+ obb = mesh .compute_obb ()
1303+
1304+ assert isinstance (obb , Box )
1305+ assert len (obb .points ) == 8
1306+ assert obb .contains_points (mesh .to_points ())
You can’t perform that action at this time.
0 commit comments