Skip to content

Commit

Permalink
fix(nc): beginning datum line
Browse files Browse the repository at this point in the history
  • Loading branch information
hpcreery committed Aug 14, 2024
1 parent 3896190 commit b23c08e
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/renderer/lib/nc/parser/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,12 +844,19 @@ export class NCToShapesVisitor extends BaseCstVisitor {
if (ctx.arcCenter) this.visit(ctx.arcCenter)
if (ctx.arcRadius) this.visit(ctx.arcRadius)
if (this.state.mode == Constants.DRILL) {
this.result.push(new Shapes.DatumLine({
xs: this.state.previousX,
ys: this.state.previousY,
xe: this.state.x,
ye: this.state.y,
}))
if (this.result.length > 0) {
this.result.push(new Shapes.DatumLine({
xs: this.state.previousX,
ys: this.state.previousY,
xe: this.state.x,
ye: this.state.y,
}))
} else {
this.result.push(new Shapes.DatumPoint({
x: this.state.x,
y: this.state.y,
}))
}
this.result.push(new Shapes.DatumText({
x: this.state.x,
y: this.state.y,
Expand Down

0 comments on commit b23c08e

Please sign in to comment.