microsoft / microsoft/maker.js

outline not work with circle

Open
#609 1 comment 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

outline not work with circle

to calculate circle's outline will get only a circle stroke. and anything inside the circle will lose.

maybe, it cannot calculate a closed stroke's outline?

let model = {
    "models": {},
    "paths": {
        "p0": {
            "type": "line",
            "origin": [
                32,
                16
            ],
            "end": [
                32,
                48
            ]
        },
        "p1": {
            "type": "line",
            "origin": [
                48,
                32
            ],
            "end": [
                16,
                32
            ]
        },
        "p2": {
            "type": "circle",
            "origin": [
                50,
                50
            ],
            "radius": 45
        }
    }
};

model = makerjs.model.outline(model, 5);  //will get only circle stroke

remove the "p2", it will get a outline of the "p1"+"p2".

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

Start at the makerjs.model.outline entry point and reproduce the supplied model containing p0, p1, and the circle p2. Compare its result with the result after removing p2 to isolate how the closed circle affects the combined outline. Done means the circle and the other paths are represented together rather than only the circle stroke being returned.

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
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.