Skip to content

Commit d64c767

Browse files
committed
Rename NonPlanarPathError to NonPlanarExtrusionError
1 parent e32a317 commit d64c767

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/indexers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ export class TravelTypeIndexer extends Indexer {
6262
/**
6363
* Error thrown when attempting to index a non-planar path
6464
*/
65-
export class NonPlanarPathError extends NonApplicableIndexer {
65+
export class NonPlanarExtrusionError extends NonApplicableIndexer {
6666
constructor() {
67-
super("Non-planar paths can't be indexed by layer");
67+
super("Non-planar extrusions cannot be indexed by layer");
6868
}
6969
}
7070

@@ -101,7 +101,7 @@ export class LayersIndexer extends Indexer {
101101
path.travelType === PathType.Extrusion &&
102102
path.vertices.some((_, i, arr) => i > 3 && i % 3 === 2 && Math.abs(arr[i] - arr[i - 3]) > this.tolerance)
103103
) {
104-
throw new NonPlanarPathError();
104+
throw new NonPlanarExtrusionError();
105105
}
106106

107107
// new layers are only created when extruding

src/job.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
ToolIndexer,
88
Indexer,
99
NonApplicableIndexer,
10-
NonPlanarPathError
10+
NonPlanarExtrusionError
1111
} from './indexers';
1212
import { BoundingBox } from './bounding-box';
1313

@@ -166,7 +166,7 @@ export class Job {
166166
throw e; // If the error is not a NonApplicableIndexer, it will be thrown.
167167
}
168168

169-
if (e instanceof NonPlanarPathError) {
169+
if (e instanceof NonPlanarExtrusionError) {
170170
console.warn('Non-planar path detected; clearing layer index');
171171
this._layers = [];
172172
}

0 commit comments

Comments
 (0)