microsoft / microsoft/maker.js

Booleans on Bezier arcs with large radius

Open
#448 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.