Python ispoint in region

Hey @ForestOwl,

How are ya doing?

Your question was already answered in our discussion here. The goose_revisited.gh file includes most of the methods, you need for inclusion, intersection, and/or exclusion tests.

For example, line 152 to 175 of the GHPython script, inside the method is_inside():

# Count how many vertices of the test polyline are inside, outside of or conincident with container curve
    inside_count, coincident_count, outside_count, unset_count = 0, 0, 0, 0
    for vtx in test_polyline:
        containment_test = other_curve.Contains(vtx)
        if containment_test == rg.PointContainment.Inside:
            inside_count += 1
        if containment_test == rg.PointContainment.Coincident:
            coincident_count += 1
        if containment_test == rg.PointContainment.Outside:
            outside_count += 1
        if containment_test == rg.PointContainment.Unset:
            unset += 1
    if strict:
        if inside_count > 0 and coincident_count == 0 and outside_count == 0 and unset_count == 0:
            return True # strict inclusion
        else:
            return False
    else:
        if inside_count > 0 and coincident_count == 0 and outside_count == 0 and unset_count == 0:
            return True # strict inclusion
        elif inside_count > 0 and coincident_count > 0 and outside_count == 0 and unset_count == 0:
            return True # inclusion with partiall coincidence
        else:
            return False

I maybe should have cleared up that a vertex is basically the same as a point in this example.

:grin: