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

Bug Rhino7 Mesh.CreateBooleanIntersection

$
0
0

@Ano wrote:

Hello

I came across what appears to be a bug in Rhino.Geometry.Mesh.CreateBooleanIntersection. I am running the attached Python code on the two meshes in the attached file. One of the meshes has two vertices very close to each other at a distance of about 0.08, this is correct.

MeshBoolean200321.3dm (39.5 KB) MeshBoolean200321.py (791 Bytes)

import rhinoscriptsyntax as rs
import Rhino
selectedA = rs.GetObject(‘mesh a’,32)
selectedB = rs.GetObject(‘mesh b’,32)
for offsetX in [0, 200, -200]:
if offsetX:
meshA = rs.coercemesh(rs.CopyObject(selectedA,[offsetX,0,0]))
meshB = rs.coercemesh(rs.CopyObject(selectedB,[offsetX,0,0]))
else:
meshA = rs.coercemesh(selectedA)
meshB = rs.coercemesh(selectedB)
booleansAB = Rhino.Geometry.Mesh.CreateBooleanIntersection([meshA],[meshB])
booleansBA = Rhino.Geometry.Mesh.CreateBooleanIntersection([meshB],[meshA])
print offsetX, ((‘AB closed’ if booleansAB[0].IsClosed else ‘AB open’)if booleansAB else ‘AB failed’)
print offsetX, ((‘BA closed’ if booleansBA[0].IsClosed else ‘BA open’)if booleansBA else ‘BA failed’)

In Rhino 6, all booleans fail. In Rhino 7 curiously, I get the following result:

0 AB open
0 BA failed
200 AB open
200 BA failed
-200 AB closed
-200 BA closed

The same applies if done manually in Rhino 7: If I copy or move the objects by -200 along the x-axis they boolean fine, otherwise not.

As it might take time to fix the Rhino code, is there any quick fix I can do, such as rebuilding the mesh or similar? Thank you very much!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 8532

Trending Articles