Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5791

Curve.Contains help on understanding result

$
0
0

@Holo wrote:

Hi guys, this feels very noob, but how do I understand the result from the Curve.Contains command?

Right now I convert the result to a string and then checks that, but that doesn’t “feel” right.

import rhinoscriptsyntax as rs
import Rhino

curve_id=rs.GetObject("",rs.filter.curve)
if curve_id:
    curve=rs.coercecurve(curve_id)
    pts=rs.GetPoints()
    if pts:
        for pt in pts:
            test= curve.Contains(testPoint=pt)
            if str(test) == "Inside": print "Inside"

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5791

Trending Articles