Compare commits
5 Commits
pierremtb/
...
v0.55.0
Author | SHA1 | Date | |
---|---|---|---|
01c6fd53fa | |||
f8306c0275 | |||
900ef9e18d | |||
a46186573c | |||
90f6c1bb04 |
5
.github/workflows/e2e-tests.yml
vendored
5
.github/workflows/e2e-tests.yml
vendored
@ -285,8 +285,7 @@ jobs:
|
|||||||
# TODO: enable namespace-profile-windows-latest once available
|
# TODO: enable namespace-profile-windows-latest once available
|
||||||
os:
|
os:
|
||||||
- "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64"
|
- "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64"
|
||||||
# TODO: renable this when macoOS runner seem more stable
|
- namespace-profile-macos-8-cores
|
||||||
# - namespace-profile-macos-6-cores
|
|
||||||
- windows-latest-8-cores
|
- windows-latest-8-cores
|
||||||
shardIndex: [1, 2, 3, 4]
|
shardIndex: [1, 2, 3, 4]
|
||||||
shardTotal: [4]
|
shardTotal: [4]
|
||||||
@ -296,7 +295,7 @@ jobs:
|
|||||||
isScheduled:
|
isScheduled:
|
||||||
- ${{ github.event_name == 'schedule' }}
|
- ${{ github.event_name == 'schedule' }}
|
||||||
exclude:
|
exclude:
|
||||||
- os: namespace-profile-macos-6-cores
|
- os: namespace-profile-macos-8-cores
|
||||||
isScheduled: true
|
isScheduled: true
|
||||||
- os: windows-latest-8-cores
|
- os: windows-latest-8-cores
|
||||||
isScheduled: true
|
isScheduled: true
|
||||||
|
@ -9,7 +9,7 @@ Extract the provided 2-dimensional sketch's profile's origin value.
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
profileStart(sketch: Sketch): [number]
|
profileStart(profile: Sketch): [number]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ profileStart(sketch: Sketch): [number]
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | | Yes |
|
| `profile` | [`Sketch`](/docs/kcl/types/Sketch) | Profile whose start is being used | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ Extract the provided 2-dimensional sketch's profile's origin's 'x' value.
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
profileStartX(sketch: Sketch): number
|
profileStartX(profile: Sketch): number
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ profileStartX(sketch: Sketch): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | | Yes |
|
| `profile` | [`Sketch`](/docs/kcl/types/Sketch) | Profile whose start is being used | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ Extract the provided 2-dimensional sketch's profile's origin's 'y' value.
|
|||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
profileStartY(sketch: Sketch): number
|
profileStartY(profile: Sketch): number
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ profileStartY(sketch: Sketch): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | | Yes |
|
| `profile` | [`Sketch`](/docs/kcl/types/Sketch) | Profile whose start is being used | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
|
@ -237227,10 +237227,10 @@
|
|||||||
"summary": "Extract the provided 2-dimensional sketch's profile's origin value.",
|
"summary": "Extract the provided 2-dimensional sketch's profile's origin value.",
|
||||||
"description": "",
|
"description": "",
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"keywordArguments": false,
|
"keywordArguments": true,
|
||||||
"args": [
|
"args": [
|
||||||
{
|
{
|
||||||
"name": "sketch",
|
"name": "profile",
|
||||||
"type": "Sketch",
|
"type": "Sketch",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
|
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
|
||||||
@ -238899,7 +238899,8 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"includeInSnippet": true,
|
"includeInSnippet": true,
|
||||||
"labelRequired": true
|
"description": "Profile whose start is being used",
|
||||||
|
"labelRequired": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"returnValue": {
|
"returnValue": {
|
||||||
@ -238931,10 +238932,10 @@
|
|||||||
"summary": "Extract the provided 2-dimensional sketch's profile's origin's 'x' value.",
|
"summary": "Extract the provided 2-dimensional sketch's profile's origin's 'x' value.",
|
||||||
"description": "",
|
"description": "",
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"keywordArguments": false,
|
"keywordArguments": true,
|
||||||
"args": [
|
"args": [
|
||||||
{
|
{
|
||||||
"name": "sketch",
|
"name": "profile",
|
||||||
"type": "Sketch",
|
"type": "Sketch",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
|
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
|
||||||
@ -240603,7 +240604,8 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"includeInSnippet": true,
|
"includeInSnippet": true,
|
||||||
"labelRequired": true
|
"description": "Profile whose start is being used",
|
||||||
|
"labelRequired": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"returnValue": {
|
"returnValue": {
|
||||||
@ -240630,10 +240632,10 @@
|
|||||||
"summary": "Extract the provided 2-dimensional sketch's profile's origin's 'y' value.",
|
"summary": "Extract the provided 2-dimensional sketch's profile's origin's 'y' value.",
|
||||||
"description": "",
|
"description": "",
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"keywordArguments": false,
|
"keywordArguments": true,
|
||||||
"args": [
|
"args": [
|
||||||
{
|
{
|
||||||
"name": "sketch",
|
"name": "profile",
|
||||||
"type": "Sketch",
|
"type": "Sketch",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
|
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
|
||||||
@ -242302,7 +242304,8 @@
|
|||||||
},
|
},
|
||||||
"required": true,
|
"required": true,
|
||||||
"includeInSnippet": true,
|
"includeInSnippet": true,
|
||||||
"labelRequired": true
|
"description": "Profile whose start is being used",
|
||||||
|
"labelRequired": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"returnValue": {
|
"returnValue": {
|
||||||
|
20
rust/Cargo.lock
generated
20
rust/Cargo.lock
generated
@ -1792,7 +1792,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-bumper"
|
name = "kcl-bumper"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
@ -1803,7 +1803,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-derive-docs"
|
name = "kcl-derive-docs"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@ -1822,7 +1822,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-directory-test-macro"
|
name = "kcl-directory-test-macro"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -1831,7 +1831,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-language-server"
|
name = "kcl-language-server"
|
||||||
version = "0.2.62"
|
version = "0.2.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
@ -1852,7 +1852,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-language-server-release"
|
name = "kcl-language-server-release"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
@ -1872,7 +1872,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-lib"
|
name = "kcl-lib"
|
||||||
version = "0.2.62"
|
version = "0.2.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"approx 0.5.1",
|
"approx 0.5.1",
|
||||||
@ -1943,7 +1943,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-python-bindings"
|
name = "kcl-python-bindings"
|
||||||
version = "0.3.62"
|
version = "0.3.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"kcl-lib",
|
"kcl-lib",
|
||||||
@ -1958,7 +1958,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-test-server"
|
name = "kcl-test-server"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"hyper 0.14.32",
|
"hyper 0.14.32",
|
||||||
@ -1971,7 +1971,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-to-core"
|
name = "kcl-to-core"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@ -1985,7 +1985,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-wasm-lib"
|
name = "kcl-wasm-lib"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bson",
|
"bson",
|
||||||
"console_error_panic_hook",
|
"console_error_panic_hook",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "kcl-bumper"
|
name = "kcl-bumper"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/KittyCAD/modeling-api"
|
repository = "https://github.com/KittyCAD/modeling-api"
|
||||||
rust-version = "1.76"
|
rust-version = "1.76"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-derive-docs"
|
name = "kcl-derive-docs"
|
||||||
description = "A tool for generating documentation from Rust derive macros"
|
description = "A tool for generating documentation from Rust derive macros"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/KittyCAD/modeling-app"
|
repository = "https://github.com/KittyCAD/modeling-app"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-directory-test-macro"
|
name = "kcl-directory-test-macro"
|
||||||
description = "A tool for generating tests from a directory of kcl files"
|
description = "A tool for generating tests from a directory of kcl files"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/KittyCAD/modeling-app"
|
repository = "https://github.com/KittyCAD/modeling-app"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-language-server-release"
|
name = "kcl-language-server-release"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
||||||
publish = false
|
publish = false
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
name = "kcl-language-server"
|
name = "kcl-language-server"
|
||||||
description = "A language server for KCL."
|
description = "A language server for KCL."
|
||||||
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
||||||
version = "0.2.62"
|
version = "0.2.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-lib"
|
name = "kcl-lib"
|
||||||
description = "KittyCAD Language implementation and tools"
|
description = "KittyCAD Language implementation and tools"
|
||||||
version = "0.2.62"
|
version = "0.2.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/KittyCAD/modeling-app"
|
repository = "https://github.com/KittyCAD/modeling-app"
|
||||||
|
@ -1820,18 +1820,6 @@ const bracket = startSketchOn(XY)
|
|||||||
parse_execute(ast).await.unwrap();
|
parse_execute(ast).await.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test(flavor = "multi_thread")]
|
|
||||||
async fn test_bad_arg_count_std() {
|
|
||||||
let ast = "startSketchOn(XY)
|
|
||||||
|> startProfileAt([0, 0], %)
|
|
||||||
|> profileStartX()";
|
|
||||||
assert!(parse_execute(ast)
|
|
||||||
.await
|
|
||||||
.unwrap_err()
|
|
||||||
.message()
|
|
||||||
.contains("Expected a sketch argument"));
|
|
||||||
}
|
|
||||||
|
|
||||||
#[tokio::test(flavor = "multi_thread")]
|
#[tokio::test(flavor = "multi_thread")]
|
||||||
async fn test_unary_operator_not_succeeds() {
|
async fn test_unary_operator_not_succeeds() {
|
||||||
let ast = r#"
|
let ast = r#"
|
||||||
|
@ -675,28 +675,6 @@ impl Args {
|
|||||||
Ok((sketches, sketch))
|
Ok((sketches, sketch))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn get_sketch(&self, exec_state: &mut ExecState) -> Result<Sketch, KclError> {
|
|
||||||
let Some(arg0) = self.args.first() else {
|
|
||||||
return Err(KclError::Semantic(KclErrorDetails {
|
|
||||||
message: "Expected a sketch argument".to_owned(),
|
|
||||||
source_ranges: vec![self.source_range],
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
let sarg = arg0
|
|
||||||
.value
|
|
||||||
.coerce(&RuntimeType::Primitive(PrimitiveType::Sketch), exec_state)
|
|
||||||
.map_err(|_| {
|
|
||||||
KclError::Type(KclErrorDetails {
|
|
||||||
message: format!("Expected a sketch, found {}", arg0.value.human_friendly_type()),
|
|
||||||
source_ranges: vec![self.source_range],
|
|
||||||
})
|
|
||||||
})?;
|
|
||||||
match sarg {
|
|
||||||
KclValue::Sketch { value } => Ok(*value),
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) fn get_data<'a, T>(&'a self) -> Result<T, KclError>
|
pub(crate) fn get_data<'a, T>(&'a self) -> Result<T, KclError>
|
||||||
where
|
where
|
||||||
T: FromArgs<'a>,
|
T: FromArgs<'a>,
|
||||||
|
@ -1454,7 +1454,7 @@ pub(crate) async fn inner_start_profile_at(
|
|||||||
|
|
||||||
/// Returns the X component of the sketch profile start point.
|
/// Returns the X component of the sketch profile start point.
|
||||||
pub async fn profile_start_x(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn profile_start_x(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let sketch: Sketch = args.get_sketch(exec_state)?;
|
let sketch: Sketch = args.get_unlabeled_kw_arg_typed("sketch", &RuntimeType::sketch(), exec_state)?;
|
||||||
let ty = sketch.units.into();
|
let ty = sketch.units.into();
|
||||||
let x = inner_profile_start_x(sketch)?;
|
let x = inner_profile_start_x(sketch)?;
|
||||||
Ok(args.make_user_val_from_f64_with_type(TyF64::new(x, ty)))
|
Ok(args.make_user_val_from_f64_with_type(TyF64::new(x, ty)))
|
||||||
@ -1471,15 +1471,20 @@ pub async fn profile_start_x(exec_state: &mut ExecState, args: Args) -> Result<K
|
|||||||
/// |> angledLine(angle = 30, endAbsoluteX = profileStartX(%))
|
/// |> angledLine(angle = 30, endAbsoluteX = profileStartX(%))
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
name = "profileStartX"
|
name = "profileStartX",
|
||||||
|
keywords = true,
|
||||||
|
unlabeled_first = true,
|
||||||
|
args = {
|
||||||
|
profile = {docs = "Profile whose start is being used"},
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
pub(crate) fn inner_profile_start_x(sketch: Sketch) -> Result<f64, KclError> {
|
pub(crate) fn inner_profile_start_x(profile: Sketch) -> Result<f64, KclError> {
|
||||||
Ok(sketch.start.to[0])
|
Ok(profile.start.to[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the Y component of the sketch profile start point.
|
/// Returns the Y component of the sketch profile start point.
|
||||||
pub async fn profile_start_y(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn profile_start_y(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let sketch: Sketch = args.get_sketch(exec_state)?;
|
let sketch: Sketch = args.get_unlabeled_kw_arg_typed("sketch", &RuntimeType::sketch(), exec_state)?;
|
||||||
let ty = sketch.units.into();
|
let ty = sketch.units.into();
|
||||||
let x = inner_profile_start_y(sketch)?;
|
let x = inner_profile_start_y(sketch)?;
|
||||||
Ok(args.make_user_val_from_f64_with_type(TyF64::new(x, ty)))
|
Ok(args.make_user_val_from_f64_with_type(TyF64::new(x, ty)))
|
||||||
@ -1495,15 +1500,20 @@ pub async fn profile_start_y(exec_state: &mut ExecState, args: Args) -> Result<K
|
|||||||
/// |> angledLine(angle = 30, endAbsoluteY = profileStartY(%))
|
/// |> angledLine(angle = 30, endAbsoluteY = profileStartY(%))
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
name = "profileStartY"
|
name = "profileStartY",
|
||||||
|
keywords = true,
|
||||||
|
unlabeled_first = true,
|
||||||
|
args = {
|
||||||
|
profile = {docs = "Profile whose start is being used"},
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
pub(crate) fn inner_profile_start_y(sketch: Sketch) -> Result<f64, KclError> {
|
pub(crate) fn inner_profile_start_y(profile: Sketch) -> Result<f64, KclError> {
|
||||||
Ok(sketch.start.to[1])
|
Ok(profile.start.to[1])
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the sketch profile start point.
|
/// Returns the sketch profile start point.
|
||||||
pub async fn profile_start(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn profile_start(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let sketch: Sketch = args.get_sketch(exec_state)?;
|
let sketch: Sketch = args.get_unlabeled_kw_arg_typed("sketch", &RuntimeType::sketch(), exec_state)?;
|
||||||
let ty = sketch.units.into();
|
let ty = sketch.units.into();
|
||||||
let point = inner_profile_start(sketch)?;
|
let point = inner_profile_start(sketch)?;
|
||||||
Ok(KclValue::from_point2d(point, ty, args.into()))
|
Ok(KclValue::from_point2d(point, ty, args.into()))
|
||||||
@ -1522,10 +1532,15 @@ pub async fn profile_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
|||||||
/// |> extrude(length = 20)
|
/// |> extrude(length = 20)
|
||||||
/// ```
|
/// ```
|
||||||
#[stdlib {
|
#[stdlib {
|
||||||
name = "profileStart"
|
name = "profileStart",
|
||||||
|
keywords = true,
|
||||||
|
unlabeled_first = true,
|
||||||
|
args = {
|
||||||
|
profile = {docs = "Profile whose start is being used"},
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
pub(crate) fn inner_profile_start(sketch: Sketch) -> Result<[f64; 2], KclError> {
|
pub(crate) fn inner_profile_start(profile: Sketch) -> Result<[f64; 2], KclError> {
|
||||||
Ok(sketch.start.to)
|
Ok(profile.start.to)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Close the current sketch.
|
/// Close the current sketch.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-python-bindings"
|
name = "kcl-python-bindings"
|
||||||
version = "0.3.62"
|
version = "0.3.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/kittycad/modeling-app"
|
repository = "https://github.com/kittycad/modeling-app"
|
||||||
exclude = ["tests/*", "files/*", "venv/*"]
|
exclude = ["tests/*", "files/*", "venv/*"]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-test-server"
|
name = "kcl-test-server"
|
||||||
description = "A test server for KCL"
|
description = "A test server for KCL"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-to-core"
|
name = "kcl-to-core"
|
||||||
description = "Utility methods to convert kcl to engine core executable tests"
|
description = "Utility methods to convert kcl to engine core executable tests"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/KittyCAD/modeling-app"
|
repository = "https://github.com/KittyCAD/modeling-app"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-wasm-lib"
|
name = "kcl-wasm-lib"
|
||||||
version = "0.1.62"
|
version = "0.1.63"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/KittyCAD/modeling-app"
|
repository = "https://github.com/KittyCAD/modeling-app"
|
||||||
rust-version = "1.83"
|
rust-version = "1.83"
|
||||||
|
@ -7,7 +7,7 @@ export const Auth = ({ children }: React.PropsWithChildren) => {
|
|||||||
const isLoggingIn = authState.matches('checkIfLoggedIn')
|
const isLoggingIn = authState.matches('checkIfLoggedIn')
|
||||||
|
|
||||||
return isLoggingIn ? (
|
return isLoggingIn ? (
|
||||||
<Loading className="h-screen">
|
<Loading>
|
||||||
<span data-testid="initial-load">Loading Design Studio...</span>
|
<span data-testid="initial-load">Loading Design Studio...</span>
|
||||||
</Loading>
|
</Loading>
|
||||||
) : (
|
) : (
|
||||||
|
@ -1013,13 +1013,18 @@ export class SceneEntities {
|
|||||||
// Snapping logic for the profile start handle
|
// Snapping logic for the profile start handle
|
||||||
if (intersectsProfileStart) {
|
if (intersectsProfileStart) {
|
||||||
const originCoords = createArrayExpression([
|
const originCoords = createArrayExpression([
|
||||||
createCallExpressionStdLib('profileStartX', [
|
createCallExpressionStdLibKw(
|
||||||
|
'profileStartX',
|
||||||
createPipeSubstitution(),
|
createPipeSubstitution(),
|
||||||
]),
|
[]
|
||||||
createCallExpressionStdLib('profileStartY', [
|
),
|
||||||
|
createCallExpressionStdLibKw(
|
||||||
|
'profileStartY',
|
||||||
createPipeSubstitution(),
|
createPipeSubstitution(),
|
||||||
]),
|
[]
|
||||||
|
),
|
||||||
])
|
])
|
||||||
|
|
||||||
modifiedAst = addCallExpressionsToPipe({
|
modifiedAst = addCallExpressionsToPipe({
|
||||||
node: this.kclManager.ast,
|
node: this.kclManager.ast,
|
||||||
variables: this.kclManager.variables,
|
variables: this.kclManager.variables,
|
||||||
@ -2213,13 +2218,18 @@ export class SceneEntities {
|
|||||||
modded = moddedResult.modifiedAst
|
modded = moddedResult.modifiedAst
|
||||||
if (intersectsProfileStart) {
|
if (intersectsProfileStart) {
|
||||||
const originCoords = createArrayExpression([
|
const originCoords = createArrayExpression([
|
||||||
createCallExpressionStdLib('profileStartX', [
|
createCallExpressionStdLibKw(
|
||||||
|
'profileStartX',
|
||||||
createPipeSubstitution(),
|
createPipeSubstitution(),
|
||||||
]),
|
[]
|
||||||
createCallExpressionStdLib('profileStartY', [
|
),
|
||||||
|
createCallExpressionStdLibKw(
|
||||||
|
'profileStartY',
|
||||||
createPipeSubstitution(),
|
createPipeSubstitution(),
|
||||||
]),
|
[]
|
||||||
|
),
|
||||||
])
|
])
|
||||||
|
|
||||||
const arcToCallExp = getNodeFromPath<CallExpression>(
|
const arcToCallExp = getNodeFromPath<CallExpression>(
|
||||||
modded,
|
modded,
|
||||||
mod.pathToNode,
|
mod.pathToNode,
|
||||||
|
@ -430,7 +430,7 @@ export const EngineStream = (props: {
|
|||||||
{![EngineStreamState.Playing, EngineStreamState.Paused].some(
|
{![EngineStreamState.Playing, EngineStreamState.Paused].some(
|
||||||
(s) => s === engineStreamState.value
|
(s) => s === engineStreamState.value
|
||||||
) && (
|
) && (
|
||||||
<Loading dataTestId="loading-engine" className="fixed inset-0 h-screen">
|
<Loading dataTestId="loading-engine" className="fixed inset-0">
|
||||||
Connecting to engine
|
Connecting to engine
|
||||||
</Loading>
|
</Loading>
|
||||||
)}
|
)}
|
||||||
|
@ -111,7 +111,7 @@ const Loading = ({ children, className, dataTestId }: LoadingProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`body-bg flex flex-col items-center justify-center ${colorClass} ${className}`}
|
className={`body-bg flex flex-col items-center justify-center h-screen ${colorClass} ${className}`}
|
||||||
data-testid={dataTestId ? dataTestId : 'loading'}
|
data-testid={dataTestId ? dataTestId : 'loading'}
|
||||||
>
|
>
|
||||||
{isUnrecoverableError ? (
|
{isUnrecoverableError ? (
|
||||||
|
@ -81,12 +81,16 @@ export const getRectangleCallExpressions = (
|
|||||||
createLabeledArg(
|
createLabeledArg(
|
||||||
ARG_END_ABSOLUTE,
|
ARG_END_ABSOLUTE,
|
||||||
createArrayExpression([
|
createArrayExpression([
|
||||||
createCallExpressionStdLib('profileStartX', [
|
createCallExpressionStdLibKw(
|
||||||
|
'profileStartX',
|
||||||
createPipeSubstitution(),
|
createPipeSubstitution(),
|
||||||
]),
|
[]
|
||||||
createCallExpressionStdLib('profileStartY', [
|
),
|
||||||
|
createCallExpressionStdLibKw(
|
||||||
|
'profileStartY',
|
||||||
createPipeSubstitution(),
|
createPipeSubstitution(),
|
||||||
]),
|
[]
|
||||||
|
),
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
]), // close the rectangle
|
]), // close the rectangle
|
||||||
|
@ -346,7 +346,7 @@ const Home = () => {
|
|||||||
className="flex-1 overflow-y-auto pr-2 pb-24"
|
className="flex-1 overflow-y-auto pr-2 pb-24"
|
||||||
>
|
>
|
||||||
{state?.matches('Reading projects') ? (
|
{state?.matches('Reading projects') ? (
|
||||||
<Loading className="h-screen">Loading your Projects...</Loading>
|
<Loading>Loading your Projects...</Loading>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
{searchResults.length > 0 ? (
|
{searchResults.length > 0 ? (
|
||||||
|
Reference in New Issue
Block a user