add new path generator. let it bake for a while before removing the old one
This commit is contained in:
parent
956d1b1af0
commit
1d47ec9473
4 changed files with 328 additions and 25 deletions
|
|
@ -3,6 +3,7 @@
|
|||
"use strict";
|
||||
|
||||
// dep: geo.base
|
||||
// dep: geo.paths
|
||||
// dep: ext.clip2
|
||||
// dep: ext.earcut
|
||||
// dep: geo.point
|
||||
|
|
@ -59,6 +60,14 @@ class Polygon {
|
|||
return bounds;
|
||||
}
|
||||
|
||||
toPath2D(offset) {
|
||||
return base.paths.pointsToPath(this.points, offset, this.open);
|
||||
}
|
||||
|
||||
toPath3D(offset, height, z) {
|
||||
return base.paths.pathTo3D(this.toPath2D(offset), height, z);
|
||||
}
|
||||
|
||||
toString(verbose) {
|
||||
let l;
|
||||
if (this.inner && this.inner.length) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue