microsoft / microsoft/maker.js
Booleans on Bezier arcs with large radius
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 302
- Avg merge
- 21h 28m
- Merged PRs (30d)
- 5
Description
I was dealing with path booleans with maker.js recently, when I encountered a problem where a boolean operation results in fragmented segments that end up being discarded, resulting in entire holes or contours lost.
I did some digging, and it seems that the Text objects I was dealing with are in fact Bezier Curves approximated with arcs. When the bezier curve goes flat, the arc's radius becomes huge and the angle becomes very small. That seemed to cause issues when the arc is intersected with lines.
I converted the arcs in question into straight lines and that seemed to solve the problem. But I guess a better solution would have to be implemented by the devs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reproducing a path boolean involving a nearly flat Bezier curve approximated by a very large-radius, small-angle arc intersecting lines, then inspect how fragmented segments are handled. Done means the boolean preserves the affected holes and contours instead of discarding them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100