CurveBooleanUnion fails unexpectedly on Mac WIP

CurveBooleanUnion fails to produce a result for the attached input.

bu.3dm (40.5 KB)

I’m using the following python script to execute the CurveBooleanUnion command.

import rhinoscriptsyntax as rs

def Test():
    crvs = rs.GetObjects("Curves", rs.filter.curve)
    u = rs.CurveBooleanUnion(crvs)
    if u:
        rs.MessageBox("Union failed")

# Check to see if this file is being executed as the "Main" python
# script instead of being used as a module by some other python script
# This allows us to use the module which ever way we want.
if __name__ == '__main__':

# NOTE: see sample for using this script as a module

I’ve looked at the CurveBooleanUnion code in and it seems like the underlying Rhino function must be failing to return any valid curves.

not exactly sure why your model is failing but if you draw a couple of circles which intersect, the code works.

Yes, it works for every simple example I have tried, but it fails consistently in my particular use case. Based on trial and error, I noticed that it seems to fail when combining shapes that have very small differences.

The difference between your curves is the same as the absolute file tolerance in some areas. If you tighten the absolute tolerance to .001, your script succeeds.

HTH, --Mitch