Tag as top level construct (#2769)
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* udpages
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* update
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* better functions
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* backwards compat everywhere
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* update docs
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* udpates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* add lsp symbols stuff;
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* tests for dupes
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* Revert "tests for dupes"
This reverts commit 6acaf5a9fa.
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* initial test updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* fix tests
Signed-off-by: Jess Frazelle <github@jessfraz.com>
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
			
			
This commit is contained in:
		@ -9,7 +9,7 @@ Returns the length of the segment.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
```js
 | 
			
		||||
segLen(segment_name: string, sketch_group: SketchGroup) -> number
 | 
			
		||||
segLen(segment_name: TagIdentifier, sketch_group: SketchGroup) -> number
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Examples
 | 
			
		||||
@ -32,7 +32,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
 | 
			
		||||
### Arguments
 | 
			
		||||
 | 
			
		||||
* `segment_name`: `string` (REQUIRED)
 | 
			
		||||
* `segment_name`: `TagIdentifier` (REQUIRED)
 | 
			
		||||
```js
 | 
			
		||||
{
 | 
			
		||||
	value: string,
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
* `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED)
 | 
			
		||||
```js
 | 
			
		||||
{
 | 
			
		||||
@ -90,7 +95,11 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
	// The id of the engine command that called this chamfer.
 | 
			
		||||
	id: uuid,
 | 
			
		||||
	length: number,
 | 
			
		||||
	tag: string,
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	type: "chamfer",
 | 
			
		||||
}],
 | 
			
		||||
	// The height of the extrude group.
 | 
			
		||||
@ -107,8 +116,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
	start: {
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
},
 | 
			
		||||
@ -116,8 +129,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
	value: [{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "ToPoint",
 | 
			
		||||
@ -129,8 +146,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
	center: [number, number],
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "TangentialArcTo",
 | 
			
		||||
@ -138,8 +159,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "TangentialArc",
 | 
			
		||||
@ -147,8 +172,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "Horizontal",
 | 
			
		||||
@ -158,8 +187,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "AngledLineTo",
 | 
			
		||||
@ -171,8 +204,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "Base",
 | 
			
		||||
@ -186,10 +223,14 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
	faceId: uuid,
 | 
			
		||||
	// The id of the geometry.
 | 
			
		||||
	id: uuid,
 | 
			
		||||
	// The name.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The source range.
 | 
			
		||||
	sourceRange: [number, number],
 | 
			
		||||
	// The tag.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	type: "extrudePlane",
 | 
			
		||||
} |
 | 
			
		||||
{
 | 
			
		||||
@ -197,10 +238,14 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
	faceId: uuid,
 | 
			
		||||
	// The id of the geometry.
 | 
			
		||||
	id: uuid,
 | 
			
		||||
	// The name.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The source range.
 | 
			
		||||
	sourceRange: [number, number],
 | 
			
		||||
	// The tag.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	type: "extrudeArc",
 | 
			
		||||
}],
 | 
			
		||||
},
 | 
			
		||||
@ -232,8 +277,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
	start: {
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
},
 | 
			
		||||
@ -241,8 +290,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
	value: [{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "ToPoint",
 | 
			
		||||
@ -254,8 +307,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
	center: [number, number],
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "TangentialArcTo",
 | 
			
		||||
@ -263,8 +320,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "TangentialArc",
 | 
			
		||||
@ -272,8 +333,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "Horizontal",
 | 
			
		||||
@ -283,8 +348,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "AngledLineTo",
 | 
			
		||||
@ -296,8 +365,12 @@ const example = extrude(5, exampleSketch)
 | 
			
		||||
{
 | 
			
		||||
	// The from point.
 | 
			
		||||
	from: [number, number],
 | 
			
		||||
	// The name of the path.
 | 
			
		||||
	name: string,
 | 
			
		||||
	// The tag of the path.
 | 
			
		||||
	tag: {
 | 
			
		||||
	end: number,
 | 
			
		||||
	start: number,
 | 
			
		||||
	value: string,
 | 
			
		||||
},
 | 
			
		||||
	// The to point.
 | 
			
		||||
	to: [number, number],
 | 
			
		||||
	type: "Base",
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user