We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 373b833 commit 4e581a2Copy full SHA for 4e581a2
1 file changed
src/gh/diffCheck/diffCheck/df_geometries.py
@@ -178,8 +178,17 @@ def from_brep_face(cls,
178
loop_vertices = loop_curve.Points
179
loop = []
180
for l_v in loop_vertices:
181
- vertex = DFVertex(l_v.X, l_v.Y, l_v.Z)
182
- loop.append(vertex)
+ rg_pt = rg.Point3d(l_v.X, l_v.Y, l_v.Z)
+ res = loop_curve.ClosestPoint(rg_pt)
183
+ if res:
184
+ t = res[1]
185
+ else:
186
+ t = 0 # this is a fallback, but it should not happen since the point is on the curve
187
+ point_on_curve = loop_curve.PointAt(t)
188
+ distance = rg.Point3d.DistanceTo(rg_pt, point_on_curve)
189
+ if distance < 10 * Rhino.RhinoDoc.ActiveDoc.ModelAbsoluteTolerance:
190
+ vertex = DFVertex(l_v.X, l_v.Y, l_v.Z)
191
+ loop.append(vertex)
192
all_loops.append(loop)
193
194
df_face = cls(all_loops, joint_id)
0 commit comments