Skip to content

Commit 47448fa

Browse files
FIX: mismatch in parameters for plugin code + conversion DFPointCloud colors from Rhino
1 parent 1902f16 commit 47448fa

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/diffCheckBindings.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,6 @@ PYBIND11_MODULE(diffcheck_bindings, m) {
165165
py::arg("normal_threshold_degree") = 20,
166166
py::arg("min_cluster_size") = 10,
167167
py::arg("use_knn_neighborhood") = false,
168-
py::arg("radius_neighborhood_size") = 10,
169-
py::arg("knn_neighborhood_size") = 10);
168+
py::arg("knn_neighborhood_size") = 10,
169+
py::arg("radius_neighborhood_size") = 10);
170170
}

src/gh/components/DF_scan_segmentation/code.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
import diffCheck.df_geometries as df_geo
44
import diffCheck.diffcheck_bindings as df_bindings
55

6-
def main(model, voxel_size, normal_threshold, min_cluster_size, knn_neighborhood_size):
6+
def main(scan, voxel_size, normal_threshold, min_cluster_size, knn_neighborhood_size):
77
a = []
88
df_scan = df_cvt.cvt_rhcloud_2_dfcloud(scan)
9-
res = df_bindings.dfb_segmentation.DFSegmentation.segmentation_point_cloud(df_scan, voxel_size, normal_threshold, min_cluster_size, false, 10, knn_neighborhood_size)
9+
res = df_bindings.dfb_segmentation.DFSegmentation.segmentation_point_cloud(df_scan, voxel_size, normal_threshold, min_cluster_size, True, 10, knn_neighborhood_size)
1010
print(len(res))
1111
for pc in res:
12-
a.append(pc)
12+
rh_pc = df_cvt.cvt_dfcloud_2_rhcloud(pc)
13+
a.append(rh_pc)
1314
return a
1415

1516
if __name__ == "__main__":
16-
a = main(model, voxel_size, normal_threshold, min_cluster_size, knn_neighborhood_size)
17-
17+
a = main(scan, voxel_size, normal_threshold, min_cluster_size, knn)
18+
pass

src/gh/diffCheck/diffCheck/df_cvt_bindings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def cvt_rhcloud_2_dfcloud(rh_cloud) -> diffcheck_bindings.dfb_geometry.DFPointCl
3535

3636
# colors
3737
if rh_cloud.ContainsColors:
38-
df_cloud.colors = [c for c in rh_cloud.GetColors()]
38+
# df_cloud.colors = [c for c in rh_cloud.GetColors()]
39+
df_cloud.colors = [[c.R, c.G, c.B] for c in rh_cloud.GetColors()]
3940

4041
return df_cloud
4142

0 commit comments

Comments
 (0)