Union hangs with junction & reused flatSurface's #34
-
Dear, Here is a piece of code that produces a from madcad import *
x = 1
y = 1
w = 1
h = 1
_b2 = Box(vec3(0, 0, 0), vec3(
x+w, y+h, 10))
_br2 = brick(_b2)
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.1)))
]
_cone = junction(
interfaces[0],
interfaces[1],
tangents='straight'
)
_cone.mergeclose()
_p1 = union(interfaces[0], interfaces[1])
_p1.mergeclose()
_p2 = union(_cone, _p1)
show([_p2]) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @jlvila It's true that the boolean operations gets touchy when one of the two surfaces of the operation does intersect the second only on one of its frontiers (like in your case where the interfaces only intersects the cone by their outer ring). That's a common issue with #8 Luckyly in your case (If I correctly understood) you don't need boolean operations with intersection, stiching, etc. You can simply concatenate your cone surface with its ends surfaces using the _cone = junction(
interfaces[0],
interfaces[1],
tangents='straight'
)
_cone.mergeclose()
_p2 = _cone + interfaces[0].flip() + interfaces[1].flip()
_p2.mergeclose() |
Beta Was this translation helpful? Give feedback.
-
@jimy-byerley Many thanks again for your work, |
Beta Was this translation helpful? Give feedback.
Hi @jlvila
It's true that the boolean operations gets touchy when one of the two surfaces of the operation does intersect the second only on one of its frontiers (like in your case where the interfaces only intersects the cone by their outer ring). That's a common issue with #8
Luckyly in your case (If I correctly understood) you don't need boolean operations with intersection, stiching, etc. You can simply concatenate your cone surface with its ends surfaces using the
+
operator: