Skip to content

Commit 3e3caf0

Browse files
author
gserena
committed
merge in main
2 parents 88efaea + 71bbd51 commit 3e3caf0

File tree

10 files changed

+112
-14
lines changed

10 files changed

+112
-14
lines changed

.github/dependabot.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,60 +8,85 @@ updates:
88
directory: /
99
schedule:
1010
interval: weekly
11-
day: monday
11+
day: saturday
1212
time: '03:00'
1313
timezone: America/Los_Angeles
1414
open-pull-requests-limit: 5
1515
groups:
1616
security:
1717
applies-to: security-updates
18+
exclude-patterns:
19+
- kittycad*
1820
update-types:
19-
- major
2021
- minor
2122
- patch
23+
security-major:
24+
applies-to: security-updates
25+
exclude-patterns:
26+
- kittycad*
27+
update-types:
28+
- major
2229
patch:
2330
applies-to: version-updates
31+
exclude-patterns:
32+
- kittycad*
2433
update-types:
2534
- patch
2635
major:
2736
applies-to: version-updates
37+
exclude-patterns:
38+
- kittycad*
2839
update-types:
2940
- major
3041
minor:
3142
applies-to: version-updates
43+
exclude-patterns:
44+
- kittycad*
3245
update-types:
3346
- minor
3447
- patch
3548
- package-ecosystem: cargo
3649
directory: /
3750
schedule:
3851
interval: weekly
39-
day: monday
52+
day: saturday
4053
time: '03:00'
4154
timezone: America/Los_Angeles
4255
ignore:
4356
- dependency-name: webrtc
4457
open-pull-requests-limit: 5
45-
reviewers:
46-
- adamchalmers
47-
- jessfraz
4858
groups:
4959
security:
5060
applies-to: security-updates
61+
exclude-patterns:
62+
- kittycad*
5163
update-types:
52-
- major
5364
- minor
5465
- patch
66+
security-major:
67+
applies-to: security-updates
68+
exclude-patterns:
69+
- kittycad*
70+
update-types:
71+
- major
5572
patch:
5673
applies-to: version-updates
74+
exclude-patterns:
75+
- kittycad*
5776
update-types:
5877
- patch
5978
major:
6079
applies-to: version-updates
80+
exclude-patterns:
81+
- kittycad*
6182
update-types:
6283
- major
6384
minor:
6485
applies-to: version-updates
86+
exclude-patterns:
87+
- kittycad*
6588
update-types:
6689
- minor
6790
- patch
91+
cooldown:
92+
default-days: 7

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: dtolnay/rust-toolchain@stable
2121
- uses: taiki-e/install-action@cargo-llvm-cov
2222
- uses: taiki-e/install-action@nextest
23-
- uses: Swatinem/rust-cache@v2.8.1
23+
- uses: Swatinem/rust-cache@v2.8.2
2424
- uses: taiki-e/install-action@just
2525

2626
- name: cargo test
@@ -53,7 +53,7 @@ jobs:
5353
uses: actions/setup-node@v6
5454
- name: Install openapi-changes
5555
run: npm i -g @pb33f/openapi-changes
56-
- uses: Swatinem/rust-cache@v2.8.1
56+
- uses: Swatinem/rust-cache@v2.8.2
5757
- name: Run just breaking-api-changes
5858
run: just breaking-api-changes
5959

@@ -67,7 +67,7 @@ jobs:
6767
uses: dtolnay/rust-toolchain@stable
6868
with:
6969
components: clippy
70-
- uses: Swatinem/rust-cache@v2.8.1
70+
- uses: Swatinem/rust-cache@v2.8.2
7171

7272
- name: Check lints
7373
run: just lint
@@ -82,7 +82,7 @@ jobs:
8282
uses: dtolnay/rust-toolchain@stable
8383
with:
8484
targets: wasm32-unknown-unknown
85-
- uses: Swatinem/rust-cache@v2.8.1
85+
- uses: Swatinem/rust-cache@v2.8.2
8686

8787
- name: Check lints
8888
run: just check-wasm
@@ -116,7 +116,7 @@ jobs:
116116
- name: Checkout
117117
uses: actions/checkout@v6
118118
- name: Run codespell
119-
uses: crate-ci/typos@v1.39.2
119+
uses: crate-ci/typos@v1.40.0
120120

121121
cargo-toml-sorted:
122122
name: Check Cargo.toml is sorted

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.148"
3+
version = "0.2.149"
44
edition = "2021"
55
authors = ["KittyCAD, Inc."]
66
description = "Commands in the KittyCAD Modeling API"

