Skip to content

Commit 0500f54

Browse files
feat: adapt pose comparison component so it also works with the full history
1 parent 32d9456 commit 0500f54

File tree

1 file changed

+7
-1
lines changed
  • src/gh/components/DF_pose_comparison

1 file changed

+7
-1
lines changed

src/gh/components/DF_pose_comparison/code.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Compares CAD poses with measured poses to compute errors."""
12
#! python3
23

34
import Rhino
@@ -12,7 +13,7 @@
1213
class DFPoseComparison(component):
1314
def RunScript(self,
1415
i_assembly: diffCheck.df_geometries.DFAssembly,
15-
i_measured_poses: System.Collections.Generic.List[Rhino.Geometry.Plane]):
16+
i_measured_poses: System.Collections.Generic.List[object]):
1617

1718
CAD_poses = [beam.plane for beam in i_assembly.beams]
1819

@@ -22,6 +23,11 @@ def RunScript(self,
2223
# Compare the origins
2324
# measure the distance between the origins of the CAD pose and the measured pose and output this in the component
2425
for i in range(len(i_measured_poses)):
26+
if not i_measured_poses[i]:
27+
o_distances.append(None)
28+
o_angles.append(None)
29+
o_transforms_cad_to_measured.append(None)
30+
continue
2531
cad_origin = CAD_poses[i].Origin
2632
measured_origin = i_measured_poses[i].Origin
2733
distance = cad_origin.DistanceTo(measured_origin)

0 commit comments

Comments
 (0)