microsoft / microsoft/maker.js

TypeError: c.links[1].walkedPath.pathContext.bezierData is undefined for combineUnion on EllipticArc and Rectangle

Open
#596 0 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

Below are sections of my code causing issues. offset and width are variables with numerical values.

const botArc = new makerjs.models.EllipticArc(180, 0, width / 2, 25);
const botArcMoved = makerjs.model.moveRelative(botArc, [
      width / 2 + offset,
      offset,
]);

let box = new makerjs.models.Rectangle(100, 50);
box.origin = [0, 0];

let model = {
      ...
      models: {
      ...
        valve: makerjs.model.combineUnion(botArcMoved, box),
      },
};

If I comment out valve: makerjs.model.combineUnion(botArcMoved, box) the code doesn't give me the type error and the rest of the models and lines are drawn correctly.

Doing this kind of combine also is giving me an error:
makerjs.model.combine(botArcMoved, box, false, true, true, false).

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 source file, test, or entry point is named. Start by reproducing the supplied EllipticArc and Rectangle examples with combineUnion and combine, then trace the failing geometry operation. Done means both combinations no longer raise the reported TypeError for this case.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.