modeling-cmds/openapi/api.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,25 @@
642642
"direction"
643643
]
644644
},
645+
"BodyType": {
646+
"description": "Body type determining if the operation will create a solid or a surface.",
647+
"oneOf": [
648+
{
649+
"description": "Create a body that has two caps, creating a solid object.",
650+
"type": "string",
651+
"enum": [
652+
"solid"
653+
]
654+
},
655+
{
656+
"description": "Create only the surface of the body without any caps.",
657+
"type": "string",
658+
"enum": [
659+
"surface"
660+
]
661+
}
662+
]
663+
},
645664
"CameraDragInteractionType": {
646665
"description": "The type of camera drag interaction.",
647666
"oneOf": [
@@ -1829,6 +1848,15 @@
18291848
"description": "Command for extruding a solid 2d.",
18301849
"type": "object",
18311850
"properties": {
1851+
"body_type": {
1852+
"description": "Should this extrude create a solid body or a surface?",
1853+
"default": "solid",
1854+
"allOf": [
1855+
{
1856+
"$ref": "#/components/schemas/BodyType"
1857+
}
1858+
]
1859+
},
18321860
"distance": {
18331861
"description": "How far off the plane to extrude",
18341862
"allOf": [
@@ -1890,6 +1918,15 @@
18901918
"description": "Command for extruding a solid 2d to a reference geometry.",
18911919
"type": "object",
18921920
"properties": {
1921+
"body_type": {
1922+
"description": "Should this extrude create a solid body or a surface?",
1923+
"default": "solid",
1924+
"allOf": [
1925+
{
1926+
"$ref": "#/components/schemas/BodyType"
1927+
}
1928+
]
1929+
},
18931930
"extrude_method": {
18941931
"description": "Should the extrusion create a new object or be part of the existing object.",
18951932
"default": "merge",
@@ -1954,6 +1991,15 @@
19541991
}
19551992
]
19561993
},
1994+
"body_type": {
1995+
"description": "Should this extrude create a solid body or a surface?",
1996+
"default": "solid",
1997+
"allOf": [
1998+
{
1999+
"$ref": "#/components/schemas/BodyType"
2000+
}
2001+
]
2002+
},
19572003
"center_2d": {
19582004
"description": "Center to twist about (relative to 2D sketch)",
19592005
"default": {

modeling-cmds/src/def_enum.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ define_modeling_cmd_enum! {
2323
length_unit::LengthUnit,
2424
shared::{
2525
Angle,
26+
BodyType,
2627
ComponentTransform,
2728
RelativeTo,
2829
CutType, CutTypeV2,
@@ -133,6 +134,9 @@ define_modeling_cmd_enum! {
133134
/// Otherwise, seams resulting from the extrusion will be removed where possible.
134135
#[serde(default)]
135136
pub show_seams: Option<bool>,
137+
/// Should this extrude create a solid body or a surface?
138+
#[serde(default)]
139+
pub body_type: BodyType,
136140
}
137141

138142
/// Command for extruding a solid 2d to a reference geometry.
@@ -155,6 +159,9 @@ define_modeling_cmd_enum! {
155159
/// Should the extrusion create a new object or be part of the existing object.
156160
#[serde(default)]
157161
pub extrude_method: ExtrudeMethod,
162+
/// Should this extrude create a solid body or a surface?
163+
#[serde(default)]
164+
pub body_type: BodyType,
158165
}
159166

160167
fn default_twist_extrude_section_interval() -> Angle {
@@ -187,6 +194,9 @@ define_modeling_cmd_enum! {
187194
pub angle_step_size: Angle,
188195
///The twisted surface loft tolerance
189196
pub tolerance: LengthUnit,
197+
/// Should this extrude create a solid body or a surface?
198+
#[serde(default)]
199+
pub body_type: BodyType,
190200
}
191201

192202
/// Extrude the object along a path.

modeling-cmds/src/shared.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,19 @@ impl From<EngineErrorCode> for http::StatusCode {
10411041
}
10421042
}
10431043

1044+
/// Body type determining if the operation will create a solid or a surface.
1045+
#[derive(Default, Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize, JsonSchema)]
1046+
#[serde(rename_all = "snake_case")]
1047+
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1048+
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1049+
pub enum BodyType {
1050+
///Create a body that has two caps, creating a solid object.
1051+
#[default]
1052+
Solid,
1053+
///Create only the surface of the body without any caps.
1054+
Surface,
1055+
}
1056+
10441057
/// Extrusion method determining if the extrusion will be part of the existing object or an
10451058
/// entirely new object.
10461059
#[derive(Default, Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize, JsonSchema)]
@@ -1342,6 +1355,7 @@ impl_extern_type! {
13421355
// Scene
13431356
SceneSelectionType = "Enums::_SceneSelectionType"
13441357
SceneToolType = "Enums::_SceneToolType"
1358+
BodyType = "Enums::_BodyType"
13451359
EntityType = "Enums::_EntityType"
13461360
AnnotationType = "Enums::_AnnotationType"
13471361
AnnotationTextAlignmentX = "Enums::_AnnotationTextAlignmentX"

modeling-session/examples/cube_png.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ async fn main() -> Result<()> {
114114
opposite: Default::default(),
115115
extrude_method: Default::default(),
116116
show_seams: Default::default(),
117+
body_type: Default::default(),
117118
}
118119
.into(),
119120
)

modeling-session/examples/cube_png_batch.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ async fn main() -> Result<()> {
105105
opposite: Default::default(),
106106
extrude_method: Default::default(),
107107
show_seams: Default::default(),
108+
body_type: Default::default(),
108109
}),
109110
cmd_id: random_id(),
110111
});

modeling-session/examples/lsystem_png_batch.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ async fn main() -> Result<()> {
144144
opposite: Default::default(),
145145
extrude_method: Default::default(),
146146
show_seams: Default::default(),
147+
body_type: Default::default(),
147148
}),
148149
cmd_id: random_id(),
149150
});

0 commit comments

Comments
 (0)