Skip to content

Commit

Permalink
fix: add extrusion property to the arc entity
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikjabiri committed Aug 21, 2024
1 parent 9cab866 commit 2a56771
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/entities/arc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BBox, BoundingBox, TagsManager } from "@/utils";
import { BBox, BoundingBox, extrusion, TagsManager } from "@/utils";
import { Entity, EntityOptions } from "./entity";
import { Point3D } from "@/types";

Expand All @@ -8,6 +8,7 @@ export interface ArcOptions extends EntityOptions {
radius: number;
startAngle: number;
endAngle: number;
extrusion?: Point3D;
}

export class Arc extends Entity {
Expand All @@ -16,6 +17,7 @@ export class Arc extends Entity {
radius: number;
startAngle: number;
endAngle: number;
extrusion: Point3D;

override get subClassMarker(): string {
return "AcDbCircle";
Expand All @@ -29,6 +31,7 @@ export class Arc extends Entity {
this.radius = options.radius;
this.startAngle = options.startAngle;
this.endAngle = options.endAngle;
this.extrusion = options.extrusion || extrusion();
}

override bbox(): BoundingBox {
Expand All @@ -42,5 +45,6 @@ export class Arc extends Entity {
mg.add(100, "AcDbArc");
mg.add(50, this.startAngle);
mg.add(51, this.endAngle);
mg.point(this.extrusion, 200);
}
}

0 comments on commit 2a56771

Please sign in to comment.