* Add NodePath to operations * Change to use nodePath to get pathToNode instead of sourceRange * Add additional node path unit test * Update output * Fix import statement NodePaths * Update output * Factor into function
		
			
				
	
	
		
			260 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			260 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
---
 | 
						|
source: kcl-lib/src/simulation_tests.rs
 | 
						|
description: Operations executed subtract_regression01.kcl
 | 
						|
---
 | 
						|
[
 | 
						|
  {
 | 
						|
    "type": "StdLibCall",
 | 
						|
    "name": "startSketchOn",
 | 
						|
    "unlabeledArg": {
 | 
						|
      "value": {
 | 
						|
        "type": "Plane",
 | 
						|
        "artifact_id": "[uuid]"
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    "labeledArgs": {},
 | 
						|
    "nodePath": {
 | 
						|
      "steps": [
 | 
						|
        {
 | 
						|
          "type": "ProgramBodyItem",
 | 
						|
          "index": 0
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationDeclaration"
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationInit"
 | 
						|
        }
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    "sourceRange": []
 | 
						|
  },
 | 
						|
  {
 | 
						|
    "type": "StdLibCall",
 | 
						|
    "name": "extrude",
 | 
						|
    "unlabeledArg": {
 | 
						|
      "value": {
 | 
						|
        "type": "Sketch",
 | 
						|
        "value": {
 | 
						|
          "artifactId": "[uuid]"
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    "labeledArgs": {
 | 
						|
      "bidirectionalLength": {
 | 
						|
        "value": {
 | 
						|
          "type": "Number",
 | 
						|
          "value": 0.25,
 | 
						|
          "ty": {
 | 
						|
            "type": "Default",
 | 
						|
            "len": {
 | 
						|
              "type": "Inches"
 | 
						|
            },
 | 
						|
            "angle": {
 | 
						|
              "type": "Degrees"
 | 
						|
            }
 | 
						|
          }
 | 
						|
        },
 | 
						|
        "sourceRange": []
 | 
						|
      },
 | 
						|
      "length": {
 | 
						|
        "value": {
 | 
						|
          "type": "Number",
 | 
						|
          "value": 0.25,
 | 
						|
          "ty": {
 | 
						|
            "type": "Default",
 | 
						|
            "len": {
 | 
						|
              "type": "Inches"
 | 
						|
            },
 | 
						|
            "angle": {
 | 
						|
              "type": "Degrees"
 | 
						|
            }
 | 
						|
          }
 | 
						|
        },
 | 
						|
        "sourceRange": []
 | 
						|
      }
 | 
						|
    },
 | 
						|
    "nodePath": {
 | 
						|
      "steps": [
 | 
						|
        {
 | 
						|
          "type": "ProgramBodyItem",
 | 
						|
          "index": 2
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationDeclaration"
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationInit"
 | 
						|
        }
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    "sourceRange": []
 | 
						|
  },
 | 
						|
  {
 | 
						|
    "type": "StdLibCall",
 | 
						|
    "name": "startSketchOn",
 | 
						|
    "unlabeledArg": {
 | 
						|
      "value": {
 | 
						|
        "type": "Plane",
 | 
						|
        "artifact_id": "[uuid]"
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    "labeledArgs": {},
 | 
						|
    "nodePath": {
 | 
						|
      "steps": [
 | 
						|
        {
 | 
						|
          "type": "ProgramBodyItem",
 | 
						|
          "index": 3
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationDeclaration"
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationInit"
 | 
						|
        }
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    "sourceRange": []
 | 
						|
  },
 | 
						|
  {
 | 
						|
    "type": "StdLibCall",
 | 
						|
    "name": "offsetPlane",
 | 
						|
    "unlabeledArg": {
 | 
						|
      "value": {
 | 
						|
        "type": "Plane",
 | 
						|
        "artifact_id": "[uuid]"
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    "labeledArgs": {
 | 
						|
      "offset": {
 | 
						|
        "value": {
 | 
						|
          "type": "Number",
 | 
						|
          "value": 0.25,
 | 
						|
          "ty": {
 | 
						|
            "type": "Default",
 | 
						|
            "len": {
 | 
						|
              "type": "Inches"
 | 
						|
            },
 | 
						|
            "angle": {
 | 
						|
              "type": "Degrees"
 | 
						|
            }
 | 
						|
          }
 | 
						|
        },
 | 
						|
        "sourceRange": []
 | 
						|
      }
 | 
						|
    },
 | 
						|
    "nodePath": {
 | 
						|
      "steps": [
 | 
						|
        {
 | 
						|
          "type": "ProgramBodyItem",
 | 
						|
          "index": 3
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationDeclaration"
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationInit"
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "CallKwUnlabeledArg"
 | 
						|
        }
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    "sourceRange": []
 | 
						|
  },
 | 
						|
  {
 | 
						|
    "type": "StdLibCall",
 | 
						|
    "name": "extrude",
 | 
						|
    "unlabeledArg": {
 | 
						|
      "value": {
 | 
						|
        "type": "Array",
 | 
						|
        "value": [
 | 
						|
          {
 | 
						|
            "type": "Sketch",
 | 
						|
            "value": {
 | 
						|
              "artifactId": "[uuid]"
 | 
						|
            }
 | 
						|
          }
 | 
						|
        ]
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    "labeledArgs": {
 | 
						|
      "length": {
 | 
						|
        "value": {
 | 
						|
          "type": "Number",
 | 
						|
          "value": 0.5,
 | 
						|
          "ty": {
 | 
						|
            "type": "Default",
 | 
						|
            "len": {
 | 
						|
              "type": "Inches"
 | 
						|
            },
 | 
						|
            "angle": {
 | 
						|
              "type": "Degrees"
 | 
						|
            }
 | 
						|
          }
 | 
						|
        },
 | 
						|
        "sourceRange": []
 | 
						|
      }
 | 
						|
    },
 | 
						|
    "nodePath": {
 | 
						|
      "steps": [
 | 
						|
        {
 | 
						|
          "type": "ProgramBodyItem",
 | 
						|
          "index": 5
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationDeclaration"
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationInit"
 | 
						|
        }
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    "sourceRange": []
 | 
						|
  },
 | 
						|
  {
 | 
						|
    "type": "StdLibCall",
 | 
						|
    "name": "subtract",
 | 
						|
    "unlabeledArg": {
 | 
						|
      "value": {
 | 
						|
        "type": "Solid",
 | 
						|
        "value": {
 | 
						|
          "artifactId": "[uuid]"
 | 
						|
        }
 | 
						|
      },
 | 
						|
      "sourceRange": []
 | 
						|
    },
 | 
						|
    "labeledArgs": {
 | 
						|
      "tools": {
 | 
						|
        "value": {
 | 
						|
          "type": "Solid",
 | 
						|
          "value": {
 | 
						|
            "artifactId": "[uuid]"
 | 
						|
          }
 | 
						|
        },
 | 
						|
        "sourceRange": []
 | 
						|
      }
 | 
						|
    },
 | 
						|
    "nodePath": {
 | 
						|
      "steps": [
 | 
						|
        {
 | 
						|
          "type": "ProgramBodyItem",
 | 
						|
          "index": 6
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationDeclaration"
 | 
						|
        },
 | 
						|
        {
 | 
						|
          "type": "VariableDeclarationInit"
 | 
						|
        }
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    "sourceRange": []
 | 
						|
  }
 | 
						|
]
 |