Skip to content

Commit c4c395a

Browse files
UPDATE: add python test of add_points() from python binding
1 parent a56677e commit c4c395a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/integration_tests/pybinds_tests/test_pybind_units.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ def test_DFPointCloud_properties(create_DFPointCloudSampleRoof):
7575
assert pc.has_colors() == False, "has_colors() should return False"
7676
assert pc.has_normals() == False, "has_normals() should return False"
7777

78+
def test_DFPointCloud_add_points():
79+
point_pc_1 = [(0, 0, 0)]
80+
point_pc_2 = [(1, 1, 1)]
81+
normal_pc_1 = [(0, 0, 1)]
82+
normal_pc_2 = [(1, 0, 0)]
83+
color_pc_1 = [(255, 0, 0)]
84+
color_pc_2 = [(0, 255, 0)]
85+
pc_1 = dfb.dfb_geometry.DFPointCloud(point_pc_1, normal_pc_1, color_pc_1)
86+
pc_2 = dfb.dfb_geometry.DFPointCloud(point_pc_2, normal_pc_2, color_pc_2)
87+
pc_1.add_points(pc_2)
88+
assert pc_1.points.__len__() == 2, "two pointclouds of 1 pt combined into one should have 2 pts"
89+
7890
def test_DFPointCloud_apply_color(create_DFPointCloudSampleRoof):
7991
pc = create_DFPointCloudSampleRoof
8092
pc.apply_color(255, 0, 0)

0 commit comments

Comments
 (0)