array len with kw args

This commit is contained in:
arnav
2025-01-09 07:20:48 -05:00
parent 34032b6cb7
commit 8b9580b178
5 changed files with 521 additions and 4 deletions

View File

@ -17,7 +17,7 @@ len(array: [KclValue]) -> KclValue
| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | | Yes |
| `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | The array to get the length of. | Yes |
### Returns

View File

@ -90163,7 +90163,7 @@
"summary": "Get the length of an array.",
"description": "Returns the number of elements in an array.",
"tags": [],
"keywordArguments": false,
"keywordArguments": true,
"args": [
{
"name": "array",
@ -90703,6 +90703,51 @@
}
}
},
{
"description": "A helix.",
"type": "object",
"required": [
"__meta",
"angleStart",
"ccw",
"revolutions",
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Helix"
]
},
"value": {
"description": "The id of the helix.",
"type": "string",
"format": "uuid"
},
"revolutions": {
"description": "Number of revolutions.",
"type": "number",
"format": "double"
},
"angleStart": {
"description": "Start angle (in degrees).",
"type": "number",
"format": "double"
},
"ccw": {
"description": "Is the helix rotation counter clockwise?",
"type": "boolean"
},
"__meta": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Metadata"
}
}
}
},
{
"description": "Data for an imported geometry.",
"type": "object",
@ -90764,6 +90809,31 @@
}
}
},
{
"type": "object",
"required": [
"__meta",
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Module"
]
},
"value": {
"$ref": "#/components/schemas/ModuleId"
},
"__meta": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Metadata"
}
}
}
},
{
"type": "object",
"required": [
@ -92145,6 +92215,12 @@
}
}
},
"ModuleId": {
"description": "Identifier of a source file. Uses a u32 to keep the size small.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"KclNone": {
"description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).",
"type": "object",
@ -92165,7 +92241,8 @@
}
},
"required": true,
"labelRequired": true
"description": "The array to get the length of.",
"labelRequired": false
}
],
"returnValue": {
@ -92700,6 +92777,51 @@
}
}
},
{
"description": "A helix.",
"type": "object",
"required": [
"__meta",
"angleStart",
"ccw",
"revolutions",
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Helix"
]
},
"value": {
"description": "The id of the helix.",
"type": "string",
"format": "uuid"
},
"revolutions": {
"description": "Number of revolutions.",
"type": "number",
"format": "double"
},
"angleStart": {
"description": "Start angle (in degrees).",
"type": "number",
"format": "double"
},
"ccw": {
"description": "Is the helix rotation counter clockwise?",
"type": "boolean"
},
"__meta": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Metadata"
}
}
}
},
{
"description": "Data for an imported geometry.",
"type": "object",
@ -92761,6 +92883,31 @@
}
}
},
{
"type": "object",
"required": [
"__meta",
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Module"
]
},
"value": {
"$ref": "#/components/schemas/ModuleId"
},
"__meta": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Metadata"
}
}
}
},
{
"type": "object",
"required": [
@ -93342,6 +93489,51 @@
}
}
},
{
"description": "A helix.",
"type": "object",
"required": [
"__meta",
"angleStart",
"ccw",
"revolutions",
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Helix"
]
},
"value": {
"description": "The id of the helix.",
"type": "string",
"format": "uuid"
},
"revolutions": {
"description": "Number of revolutions.",
"type": "number",
"format": "double"
},
"angleStart": {
"description": "Start angle (in degrees).",
"type": "number",
"format": "double"
},
"ccw": {
"description": "Is the helix rotation counter clockwise?",
"type": "boolean"
},
"__meta": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Metadata"
}
}
}
},
{
"description": "Data for an imported geometry.",
"type": "object",
@ -93403,6 +93595,31 @@
}
}
},
{
"type": "object",
"required": [
"__meta",
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Module"
]
},
"value": {
"$ref": "#/components/schemas/ModuleId"
},
"__meta": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Metadata"
}
}
}
},
{
"type": "object",
"required": [
@ -94757,6 +94974,12 @@
}
}
},
"ModuleId": {
"description": "Identifier of a source file. Uses a u32 to keep the size small.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"KclNone": {
"description": "KCL value for an optional parameter which was not given an argument. (remember, parameters are in the function declaration, arguments are in the function call/application).",
"type": "object",