NurbsSurface.EpsilonEquals bug

I noticed that xMergeFace / xMergeAllFaces | Food4Rhino isn’t merging NurbsSurface faces that it should and discovered that NurbsSurface.EpsilonEquals returns False even for duplicate NurbsSurfaces.

I see that method was recently modified: https://mcneel.myjetbrains.com/youtrack/issue/RH-61937

This script returns True in 6.34, but False in 7.4:

import Rhino.Geometry as rg
import scriptcontext as sc

import random

def main():
    
    pts = []
    for iU in range(4):
        for iV in range(4):
            pts.append(rg.Point3d(
                float(iU) + 0.2*(random.random()-0.5),
                float(iV) + 0.2*(random.random()-0.5),
                            0.2*(random.random()-0.5)
                ))
    
    nsA = rg.NurbsSurface.CreateFromPoints(
        points=pts,
        uCount=4,
        vCount=4,
        uDegree=3,
        vDegree=3)
    
    nsB = nsA.Duplicate()
    
    fTolerance = 0.001 * sc.doc.ModelAbsoluteTolerance
    
    print nsA.EpsilonEquals(other=nsB, epsilon=fTolerance)

if __name__ == '__main__': main()

Hi @spb,

Totally my fault. I’ll try to push a fix into SR 7.5.

https://mcneel.myjetbrains.com/youtrack/issue/RH-63583

– Dale

RH-63583 is fixed in the latest Rhino 7 Service Release Candidate