use face edge info for some mirrors (#7174)

* use face edge info for some mirrors

* add functionality for other mirror function

* Fix to create new Sketch when mirror results in a new path

* use the original ids and clone the sketches

* remove mirror param

* clippy fix

* debuggin, rm yarn

* Revert "remove mirror param"

This reverts commit a848e243f8.

* use arrbitrary edge_id as sketch mirror id

* additinoal clenaup

* Update rust/kcl-lib/src/std/mirror.rs

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>

* set .mirror for continuous case

* fix warning

* works without the for loops

* add error handling

* remove duplicate setter

* rm unused var

* clenaup

* unused import

* remove unused let

* Update snapshots

* Update snapshots

* cleanup

* update sim tests

---------

Co-authored-by: gserena <serena@zoo.dev>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Serena Gandhi
2025-06-23 12:27:03 -05:00
committed by GitHub
parent 631b63b1b6
commit 1e1bdbd6e7
13 changed files with 67 additions and 175 deletions

View File

@ -175,10 +175,10 @@ pub(crate) async fn do_post_extrude<'a>(
)
.await?;
let any_edge_id = if let Some(id) = edge_id {
id
} else if let Some(edge_id) = sketch.mirror {
let any_edge_id = if let Some(edge_id) = sketch.mirror {
edge_id
} else if let Some(id) = edge_id {
id
} else {
// The "get extrusion face info" API call requires *any* edge on the sketch being extruded.
// So, let's just use the first one.