Kwargs: startProfileAt (#6424)
Previous: ``` startProfileAt([x, y], %) startProfileAt([x, y], sketch001) ``` New: ``` startProfile(%, at = [x, y]) startProfile(sketch001, at = [x, y]) ```
This commit is contained in:
		@ -77,27 +77,30 @@ description: Result of parsing sketch_on_face_start.kcl
 | 
			
		||||
                        {
 | 
			
		||||
                          "arguments": [
 | 
			
		||||
                            {
 | 
			
		||||
                              "abs_path": false,
 | 
			
		||||
                              "commentStart": 0,
 | 
			
		||||
                              "end": 0,
 | 
			
		||||
                              "name": {
 | 
			
		||||
                              "type": "LabeledArg",
 | 
			
		||||
                              "label": {
 | 
			
		||||
                                "commentStart": 0,
 | 
			
		||||
                                "end": 0,
 | 
			
		||||
                                "name": "pos",
 | 
			
		||||
                                "name": "at",
 | 
			
		||||
                                "start": 0,
 | 
			
		||||
                                "type": "Identifier"
 | 
			
		||||
                              },
 | 
			
		||||
                              "path": [],
 | 
			
		||||
                              "start": 0,
 | 
			
		||||
                              "type": "Name",
 | 
			
		||||
                              "type": "Name"
 | 
			
		||||
                            },
 | 
			
		||||
                            {
 | 
			
		||||
                              "commentStart": 0,
 | 
			
		||||
                              "end": 0,
 | 
			
		||||
                              "start": 0,
 | 
			
		||||
                              "type": "PipeSubstitution",
 | 
			
		||||
                              "type": "PipeSubstitution"
 | 
			
		||||
                              "arg": {
 | 
			
		||||
                                "abs_path": false,
 | 
			
		||||
                                "commentStart": 0,
 | 
			
		||||
                                "end": 0,
 | 
			
		||||
                                "name": {
 | 
			
		||||
                                  "commentStart": 0,
 | 
			
		||||
                                  "end": 0,
 | 
			
		||||
                                  "name": "pos",
 | 
			
		||||
                                  "start": 0,
 | 
			
		||||
                                  "type": "Identifier"
 | 
			
		||||
                                },
 | 
			
		||||
                                "path": [],
 | 
			
		||||
                                "start": 0,
 | 
			
		||||
                                "type": "Name",
 | 
			
		||||
                                "type": "Name"
 | 
			
		||||
                              }
 | 
			
		||||
                            }
 | 
			
		||||
                          ],
 | 
			
		||||
                          "callee": {
 | 
			
		||||
@ -107,7 +110,7 @@ description: Result of parsing sketch_on_face_start.kcl
 | 
			
		||||
                            "name": {
 | 
			
		||||
                              "commentStart": 0,
 | 
			
		||||
                              "end": 0,
 | 
			
		||||
                              "name": "startProfileAt",
 | 
			
		||||
                              "name": "startProfile",
 | 
			
		||||
                              "start": 0,
 | 
			
		||||
                              "type": "Identifier"
 | 
			
		||||
                            },
 | 
			
		||||
@ -118,8 +121,9 @@ description: Result of parsing sketch_on_face_start.kcl
 | 
			
		||||
                          "commentStart": 0,
 | 
			
		||||
                          "end": 0,
 | 
			
		||||
                          "start": 0,
 | 
			
		||||
                          "type": "CallExpression",
 | 
			
		||||
                          "type": "CallExpression"
 | 
			
		||||
                          "type": "CallExpressionKw",
 | 
			
		||||
                          "type": "CallExpressionKw",
 | 
			
		||||
                          "unlabeled": null
 | 
			
		||||
                        },
 | 
			
		||||
                        {
 | 
			
		||||
                          "arguments": [
 | 
			
		||||
@ -709,44 +713,47 @@ description: Result of parsing sketch_on_face_start.kcl
 | 
			
		||||
              {
 | 
			
		||||
                "arguments": [
 | 
			
		||||
                  {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "elements": [
 | 
			
		||||
                      {
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "raw": "0",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "Literal",
 | 
			
		||||
                        "type": "Literal",
 | 
			
		||||
                        "value": {
 | 
			
		||||
                          "value": 0.0,
 | 
			
		||||
                          "suffix": "None"
 | 
			
		||||
                    "type": "LabeledArg",
 | 
			
		||||
                    "label": {
 | 
			
		||||
                      "commentStart": 0,
 | 
			
		||||
                      "end": 0,
 | 
			
		||||
                      "name": "at",
 | 
			
		||||
                      "start": 0,
 | 
			
		||||
                      "type": "Identifier"
 | 
			
		||||
                    },
 | 
			
		||||
                    "arg": {
 | 
			
		||||
                      "commentStart": 0,
 | 
			
		||||
                      "elements": [
 | 
			
		||||
                        {
 | 
			
		||||
                          "commentStart": 0,
 | 
			
		||||
                          "end": 0,
 | 
			
		||||
                          "raw": "0",
 | 
			
		||||
                          "start": 0,
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "value": {
 | 
			
		||||
                            "value": 0.0,
 | 
			
		||||
                            "suffix": "None"
 | 
			
		||||
                          }
 | 
			
		||||
                        },
 | 
			
		||||
                        {
 | 
			
		||||
                          "commentStart": 0,
 | 
			
		||||
                          "end": 0,
 | 
			
		||||
                          "raw": "0",
 | 
			
		||||
                          "start": 0,
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "type": "Literal",
 | 
			
		||||
                          "value": {
 | 
			
		||||
                            "value": 0.0,
 | 
			
		||||
                            "suffix": "None"
 | 
			
		||||
                          }
 | 
			
		||||
                        }
 | 
			
		||||
                      },
 | 
			
		||||
                      {
 | 
			
		||||
                        "commentStart": 0,
 | 
			
		||||
                        "end": 0,
 | 
			
		||||
                        "raw": "0",
 | 
			
		||||
                        "start": 0,
 | 
			
		||||
                        "type": "Literal",
 | 
			
		||||
                        "type": "Literal",
 | 
			
		||||
                        "value": {
 | 
			
		||||
                          "value": 0.0,
 | 
			
		||||
                          "suffix": "None"
 | 
			
		||||
                        }
 | 
			
		||||
                      }
 | 
			
		||||
                    ],
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "ArrayExpression",
 | 
			
		||||
                    "type": "ArrayExpression"
 | 
			
		||||
                  },
 | 
			
		||||
                  {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "PipeSubstitution",
 | 
			
		||||
                    "type": "PipeSubstitution"
 | 
			
		||||
                      ],
 | 
			
		||||
                      "end": 0,
 | 
			
		||||
                      "start": 0,
 | 
			
		||||
                      "type": "ArrayExpression",
 | 
			
		||||
                      "type": "ArrayExpression"
 | 
			
		||||
                    }
 | 
			
		||||
                  }
 | 
			
		||||
                ],
 | 
			
		||||
                "callee": {
 | 
			
		||||
@ -756,7 +763,7 @@ description: Result of parsing sketch_on_face_start.kcl
 | 
			
		||||
                  "name": {
 | 
			
		||||
                    "commentStart": 0,
 | 
			
		||||
                    "end": 0,
 | 
			
		||||
                    "name": "startProfileAt",
 | 
			
		||||
                    "name": "startProfile",
 | 
			
		||||
                    "start": 0,
 | 
			
		||||
                    "type": "Identifier"
 | 
			
		||||
                  },
 | 
			
		||||
@ -767,8 +774,9 @@ description: Result of parsing sketch_on_face_start.kcl
 | 
			
		||||
                "commentStart": 0,
 | 
			
		||||
                "end": 0,
 | 
			
		||||
                "start": 0,
 | 
			
		||||
                "type": "CallExpression",
 | 
			
		||||
                "type": "CallExpression"
 | 
			
		||||
                "type": "CallExpressionKw",
 | 
			
		||||
                "type": "CallExpressionKw",
 | 
			
		||||
                "unlabeled": null
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "arguments": [
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
fn cube(pos, scale) {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -12,7 +12,7 @@ part001 = cube([0, 0], 20)
 | 
			
		||||
  |> extrude(length = 20) as foo
 | 
			
		||||
 | 
			
		||||
part002 = startSketchOn(foo, face = "start")
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@ description: Result of unparsing sketch_on_face_start.kcl
 | 
			
		||||
---
 | 
			
		||||
fn cube(pos, scale) {
 | 
			
		||||
  sg = startSketchOn(XY)
 | 
			
		||||
    |> startProfileAt(pos, %)
 | 
			
		||||
    |> startProfile(at = pos)
 | 
			
		||||
    |> line(end = [0, scale])
 | 
			
		||||
    |> line(end = [scale, 0])
 | 
			
		||||
    |> line(end = [0, -scale])
 | 
			
		||||
@ -16,7 +16,7 @@ part001 = cube([0, 0], 20)
 | 
			
		||||
  |> extrude(length = 20) as foo
 | 
			
		||||
 | 
			
		||||
part002 = startSketchOn(foo, face = START)
 | 
			
		||||
  |> startProfileAt([0, 0], %)
 | 
			
		||||
  |> startProfile(at = [0, 0])
 | 
			
		||||
  |> line(end = [0, 10])
 | 
			
		||||
  |> line(end = [10, 0])
 | 
			
		||||
  |> line(end = [0, -10])
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user