Union operation fails
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
_Tested with Docker and conda_
This used to work on 2.1. It doesn't any more.
## The code
```python
import cadquery as cq
from math import pi, cos, sin
def A():
r = 3 # Radius of the helix
p = 1.5 # Pitch of the helix
h = 4 # Height of the helix
# Helix
wire = cq.Wire.makeHelix(pitch=p, height=h, radius=r)
helix = cq.Workplane(obj=wire)
# Final result. A circle sweeped along a helix.
result = (
cq.Workplane('XZ')
.center(r, 0)
.circle(0.1)
.sweep(helix, isFrenet=True)
)
return result
def B():
r = 3 # Radius of the helix
p = 1.5 # Pitch of the helix
h = 4 # Height of the helix
# Helix
helix = cq.Workplane('XY').parametricCurve(
lambda t : (
r * cos(t * 2 * pi),
r * sin(t * 2 * pi),
p * t
),
start=0,
stop=h/p
)
# Final result. A circle sweeped along a helix.
result = (
cq.Workplane('XZ')
.center(r, 0)
.circle(0.1)
.sweep(helix, isFrenet=True)
)
return result
R1 = A()
R2 = B()
print(R1.union(R2).val().Volume())
print(R1.val().Volume())
print(R2.val().Volume())
```
## Output from CQ v2.1
```
1.5791363670611553
1.5791363670490945
1.5791518977497208
```
## Output from CQ master branch
```
0.0
1.5791363670490945
1.5791365217054782
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.