Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outline not work with circle #609

Open
creatxrgithub opened this issue Sep 20, 2024 · 1 comment
Open

outline not work with circle #609

creatxrgithub opened this issue Sep 20, 2024 · 1 comment

Comments

@creatxrgithub
Copy link

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".

@creatxrgithub
Copy link
Author

it's right with:

model = makerjs.model.expandPaths(model, 2, 0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant