def test_stl_write_comparison(self):
stl_handler = sh.StlHandler()
mesh_points = stl_handler.parse('tests/test_datasets/test_sphere.stl')
mesh_points[0] = [-40.2, -20.5, 60.9]
mesh_points[1] = [-40.2, -10.5, 60.9]
mesh_points[2] = [-40.2, -10.5, 60.9]
mesh_points[500] = [-40.2, -20.5, 60.9]
mesh_points[501] = [-40.2, -10.5, 60.9]
mesh_points[502] = [-40.2, -10.5, 60.9]
mesh_points[1000] = [-40.2, -20.5, 60.9]
mesh_points[1001] = [-40.2, -10.5, 60.9]
mesh_points[1002] = [-40.2, -10.5, 60.9]
outfilename = 'tests/test_datasets/test_sphere_out.stl'
outfilename_expected = 'tests/test_datasets/test_sphere_out_true.stl'
stl_handler.write(mesh_points, outfilename)
self.assertTrue(filecmp.cmp(outfilename, outfilename_expected))
self.addCleanup(os.remove, outfilename)
评论列表
文章目录