@@ -97,6 +97,7 @@ def create_DFMeshCube():
9797 df_mesh .load_from_PLY (get_ply_mesh_cube_path ())
9898 yield df_mesh
9999
100+ # point cloud tests
100101
101102def test_DFPointCloud_properties (create_DFPointCloudSampleRoof ):
102103 pc = create_DFPointCloudSampleRoof
@@ -119,6 +120,11 @@ def test_DFPointCloud_properties(create_DFPointCloudSampleRoof):
119120 assert pc .has_colors () == False , "has_colors() should return False"
120121 assert pc .has_normals () == False , "has_normals() should return False"
121122
123+ def test_DFPointCloud_add_points (create_two_DFPointCloudSphere ):
124+ sphere_1 , sphere_2 = create_two_DFPointCloudSphere
125+ sphere_1 .add_points (sphere_2 )
126+ assert sphere_1 .points .__len__ () == 10050 , "two pointclouds of 5025 pts combined into one should have 10050 pts"
127+
122128def test_DFPointCloud_apply_color (create_DFPointCloudSampleRoof ):
123129 pc = create_DFPointCloudSampleRoof
124130 pc .apply_color (255 , 0 , 0 )
@@ -146,6 +152,8 @@ def test_DFPointCloud_get_tight_bounding_box(create_DFPointCloudSampleRoof):
146152 # round to the 3 decimal places
147153 assert round (obb [0 ][0 ], 3 ) == 0.196 , "The min x of the OBB should be 0.196"
148154
155+ # mesh tests
156+
149157def test_DFMesh_init ():
150158 mesh = dfb .dfb_geometry .DFMesh ()
151159 assert mesh is not None , "DFMesh should be initialized successfully"
0 commit comments