Open
Description
Hey there! I think I found a bug with the outline method, at least when telling it to generate a path on the inside. It's hard to explain, since it doesn't crash or anything. It just produces empty models with very specific inputs, and very specific outline distances. Here's some code that reproduces what I'm seeing:
import makerjs from "makerjs";
const points = [
[ 36, 504 ],
[ 540, 504 ],
[ 576, 360 ],
[ 756, 360 ],
[ 864, 144 ],
[ 864, 36 ],
[ 36, 36 ]
];
const shape = new makerjs.models.ConnectTheDots(true, points);
const final = {
models: {
shape,
a: makerjs.model.outline(shape, 30, 1, true),
b: makerjs.model.outline(shape, 36, 1, true),
c: makerjs.model.outline(shape, 42, 1, true),
}
};
document.write(makerjs.exporter.toSVG(final));
The result ends up looking like:
Where shape
, a
, and c
are all drawn correctly, but b
is an empty model. Tweaking the outline distance, even by just a little (ie, changing the 36 into 36.1) seems to "fix" this, but that isn't a REAL solution. :)
Any help would be appreciated. Thanks!