def test_area(self): point1 = Point([0, 0, 0]) point2 = Point([0, 0, 2]) point3 = Point([0, 2, 0]) triangle = Triangle(point1, point2, point3) stl = Stl([triangle, triangle]) self.assertEquals(stl.get_area(), 4)
def test_does_not_contact_stl(self): stl = self.read_ascii('test/data/separate_triangles.stl') stl1 = Stl([stl[0]]) stl2 = Stl([stl[1]]) self.assertFalse(stl1.contacts_stl(stl2))