Skip to content

Commit 71ea6bc

Browse files
fix: correct the null vector check
1 parent 9f57cd8 commit 71ea6bc

File tree

1 file changed

+1
-1
lines changed
  • src/gh/components/DF_pose_estimation

1 file changed

+1
-1
lines changed

src/gh/components/DF_pose_estimation/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def RunScript(self,
4242
df_face_cloud = df_cvt_bindings.cvt_rhcloud_2_dfcloud(face_cloud)
4343
df_cloud.add_points(df_face_cloud)
4444
plane_normal = df_face_cloud.fit_plane_ransac()
45-
if plane_normal == [0,0,0]:
45+
if all(plane_normal) == 0:
4646
ghenv.Component.AddRuntimeMessage(RML.Warning, f"There was a missing face in the cloud of beam {i}: the face was skipped in the pose estimation of that beam") # noqa: F821
4747
continue
4848
rh_face_normals.append(Rhino.Geometry.Vector3d(plane_normal[0], plane_normal[1], plane_normal[2]))

0 commit comments

Comments
 (0)