Curve.ClosestPoints runs considerably longer in V6 than in V5 when analyzing the curve and surface in Curve_ClosestPoints.3dm (142.1 KB). This can also be seen using _ClosestPt _Object.
import rhinoscriptsyntax as rs
import scriptcontext as sc
import time
def main():
idBrep = rs.GetObject("Select surface", filter=rs.filter.surface, preselect=True)
if idBrep is None: return
idCrv = rs.GetObject("Select curve", filter=rs.filter.curve)
if idCrv is None: return
face = rs.coercesurface(idBrep)
crv = rs.coercecurve(idCrv)
t0 = time.time()
crv.ClosestPoints([face], sc.doc.ModelAbsoluteTolerance)
print time.time() - t0
if __name__ == '__main__': main()
I’m getting about 0.68 seconds in V5 and about 7.3 seconds in V6. A noticeable run time difference occurs with other, but not most, curve/surface combinations.
Also, _ClosestPt _Object runs slower than my script in both V5 & V6.
1/26 WIP
Last weekend, I tested the curve and surface using older versions of the WIP. The January 26th WIP was the earliest that could read the model. Although I could not use the IronPython plug-in, _ClosestPt _Object was taking over 20 seconds to complete, the same as last week’s WIP.
9/13 WIP
Through repeated testing of the script using a loop, I was getting times that were always about 0.54, 7.3, 15.1, or 21.7. Sometimes the timing would be near one value for a few iterations then jump to and remain near another value through the remainder of the loop. Does a pattern like this indicate anything?
9/20 WIP
Running the script through 100 iterations, the times ranged from 2.76 to 3.04, values I had not witnessed previous to this WIP. (V5 times are still about 0.68.)
_ClosestPt _Object now takes less than 4 seconds to complete in the WIP. The script reports about 3.2.
Besides installing the new WIP, I haven’t made other changes to my PC since testing last week’s WIP. Could something else be throttling the WIP but not V5?
By the way
After installing a WIP, for the first or first few times after closing it, I often get the “Rhinoceros 6 Developer Build has stopped working” window with the option to send information to Microsoft. This has been happening for some time, possibly since I’ve started using the WIP last November.