Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8546

ToArc or not ToArc

$
0
0

@Willem wrote:

Hi,

I’m puzzled by the tolerance setting for Curve.IsArc()

A curve that test True for Curve.IsArc() but False for Curve.IsArc(0.1)
I would expect any tolerance to return True if a zero tolerance is True
Do I lack some fundamental knowledge on what this tolerance means or is this buggy behaviour?

find the curve in this file:
ToArc_or_not_ToArc.3dm (22.3 KB)

import rhinoscriptsyntax as rs
import scriptcontext as sc

def find_arc():
    
    objs = rs.NormalObjects()
    
    for id in rs.NormalObjects():
        curve = rs.coercecurve(id)
        if curve:
            
            print 'arc at tol:zero == {}'.format(curve.IsArc()   )
            print 'arc at tol:0.1 == {}' .format(curve.IsArc(0.1))

find_arc()

printout:
arc at tol:zero == True
arc at tol:0.1 == False

Thanks
-Willem

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 8546

Trending Articles