Improve KCL Samples (#5767)

* improve KCL Samples & .gitignore

* update block and car wheel assembly

* update flange and lego, delete flange xy

* artifacts

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>

* scale

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

* updates

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

* docs

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>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Josh Gomez
2025-03-13 23:38:51 -07:00
committed by GitHub
parent dd99c27d56
commit 58e0c0e916
101 changed files with 107664 additions and 57348 deletions

View File

@ -226,18 +226,11 @@ pub struct ImportedGeometry {
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
#[ts(export)]
#[serde(tag = "type", rename_all = "camelCase")]
#[allow(clippy::vec_box)]
pub enum SolidOrImportedGeometry {
Solid(Box<Solid>),
ImportedGeometry(Box<ImportedGeometry>),
}
impl SolidOrImportedGeometry {
pub fn id(&self) -> uuid::Uuid {
match self {
SolidOrImportedGeometry::Solid(s) => s.id,
SolidOrImportedGeometry::ImportedGeometry(s) => s.id,
}
}
SolidSet(Vec<Box<Solid>>),
}
impl From<SolidOrImportedGeometry> for crate::execution::KclValue {
@ -245,6 +238,17 @@ impl From<SolidOrImportedGeometry> for crate::execution::KclValue {
match value {
SolidOrImportedGeometry::Solid(s) => crate::execution::KclValue::Solid { value: s },
SolidOrImportedGeometry::ImportedGeometry(s) => crate::execution::KclValue::ImportedGeometry(*s),
SolidOrImportedGeometry::SolidSet(s) => crate::execution::KclValue::Solids { value: s },
}
}
}
impl SolidOrImportedGeometry {
pub(crate) fn ids(&self) -> Vec<uuid::Uuid> {
match self {
SolidOrImportedGeometry::Solid(s) => vec![s.id],
SolidOrImportedGeometry::ImportedGeometry(s) => vec![s.id],
SolidOrImportedGeometry::SolidSet(s) => s.iter().map(|s| s.id).collect(),
}
}
}