Boolean operations between a Mesh and junction hang #31
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @jlvila I could not reproduce a here is my working piece of code _brick = brick(center=1.5*X+2.5*Y, width=vec3(2))
x = 1
y = 1
w = 1
h = 1
color = vec3(1)
_radius = w/2.0
_length = h
interfaces = [
flatsurface(wire(Circle((vec3(0), vec3(0, 1, 0)), _radius))),
flatsurface(wire(Circle((vec3(0, _length, 0), vec3(0, -1, 0)), 0.001)))
]
_cone = junction(
interfaces[0],
interfaces[1],
tangents='straight'
)
_coneTranslated = _cone.transform(vec3(x+_radius, y, 0))
_coneTranslated.option(color=vec3(color.r, color.g, color.b))
_coneTranslated.mergeclose()
result = difference(_brick, _coneTranslated) The only change is By zooming on the cone angle, you will see the problem you had: The same winding was creating some kind of paradoxical surface that went through itself, hence having no clear in- and out-side, and the boolean operations are not pleased when in and out are not consistent |
Beta Was this translation helpful? Give feedback.
Hello @jlvila
I could not reproduce a
TriangulationError
with this piece of code, however I got wrong meshing, which can be due to the same cause. I guess it's only because I had not the same exact brick in the boolean operation. If fixed it by taking a closer look at the winding of the junction interfaces: your contours are both going the same way, which is not correct for a cone.The interfaces of a junction will be used as surface contours in the final mesh, so each side must have opposed windings. If you flip one of your circles, then you should get a proper cone and solve
TriangulationError
here is my working piece of code