The output of this script
from __future__ import absolute_import, division, print_function, unicode_literals
#! python 2
import Rhino
import Rhino.Input as ri
def main():
go = ri.Custom.GetObject()
go.SetCommandPrompt("Select 2 curves")
go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve
res = go.GetMultiple(minimumNumber=2, maximumNumber=2)
if res == ri.GetResult.Cancel:
go.Dispose()
return
if res == ri.GetResult.Object:
objrefs = go.Objects()
go.Dispose()
crvs = [o.Curve() for o in objrefs]
s = "{:>9} {}"
print(s.format("tolerance", "GetDistancesBetweenCurves result"))
for power in range(0,7):
tolerance = 10**(-power)
rc = Rhino.Geometry.Curve.GetDistancesBetweenCurves(*crvs, tolerance)
print(s.format(tolerance, rc))
if __name__ == '__main__': main()
with the two curves in the model provided in CrvDeviation accuracy as its input is:
tolerance GetDistancesBetweenCurves result
1 (True, 0.7700593140369133, 694.1538461538461, 675.7299047423902, 0.0, 0.0, 0.0)
0.1 (True, 0.7700593140369133, 694.1538461538461, 675.7299047423902, 0.0, 0.0, 0.0)
0.01 (True, 0.7700593140369133, 694.1538461538461, 675.7299047423902, 0.0, 0.0, 0.0)
0.001 (True, 0.7700593140369133, 694.1538461538461, 675.7299047423902, 0.0, 0.0, 0.0)
0.0001 (True, 0.7700593140369133, 694.1538461538461, 675.7299047423902, 0.0, 0.0, 0.0)
1e-05 (True, 0.7700593140369133, 694.1538461538461, 675.7299047423902, 0.0, 0.0, 0.0)
1e-06 (True, 0.7700593140369133, 694.1538461538461, 675.7299047423902, 0.0, 0.0, 0.0)
but as shown in the referenced thread, 0.7701 is not the maximum value.
What is the function of the tolerance
parameter of GetDistancesBetweenCurves
?