From 1b7caa3d503b0018fa4bc79738ba002753f219f8 Mon Sep 17 00:00:00 2001 From: Michael Williams Date: Tue, 25 Jun 2024 22:55:19 +1200 Subject: [PATCH] Fix mirror types --- packages/replicad/src/geomHelpers.ts | 4 ++-- packages/replicad/src/shapes.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/replicad/src/geomHelpers.ts b/packages/replicad/src/geomHelpers.ts index 09ce853..3dce2ff 100644 --- a/packages/replicad/src/geomHelpers.ts +++ b/packages/replicad/src/geomHelpers.ts @@ -65,8 +65,8 @@ export function translate(shape: TopoDS_Shape, vector: Point): TopoDS_Shape { export function mirror( shape: TopoDS_Shape, - inputPlane: Plane | PlaneName | Point, - origin: Point + inputPlane?: Plane | PlaneName | Point, + origin?: Point ): TopoDS_Shape { const transformation = new Transformation(); transformation.mirror(inputPlane, origin); diff --git a/packages/replicad/src/shapes.ts b/packages/replicad/src/shapes.ts index b017ddb..1afda2c 100644 --- a/packages/replicad/src/shapes.ts +++ b/packages/replicad/src/shapes.ts @@ -261,7 +261,7 @@ export class Shape extends WrappingObj { * * @category Shape Transformations */ - mirror(inputPlane: Plane | PlaneName | Point, origin: Point): this { + mirror(inputPlane?: Plane | PlaneName | Point, origin?: Point): this { const newShape = cast(mirror(this.wrapped, inputPlane, origin)); this.delete();