AST function nodes no longer have stdlib function members (#1031)
* AST function nodes no longer have stdlib function members IMO the AST should not need an actual pointer to a stdlib function -- that is a completely separate concern from the AST. Instead, the AST nodes can just store function names, and the executor will have a stdlib which it can look up those names in. * Fix tests * Update snapshot tests
This commit is contained in:
@ -331,9 +331,6 @@ const myVar = funcN(1, 2)`
|
||||
raw: '2',
|
||||
},
|
||||
],
|
||||
function: {
|
||||
type: 'InMemory',
|
||||
},
|
||||
optional: false,
|
||||
},
|
||||
},
|
||||
@ -403,7 +400,6 @@ describe('testing pipe operator special', () => {
|
||||
],
|
||||
},
|
||||
],
|
||||
function: expect.any(Object),
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
@ -440,7 +436,6 @@ describe('testing pipe operator special', () => {
|
||||
},
|
||||
{ type: 'PipeSubstitution', start: 59, end: 60 },
|
||||
],
|
||||
function: expect.any(Object),
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
@ -513,7 +508,6 @@ describe('testing pipe operator special', () => {
|
||||
},
|
||||
{ type: 'PipeSubstitution', start: 105, end: 106 },
|
||||
],
|
||||
function: expect.any(Object),
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
@ -550,7 +544,6 @@ describe('testing pipe operator special', () => {
|
||||
},
|
||||
{ type: 'PipeSubstitution', start: 128, end: 129 },
|
||||
],
|
||||
function: expect.any(Object),
|
||||
optional: false,
|
||||
},
|
||||
{
|
||||
@ -573,9 +566,6 @@ describe('testing pipe operator special', () => {
|
||||
},
|
||||
{ type: 'PipeSubstitution', start: 143, end: 144 },
|
||||
],
|
||||
function: {
|
||||
type: 'InMemory',
|
||||
},
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
@ -655,9 +645,6 @@ describe('testing pipe operator special', () => {
|
||||
end: 35,
|
||||
},
|
||||
],
|
||||
function: {
|
||||
type: 'InMemory',
|
||||
},
|
||||
optional: false,
|
||||
},
|
||||
],
|
||||
@ -1567,7 +1554,6 @@ describe('test UnaryExpression', () => {
|
||||
{ type: 'Literal', start: 19, end: 20, value: 4, raw: '4' },
|
||||
{ type: 'Literal', start: 22, end: 25, value: 100, raw: '100' },
|
||||
],
|
||||
function: expect.any(Object),
|
||||
optional: false,
|
||||
},
|
||||
})
|
||||
@ -1601,12 +1587,10 @@ describe('testing nested call expressions', () => {
|
||||
{ type: 'Literal', start: 34, end: 35, value: 5, raw: '5' },
|
||||
{ type: 'Literal', start: 37, end: 38, value: 3, raw: '3' },
|
||||
],
|
||||
function: expect.any(Object),
|
||||
optional: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
function: expect.any(Object),
|
||||
optional: false,
|
||||
})
|
||||
})
|
||||
@ -1638,7 +1622,6 @@ describe('should recognise callExpresions in binaryExpressions', () => {
|
||||
},
|
||||
{ type: 'PipeSubstitution', start: 25, end: 26 },
|
||||
],
|
||||
function: expect.any(Object),
|
||||
optional: false,
|
||||
},
|
||||
right: { type: 'Literal', value: 1, raw: '1', start: 30, end: 31 },
|
||||
|
@ -480,21 +480,6 @@ export function createCallExpressionStdLib(
|
||||
end: 0,
|
||||
name,
|
||||
},
|
||||
function: {
|
||||
type: 'StdLib',
|
||||
func: {
|
||||
// We only need the name here to map it back when it serializes
|
||||
// to rust, don't worry about the rest.
|
||||
name,
|
||||
summary: '',
|
||||
description: '',
|
||||
tags: [],
|
||||
returnValue: { type: '', required: false, name: '', schema: {} },
|
||||
args: [],
|
||||
unpublished: false,
|
||||
deprecated: false,
|
||||
},
|
||||
},
|
||||
optional: false,
|
||||
arguments: args,
|
||||
}
|
||||
@ -514,9 +499,6 @@ export function createCallExpression(
|
||||
end: 0,
|
||||
name,
|
||||
},
|
||||
function: {
|
||||
type: 'InMemory',
|
||||
},
|
||||
optional: false,
|
||||
arguments: args,
|
||||
}
|
||||
|
@ -6,8 +6,7 @@ use anyhow::Result;
|
||||
use parse_display::{Display, FromStr};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Map;
|
||||
use serde_json::Value as JValue;
|
||||
use serde_json::{Map, Value as JValue};
|
||||
use tower_lsp::lsp_types::{CompletionItem, CompletionItemKind, DocumentSymbol, Range as LspRange, SymbolKind};
|
||||
|
||||
pub use self::literal_value::LiteralValue;
|
||||
@ -862,7 +861,6 @@ pub struct CallExpression {
|
||||
pub callee: Identifier,
|
||||
pub arguments: Vec<Value>,
|
||||
pub optional: bool,
|
||||
pub function: Function,
|
||||
}
|
||||
|
||||
impl_value_meta!(CallExpression);
|
||||
@ -875,22 +873,12 @@ impl From<CallExpression> for Value {
|
||||
|
||||
impl CallExpression {
|
||||
pub fn new(name: &str, arguments: Vec<Value>) -> Result<Self, KclError> {
|
||||
// Create our stdlib.
|
||||
let stdlib = crate::std::StdLib::new();
|
||||
let func = stdlib.get(name).ok_or_else(|| {
|
||||
KclError::UndefinedValue(KclErrorDetails {
|
||||
message: format!("Function {} is not defined", name),
|
||||
source_ranges: vec![],
|
||||
})
|
||||
})?;
|
||||
|
||||
Ok(Self {
|
||||
start: 0,
|
||||
end: 0,
|
||||
callee: Identifier::new(name),
|
||||
arguments,
|
||||
optional: false,
|
||||
function: Function::StdLib { func },
|
||||
})
|
||||
}
|
||||
|
||||
@ -972,8 +960,8 @@ impl CallExpression {
|
||||
fn_args.push(result);
|
||||
}
|
||||
|
||||
match &self.function {
|
||||
Function::StdLib { func } => {
|
||||
match ctx.stdlib.get(&self.callee.name) {
|
||||
Some(func) => {
|
||||
// Attempt to call the function.
|
||||
let args = crate::std::Args::new(fn_args, self.into(), ctx.clone());
|
||||
let result = func.std_lib_fn()(args).await?;
|
||||
@ -985,7 +973,8 @@ impl CallExpression {
|
||||
Ok(result)
|
||||
}
|
||||
}
|
||||
Function::InMemory => {
|
||||
// Must be user-defined then
|
||||
None => {
|
||||
let func = memory.get(&fn_name, self.into())?;
|
||||
let result = func
|
||||
.call_fn(fn_args, memory.clone(), ctx.clone())
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! The executor for the AST.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
use anyhow::Result;
|
||||
use kittycad::types::{Color, ModelingCmd, Point3D};
|
||||
@ -10,9 +10,10 @@ use serde::{Deserialize, Serialize};
|
||||
use tower_lsp::lsp_types::{Position as LspPosition, Range as LspRange};
|
||||
|
||||
use crate::{
|
||||
ast::types::{BodyItem, Function, FunctionExpression, Value},
|
||||
ast::types::{BodyItem, FunctionExpression, Value},
|
||||
engine::{EngineConnection, EngineManager},
|
||||
errors::{KclError, KclErrorDetails},
|
||||
std::StdLib,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
||||
@ -776,6 +777,7 @@ impl Default for PipeInfo {
|
||||
pub struct ExecutorContext {
|
||||
pub engine: EngineConnection,
|
||||
pub planes: DefaultPlanes,
|
||||
pub stdlib: Arc<StdLib>,
|
||||
}
|
||||
|
||||
/// Execute a AST's program.
|
||||
@ -826,7 +828,9 @@ pub async fn execute(
|
||||
}
|
||||
}
|
||||
let _show_fn = Box::new(crate::std::Show);
|
||||
if let Function::StdLib { func: _show_fn } = &call_expr.function {
|
||||
if let Some(func) = ctx.stdlib.get(&call_expr.callee.name) {
|
||||
use crate::docs::StdLibFn;
|
||||
if func.name() == _show_fn.name() {
|
||||
if options != BodyType::Root {
|
||||
return Err(KclError::Semantic(KclErrorDetails {
|
||||
message: "Cannot call show outside of a root".to_string(),
|
||||
@ -835,6 +839,7 @@ pub async fn execute(
|
||||
}
|
||||
|
||||
memory.return_ = Some(ProgramReturn::Arguments(call_expr.arguments.clone()));
|
||||
}
|
||||
} else if let Some(func) = memory.clone().root.get(&fn_name) {
|
||||
let result = func.call_fn(args.clone(), memory.clone(), ctx.clone()).await?;
|
||||
|
||||
@ -1011,7 +1016,11 @@ mod tests {
|
||||
let mut mem: ProgramMemory = Default::default();
|
||||
let engine = EngineConnection::new().await?;
|
||||
let planes = DefaultPlanes::new(&engine).await?;
|
||||
let ctx = ExecutorContext { engine, planes };
|
||||
let ctx = ExecutorContext {
|
||||
engine,
|
||||
planes,
|
||||
stdlib: Arc::new(StdLib::default()),
|
||||
};
|
||||
let memory = execute(program, &mut mem, BodyType::Root, &ctx).await?;
|
||||
|
||||
Ok(memory)
|
||||
|
@ -6,6 +6,7 @@ use winnow::{
|
||||
token::{any, one_of},
|
||||
};
|
||||
|
||||
use super::{math::BinaryExpressionToken, PIPE_OPERATOR, PIPE_SUBSTITUTION_OPERATOR};
|
||||
use crate::{
|
||||
ast::types::{
|
||||
ArrayExpression, BinaryExpression, BinaryOperator, BinaryPart, BodyItem, CallExpression, CommentStyle,
|
||||
@ -17,20 +18,13 @@ use crate::{
|
||||
errors::{KclError, KclErrorDetails},
|
||||
executor::SourceRange,
|
||||
parser::parser_impl::error::ContextError,
|
||||
std::StdLib,
|
||||
token::{Token, TokenType},
|
||||
};
|
||||
|
||||
use super::{math::BinaryExpressionToken, PIPE_OPERATOR, PIPE_SUBSTITUTION_OPERATOR};
|
||||
|
||||
mod error;
|
||||
|
||||
type PResult<O, E = error::ContextError> = winnow::prelude::PResult<O, E>;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref STDLIB: StdLib = StdLib::new();
|
||||
}
|
||||
|
||||
type TokenSlice<'slice, 'input> = &'slice mut &'input [Token];
|
||||
|
||||
pub fn run_parser(i: TokenSlice) -> Result<Program, KclError> {
|
||||
@ -1237,7 +1231,7 @@ fn parameters(i: TokenSlice) -> PResult<Vec<Identifier>> {
|
||||
impl Identifier {
|
||||
fn into_valid_binding_name(self) -> Result<Identifier, KclError> {
|
||||
// Make sure they are not assigning a variable to a stdlib function.
|
||||
if STDLIB.fns.contains_key(&self.name) {
|
||||
if crate::std::name_in_stdlib(&self.name) {
|
||||
return Err(KclError::Syntax(KclErrorDetails {
|
||||
source_ranges: vec![SourceRange([self.start, self.end])],
|
||||
message: format!("Cannot assign a variable to a reserved keyword: {}", self.name),
|
||||
@ -1261,18 +1255,12 @@ fn fn_call(i: TokenSlice) -> PResult<CallExpression> {
|
||||
let _ = terminated(open_paren, opt(whitespace)).parse_next(i)?;
|
||||
let args = arguments(i)?;
|
||||
let end = preceded(opt(whitespace), close_paren).parse_next(i)?.end;
|
||||
let function = if let Some(stdlib_fn) = STDLIB.get(&fn_name.name) {
|
||||
crate::ast::types::Function::StdLib { func: stdlib_fn }
|
||||
} else {
|
||||
crate::ast::types::Function::InMemory
|
||||
};
|
||||
Ok(CallExpression {
|
||||
start: fn_name.start,
|
||||
end,
|
||||
callee: fn_name,
|
||||
arguments: args,
|
||||
optional: false,
|
||||
function,
|
||||
})
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -74,942 +74,7 @@ expression: actual
|
||||
]
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "lineTo",
|
||||
"summary": "Draw a line to a point.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineToData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line to a point.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "sketch_group",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -74,10 +74,7 @@ expression: actual
|
||||
"name": "firstPrimeNumber"
|
||||
},
|
||||
"arguments": [],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "InMemory"
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -88,10 +88,7 @@ expression: actual
|
||||
"name": "false"
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "InMemory"
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -42,503 +42,7 @@ expression: actual
|
||||
"name": "p"
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "startSketchAt",
|
||||
"summary": "Start a sketch at a given point on the 'XY' plane.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -49,10 +49,7 @@ expression: actual
|
||||
"raw": "1"
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "InMemory"
|
||||
}
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
"type": "CallExpression",
|
||||
@ -75,10 +72,7 @@ expression: actual
|
||||
"raw": "2"
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "InMemory"
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -67,942 +67,7 @@ expression: actual
|
||||
]
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "lineTo",
|
||||
"summary": "Draw a line to a point.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineToData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line to a point.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "sketch_group",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -102,942 +102,7 @@ expression: actual
|
||||
]
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "lineTo",
|
||||
"summary": "Draw a line to a point.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineToData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line to a point.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "sketch_group",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -67,942 +67,7 @@ expression: actual
|
||||
]
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "lineTo",
|
||||
"summary": "Draw a line to a point.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineToData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line to a point.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "sketch_group",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -102,942 +102,7 @@ expression: actual
|
||||
]
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "lineTo",
|
||||
"summary": "Draw a line to a point.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineToData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line to a point.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "sketch_group",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -102,942 +102,7 @@ expression: actual
|
||||
]
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "lineTo",
|
||||
"summary": "Draw a line to a point.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineToData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line to a point.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "sketch_group",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -59,503 +59,7 @@ expression: actual
|
||||
]
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "startSketchAt",
|
||||
"summary": "Start a sketch at a given point on the 'XY' plane.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -47,47 +47,7 @@ expression: actual
|
||||
"name": "aIdentifier"
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "log",
|
||||
"summary": "Computes the logarithm of the number with respect to an arbitrary base.",
|
||||
"description": "The result might not be correctly rounded owing to implementation details; `log2()` can produce more accurate results for base 2, and `log10()` can produce more accurate results for base 10.",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "num",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "base",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -53,942 +53,7 @@ expression: actual
|
||||
"end": 14
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "line",
|
||||
"summary": "Draw a line.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "sketch_group",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -77,85 +77,11 @@ expression: actual
|
||||
"raw": "4"
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "legLen",
|
||||
"summary": "Returns the length of the given leg.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "hypotenuse",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "leg",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "min",
|
||||
"summary": "Computes the minimum of the given arguments.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "args",
|
||||
"type": "[number]",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -69,47 +69,7 @@ expression: actual
|
||||
"raw": "4"
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "legLen",
|
||||
"summary": "Returns the length of the given leg.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "hypotenuse",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "leg",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -121,41 +81,7 @@ expression: actual
|
||||
"raw": "5"
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "min",
|
||||
"summary": "Computes the minimum of the given arguments.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "args",
|
||||
"type": "[number]",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "number",
|
||||
"schema": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -78,10 +78,7 @@ expression: actual
|
||||
"end": 35
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "InMemory"
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
],
|
||||
"nonCodeMeta": {
|
||||
|
@ -42,503 +42,7 @@ expression: actual
|
||||
"name": "pos"
|
||||
}
|
||||
],
|
||||
"optional": false,
|
||||
"function": {
|
||||
"type": "StdLib",
|
||||
"func": {
|
||||
"name": "startSketchAt",
|
||||
"summary": "Start a sketch at a given point on the 'XY' plane.",
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"args": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "LineData",
|
||||
"schema": {
|
||||
"description": "Data to draw a line.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "A point with a tag.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"tag": {
|
||||
"description": "The tag.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"returnValue": {
|
||||
"name": "",
|
||||
"type": "SketchGroup",
|
||||
"schema": {
|
||||
"description": "A sketch group is a collection of paths.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__meta",
|
||||
"id",
|
||||
"position",
|
||||
"rotation",
|
||||
"start",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"__meta": {
|
||||
"description": "Metadata.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "The id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"planeId": {
|
||||
"description": "The plane id of the sketch group.",
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"nullable": true
|
||||
},
|
||||
"position": {
|
||||
"description": "The position of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 3,
|
||||
"minItems": 3
|
||||
},
|
||||
"rotation": {
|
||||
"description": "The rotation of the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 4,
|
||||
"minItems": 4
|
||||
},
|
||||
"start": {
|
||||
"description": "The starting path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"description": "The paths in the sketch group.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A path.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "A path that goes to a point.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toPoint"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A path that is horizontal.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type",
|
||||
"x"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"horizontal"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "An angled line to.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"angledLineTo"
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"description": "The x coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"y": {
|
||||
"description": "The y coordinate.",
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A base path.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"__geoMeta",
|
||||
"from",
|
||||
"name",
|
||||
"to",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"__geoMeta": {
|
||||
"description": "Metadata.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"sourceRange"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "The id of the geometry.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceRange": {
|
||||
"description": "The source range.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "uint",
|
||||
"minimum": 0.0
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"from": {
|
||||
"description": "The from point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the path.",
|
||||
"type": "string"
|
||||
},
|
||||
"to": {
|
||||
"description": "The to point.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"maxItems": 2,
|
||||
"minItems": 2
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"base"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"unpublished": false,
|
||||
"deprecated": false
|
||||
}
|
||||
}
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,12 +11,14 @@ use std::collections::HashMap;
|
||||
use anyhow::Result;
|
||||
use derive_docs::stdlib;
|
||||
use kittycad::types::OkWebSocketResponseData;
|
||||
use lazy_static::lazy_static;
|
||||
use parse_display::{Display, FromStr};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
ast::types::parse_json_number_as_f64,
|
||||
docs::StdLibFn,
|
||||
engine::EngineManager,
|
||||
errors::{KclError, KclErrorDetails},
|
||||
executor::{ExecutorContext, ExtrudeGroup, MemoryItem, Metadata, Plane, SketchGroup, SourceRange},
|
||||
@ -25,13 +27,8 @@ use crate::{
|
||||
pub type StdFn = fn(Args) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<MemoryItem, KclError>>>>;
|
||||
pub type FnMap = HashMap<String, StdFn>;
|
||||
|
||||
pub struct StdLib {
|
||||
pub fns: HashMap<String, Box<(dyn crate::docs::StdLibFn)>>,
|
||||
}
|
||||
|
||||
impl StdLib {
|
||||
pub fn new() -> Self {
|
||||
let internal_fns: [Box<dyn crate::docs::StdLibFn>; 55] = [
|
||||
lazy_static! {
|
||||
static ref CORE_FNS: Vec<Box<dyn StdLibFn>> = vec![
|
||||
Box::new(Show),
|
||||
Box::new(LegLen),
|
||||
Box::new(LegAngX),
|
||||
@ -88,7 +85,26 @@ impl StdLib {
|
||||
Box::new(crate::std::math::Log10),
|
||||
Box::new(crate::std::math::Ln),
|
||||
];
|
||||
let fns = internal_fns
|
||||
}
|
||||
|
||||
pub fn name_in_stdlib(name: &str) -> bool {
|
||||
CORE_FNS.iter().any(|f| f.name() == name)
|
||||
}
|
||||
|
||||
pub struct StdLib {
|
||||
pub fns: HashMap<String, Box<(dyn StdLibFn)>>,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for StdLib {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("StdLib").field("fns.len()", &self.fns.len()).finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl StdLib {
|
||||
pub fn new() -> Self {
|
||||
let fns = CORE_FNS
|
||||
.clone()
|
||||
.into_iter()
|
||||
.map(|internal_fn| (internal_fn.name(), internal_fn))
|
||||
.collect();
|
||||
@ -96,7 +112,7 @@ impl StdLib {
|
||||
Self { fns }
|
||||
}
|
||||
|
||||
pub fn get(&self, name: &str) -> Option<Box<dyn crate::docs::StdLibFn>> {
|
||||
pub fn get(&self, name: &str) -> Option<Box<dyn StdLibFn>> {
|
||||
self.fns.get(name).cloned()
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,11 @@ pub async fn execute_wasm(
|
||||
let engine = kcl_lib::engine::EngineConnection::new(manager)
|
||||
.await
|
||||
.map_err(|e| format!("{:?}", e))?;
|
||||
let ctx = ExecutorContext { engine, planes };
|
||||
let ctx = ExecutorContext {
|
||||
engine,
|
||||
planes,
|
||||
stdlib: std::sync::Arc::new(kcl_lib::std::StdLib::new()),
|
||||
};
|
||||
|
||||
let memory = kcl_lib::executor::execute(program, &mut mem, kcl_lib::executor::BodyType::Root, &ctx)
|
||||
.await
|
||||
|
@ -1,5 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Result;
|
||||
use kcl_lib::engine::EngineManager;
|
||||
use kcl_lib::{engine::EngineManager, std::StdLib};
|
||||
|
||||
/// Executes a kcl program and takes a snapshot of the result.
|
||||
/// This returns the bytes of the snapshot.
|
||||
@ -38,7 +40,11 @@ async fn execute_and_snapshot(code: &str) -> Result<image::DynamicImage> {
|
||||
let mut mem: kcl_lib::executor::ProgramMemory = Default::default();
|
||||
let engine = kcl_lib::engine::EngineConnection::new(ws).await?;
|
||||
let planes = kcl_lib::executor::DefaultPlanes::new(&engine).await?;
|
||||
let ctx = kcl_lib::executor::ExecutorContext { engine, planes };
|
||||
let ctx = kcl_lib::executor::ExecutorContext {
|
||||
engine,
|
||||
planes,
|
||||
stdlib: Arc::new(StdLib::default()),
|
||||
};
|
||||
let _ = kcl_lib::executor::execute(program, &mut mem, kcl_lib::executor::BodyType::Root, &ctx).await?;
|
||||
|
||||
// Send a snapshot request to the engine.
|
||||
|
@ -1,8 +1,11 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Result;
|
||||
use kcl_lib::{
|
||||
ast::{modify::modify_ast_for_sketch, types::Program},
|
||||
engine::EngineManager,
|
||||
executor::{ExecutorContext, MemoryItem, PlaneType, SourceRange},
|
||||
std::StdLib,
|
||||
};
|
||||
use kittycad::types::{ModelingCmd, Point3D};
|
||||
use pretty_assertions::assert_eq;
|
||||
@ -39,7 +42,11 @@ async fn setup(code: &str, name: &str) -> Result<(ExecutorContext, Program, uuid
|
||||
let mut mem: kcl_lib::executor::ProgramMemory = Default::default();
|
||||
let engine = kcl_lib::engine::EngineConnection::new(ws).await?;
|
||||
let planes = kcl_lib::executor::DefaultPlanes::new(&engine).await?;
|
||||
let ctx = ExecutorContext { engine, planes };
|
||||
let ctx = ExecutorContext {
|
||||
engine,
|
||||
planes,
|
||||
stdlib: Arc::new(StdLib::default()),
|
||||
};
|
||||
let memory = kcl_lib::executor::execute(program.clone(), &mut mem, kcl_lib::executor::BodyType::Root, &ctx).await?;
|
||||
|
||||
// We need to get the sketch ID.
|
||||
|
Reference in New Issue
Block a user