Skip to content

Commit 17ea054

Browse files
fix: check on null normal was wrongly formulated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 6a39456 commit 17ea054

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/gh/components/DF_pose_estimation

‎src/gh/components/DF_pose_estimation/code.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def RunScript(self,
5050
df_face_cloud = df_cvt_bindings.cvt_rhcloud_2_dfcloud(face_cloud)
5151
df_cloud.add_points(df_face_cloud)
5252
plane_normal = df_face_cloud.fit_plane_ransac()
53-
if all(plane_normal) == 0:
53+
if all(component == 0 for component in plane_normal):
5454
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
5555
continue
5656
rh_face_normals.append(Rhino.Geometry.Vector3d(plane_normal[0], plane_normal[1], plane_normal[2]))

0 commit comments

Comments
 (0)