maker.js icon indicating copy to clipboard operation
maker.js copied to clipboard

outline not work with circle

Open creatxrgithub opened this issue 1 year ago • 1 comments

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 avatar Sep 20 '24 10:09 creatxrgithub

it's right with:

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

creatxrgithub avatar Sep 20 '24 14:09 creatxrgithub