Skip to content

Commit 9f3d1f5

Browse files
FIX: second adaptation of segmentation parameters
1 parent 0d74df4 commit 9f3d1f5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/integration_tests/pybinds_tests/test_pybind_units.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,12 @@ def test_DFPlaneSegmentation():
299299
vertices = [[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0], [0, 1, -1], [0, 0, -1]]
300300
faces = [[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5]]
301301
mesh = dfb.dfb_geometry.DFMesh(vertices, faces, [], [], [])
302-
pc = mesh.sample_points_uniformly(1000)
303-
pc.estimate_normals(knn=50)
302+
pc = mesh.sample_points_uniformly(5000)
303+
pc.estimate_normals(knn=20)
304304

305305
segments = dfb.dfb_segmentation.DFSegmentation.segment_by_normal(pc,
306-
normal_threshold_degree=10,
307-
min_cluster_size=200,
306+
normal_threshold_degree=5,
307+
min_cluster_size=1000,
308308
knn_neighborhood_size=200)
309309

310310
assert len(segments) == 2, "DFPlaneSegmentation should return 2 segments"
@@ -313,12 +313,12 @@ def test_DFPlaneSegmentation_disconnected_plans():
313313
vertices = [[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0], [0, 1, -1], [0, 0, -1]]
314314
faces = [[0, 1, 2], [3, 4, 5]]
315315
mesh = dfb.dfb_geometry.DFMesh(vertices, faces, [], [], [])
316-
pc = mesh.sample_points_uniformly(1000)
317-
pc.estimate_normals(knn=50)
316+
pc = mesh.sample_points_uniformly(5000)
317+
pc.estimate_normals(knn=20)
318318

319319
segments = dfb.dfb_segmentation.DFSegmentation.segment_by_normal(pc,
320-
normal_threshold_degree=10,
321-
min_cluster_size=200,
320+
normal_threshold_degree=5,
321+
min_cluster_size=1000,
322322
knn_neighborhood_size=200)
323323

324324
assert len(segments) == 2, "DFPlaneSegmentation should return 2 segments"

0 commit comments

Comments
 (0)