Files
modeling-app/docs/kcl/mirror2d.md
Jess Frazelle 3cff26b987 make sure all enter sketch mode are with the stuff they need in the same batch order always (#5646)
* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* comment out

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* update artifacts

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* small

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* last of the artifacts

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* update playwirght

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* add crazy multi-profile test

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* steps

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix artifact graph

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* cleanup

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates
;

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* more artifact grph

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* turn back on playwright

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fmt

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* playwright fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* playwright fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2025-03-13 21:59:39 -07:00

284 KiB

title, excerpt, layout
title excerpt layout
mirror2d Mirror a sketch. manual

Mirror a sketch.

Only works on unclosed sketches for now.

Mirror occurs around a local sketch axis rather than a global axis.

mirror2d(
  data: Mirror2dData,
  sketchSet: SketchSet,
): [Sketch]

Arguments

Name Type Description Required
data Mirror2dData Data for a mirror. Yes
sketchSet SketchSet A sketch or a group of sketches. Yes

Returns

[Sketch]

Examples

// Mirror an un-closed sketch across the Y axis.
sketch001 = startSketchOn('XZ')
  |> startProfileAt([0, 10], %)
  |> line(end = [15, 0])
  |> line(end = [-7, -3])
  |> line(end = [9, -1])
  |> line(end = [-8, -5])
  |> line(end = [9, -3])
  |> line(end = [-8, -3])
  |> line(end = [9, -1])
  |> line(end = [-19, -0])
  |> mirror2d({ axis = 'Y' }, %)

example = extrude(sketch001, length = 10)

Rendered example of mirror2d 0

// Mirror a un-closed sketch across the Y axis.
sketch001 = startSketchOn('XZ')
  |> startProfileAt([0, 8.5], %)
  |> line(end = [20, -8.5])
  |> line(end = [-20, -8.5])
  |> mirror2d({ axis = 'Y' }, %)

example = extrude(sketch001, length = 10)

Rendered example of mirror2d 1

// Mirror a un-closed sketch across an edge.
helper001 = startSketchOn('XZ')
  |> startProfileAt([0, 0], %)
  |> line(end = [0, 10], tag = $edge001)

sketch001 = startSketchOn('XZ')
  |> startProfileAt([0, 8.5], %)
  |> line(end = [20, -8.5])
  |> line(end = [-20, -8.5])
  |> mirror2d({ axis = edge001 }, %)

// example = extrude(sketch001, length = 10)

Rendered example of mirror2d 2

// Mirror an un-closed sketch across a custom axis.
sketch001 = startSketchOn('XZ')
  |> startProfileAt([0, 8.5], %)
  |> line(end = [20, -8.5])
  |> line(end = [-20, -8.5])
  |> mirror2d({
       axis = {
         custom = {
           axis = [0.0, 1.0],
           origin = [0.0, 0.0]
         }
       }
     }, %)

example = extrude(sketch001, length = 10)

Rendered example of mirror2d 3