Skip to content

Commit b3340f1

Browse files
committed
Merge branch 'main' into mike/solid-modeling-apis
2 parents b876c16 + c414853 commit b3340f1

File tree

4 files changed

+7
-42
lines changed

4 files changed

+7
-42
lines changed

modeling-cmds/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kittycad-modeling-cmds"
3-
version = "0.2.152"
3+
version = "0.2.153"
44
edition = "2021"
55
authors = ["KittyCAD, Inc."]
66
description = "Commands in the KittyCAD Modeling API"

modeling-cmds/openapi/api.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,24 +1605,6 @@
16051605
"description": "ISO 10303-21 (STEP) format.",
16061606
"type": "object",
16071607
"properties": {
1608-
"coords": {
1609-
"description": "Co-ordinate system of input data.\n\nDefaults to the [KittyCAD co-ordinate system].\n\n[KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html",
1610-
"default": {
1611-
"forward": {
1612-
"axis": "y",
1613-
"direction": "negative"
1614-
},
1615-
"up": {
1616-
"axis": "z",
1617-
"direction": "positive"
1618-
}
1619-
},
1620-
"allOf": [
1621-
{
1622-
"$ref": "#/components/schemas/System"
1623-
}
1624-
]
1625-
},
16261608
"split_closed_faces": {
16271609
"description": "Splits all closed faces into two open faces.\n\nDefaults to `false` but is implicitly `true` when importing into the engine.",
16281610
"default": false,

modeling-cmds/src/convert_client_crate.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ mod format {
144144
InputFormat3d::Sldprt(sldprt::import::Options { split_closed_faces }) => {
145145
kt::InputFormat3D::Sldprt { split_closed_faces }
146146
}
147-
InputFormat3d::Step(step::import::Options { split_closed_faces, .. }) => {
147+
InputFormat3d::Step(step::import::Options { split_closed_faces }) => {
148148
kt::InputFormat3D::Step { split_closed_faces }
149149
}
150150
InputFormat3d::Stl(stl::import::Options { coords, units }) => kt::InputFormat3D::Stl {
@@ -171,10 +171,9 @@ mod format {
171171
kt::InputFormat3D::Sldprt { split_closed_faces } => {
172172
Self::Sldprt(crate::format::sldprt::import::Options { split_closed_faces })
173173
}
174-
kt::InputFormat3D::Step { split_closed_faces } => Self::Step(crate::format::step::import::Options {
175-
split_closed_faces,
176-
..Default::default()
177-
}),
174+
kt::InputFormat3D::Step { split_closed_faces } => {
175+
Self::Step(crate::format::step::import::Options { split_closed_faces })
176+
}
178177
kt::InputFormat3D::Stl { coords, units } => Self::Stl(crate::format::stl::import::Options {
179178
coords: coords.into(),
180179
units: units.into(),

modeling-cmds/src/format/step.rs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pub mod import {
99
use super::*;
1010

1111
/// Options for importing STEP format.
12-
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize, JsonSchema, Display, FromStr)]
13-
#[display("coords: {coords}, split_closed_faces: {split_closed_faces}")]
12+
#[derive(Clone, Debug, Default, Eq, Hash, PartialEq, Serialize, Deserialize, JsonSchema, Display, FromStr)]
13+
#[display("split_closed_faces: {split_closed_faces}")]
1414
#[serde(default, rename = "StepImportOptions")]
1515
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1616
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
@@ -20,13 +20,6 @@ pub mod import {
2020
pyo3::pyclass(name = "StepImportOptions")
2121
)]
2222
pub struct Options {
23-
/// Co-ordinate system of input data.
24-
///
25-
/// Defaults to the [KittyCAD co-ordinate system].
26-
///
27-
/// [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html
28-
pub coords: coord::System,
29-
3023
/// Splits all closed faces into two open faces.
3124
///
3225
/// Defaults to `false` but is implicitly `true` when importing into the engine.
@@ -43,15 +36,6 @@ pub mod import {
4336
Default::default()
4437
}
4538
}
46-
47-
impl Default for Options {
48-
fn default() -> Self {
49-
Self {
50-
coords: *coord::KITTYCAD,
51-
split_closed_faces: false,
52-
}
53-
}
54-
}
5539
}
5640

5741
/// Export models in STEP format.

0 commit comments

Comments
 (0)