CadQuery / CadQuery/cadquery

Wire.fillet with line+circle results in incorrect fillet direction

Open
#1,852 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

When adding a fillet to a (line + circle) connected edge, the fillet occasionally goes the wrong direction, resulting in a very awkward sharp angle.

The following code reproduces on cadquery-2.5.2 and cadquery-ocp-7.7.2:

```
def clearPendingWires(workplane):
workplane.ctx.pendingWires = []
return workplane

(
cq.Workplane("XY")
# Create the 2d shape.
.lineTo(1, 0)
.threePointArc((2, 0.75), (3.0, 0))
.lineTo(4, 0)
.lineTo(4, 2)
.threePointArc((2, 3), (0, 2))
.close()
.export("before_fillet.dxf")
.invoke(clearPendingWires)
# Perform a 2d fillet. This is where the issue occurs.
.map(lambda w: w.fillet(0.25))
.export("after_fillet.dxf")
)
```

before_fillet.dxf:
![Image](https://github.com/user-attachments/assets/578ecd75-ce64-4f46-9186-e5432bce43d5)

after_fillet.dxf:
![Image](https://github.com/user-attachments/assets/26f4fda6-efa7-410d-8cf1-55e66712c8a3)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.