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

Bug with intersect tolerance in curve curve intersection

$
0
0

@Gijs wrote:

I'm trying to remove curves with a certain margin from a boundary by using higher values of intersection tolerance. There seems to be a bug with the intersection tolerance when the boundary has horizontal or vertical lines: see image

the code basically comes down to this:

import Rhino
import rhinoscriptsyntax as rs

boundary=rs.GetObject("boundary")
curves=rs.GetObjects("curves to test")
plane=Rhino.Geometry.Plane.WorldXY

for curve in curves:
    b=rs.coercecurve(boundary)
    c=rs.coercecurve(curve)
    bb=c.GetBoundingBox(True)
    cen=bb.Center
    
    x=10 #intersection tolerance
    y=0 #overlap tolerance
    
    intersections = Rhino.Geometry.Intersect.Intersection.CurveCurve(b,c,x,y)
    if intersections.Count>0 or not b.Contains(cen, plane)==Rhino.Geometry.PointContainment.Inside:
        rs.DeleteObject(curve)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 8553

Trending Articles