Skip to content

Commit 18fc934

Browse files
authored
Merge pull request #130 from diffCheckOrg/fix_point_to_mesh_component
FIX to DFCloud2Mesh
2 parents 81aa1e3 + 3663aca commit 18fc934

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/gh/components/DF_cloud_mesh_distance/code.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
"""Computes the distance between a point cloud and a mesh"""
12
#! python3
3+
# r: diffCheck==1.0.0
24

35
import Rhino
46
import Grasshopper
@@ -46,13 +48,8 @@ def RunScript(self,
4648
ghenv.Component.AddRuntimeMessage(RML.Warning, "The input number of objects to compare matches neither the number of beams nor the number of joints") # noqa: F821
4749
return None, None, None, None, None, None
4850

49-
# conversion
50-
siffed_df_cloud_source_list = []
51-
siffed_rh_mesh_target_list = []
52-
for i in range(len(i_cloud_source)):
53-
if i_cloud_source[i] is not None:
54-
siffed_df_cloud_source_list.append(df_cvt_bindings.cvt_rhcloud_2_dfcloud(i_cloud_source[i]))
55-
siffed_rh_mesh_target_list.append(rh_mesh_target_list[i])
51+
#conversion to DFCloud
52+
df_cloud_source_list = [df_cvt_bindings.cvt_rhcloud_2_dfcloud(rh_cloud) for rh_cloud in i_cloud_list]
5653

5754
# calculate distances
5855
o_result = df_error_estimation.df_cloud_2_rh_mesh_comparison(i_assembly, df_cloud_source_list, rh_mesh_target_list, i_signed_flag, i_swap) # noqa: F821

src/gh/components/DF_cloud_mesh_distance/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"optional": true,
2121
"allowTreeAccess": true,
2222
"showTypeHints": true,
23-
"scriptParamAccess": "list",
23+
"scriptParamAccess": "tree",
2424
"wireDisplay": "default",
2525
"sourceCount": 0,
2626
"typeHintID": "pointcloud"

0 commit comments

Comments
 (0)