* Add operations for variable declarations * Update output * Change to use OpKclValue * Update output after merge
		
			
				
	
	
		
			511 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			511 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ---
 | |
| source: kcl-lib/src/simulation_tests.rs
 | |
| description: Operations executed sketch-on-chamfer-two-times-different-order.kcl
 | |
| ---
 | |
| {
 | |
|   "rust/kcl-lib/tests/sketch-on-chamfer-two-times-different-order/input.kcl": [
 | |
|     {
 | |
|       "type": "StdLibCall",
 | |
|       "name": "startSketchOn",
 | |
|       "unlabeledArg": {
 | |
|         "value": {
 | |
|           "type": "Plane",
 | |
|           "artifact_id": "[uuid]"
 | |
|         },
 | |
|         "sourceRange": []
 | |
|       },
 | |
|       "labeledArgs": {},
 | |
|       "nodePath": {
 | |
|         "steps": [
 | |
|           {
 | |
|             "type": "ProgramBodyItem",
 | |
|             "index": 0
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationDeclaration"
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationInit"
 | |
|           },
 | |
|           {
 | |
|             "type": "PipeBodyItem",
 | |
|             "index": 0
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "StdLibCall",
 | |
|       "name": "extrude",
 | |
|       "unlabeledArg": {
 | |
|         "value": {
 | |
|           "type": "Sketch",
 | |
|           "value": {
 | |
|             "artifactId": "[uuid]"
 | |
|           }
 | |
|         },
 | |
|         "sourceRange": []
 | |
|       },
 | |
|       "labeledArgs": {
 | |
|         "length": {
 | |
|           "value": {
 | |
|             "type": "Number",
 | |
|             "value": 100.0,
 | |
|             "ty": {
 | |
|               "type": "Default",
 | |
|               "len": {
 | |
|                 "type": "Mm"
 | |
|               },
 | |
|               "angle": {
 | |
|                 "type": "Degrees"
 | |
|               }
 | |
|             }
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         }
 | |
|       },
 | |
|       "nodePath": {
 | |
|         "steps": [
 | |
|           {
 | |
|             "type": "ProgramBodyItem",
 | |
|             "index": 1
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationDeclaration"
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationInit"
 | |
|           },
 | |
|           {
 | |
|             "type": "PipeBodyItem",
 | |
|             "index": 0
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "StdLibCall",
 | |
|       "name": "fillet",
 | |
|       "unlabeledArg": {
 | |
|         "value": {
 | |
|           "type": "Solid",
 | |
|           "value": {
 | |
|             "artifactId": "[uuid]"
 | |
|           }
 | |
|         },
 | |
|         "sourceRange": []
 | |
|       },
 | |
|       "labeledArgs": {
 | |
|         "radius": {
 | |
|           "value": {
 | |
|             "type": "Number",
 | |
|             "value": 20.0,
 | |
|             "ty": {
 | |
|               "type": "Default",
 | |
|               "len": {
 | |
|                 "type": "Mm"
 | |
|               },
 | |
|               "angle": {
 | |
|                 "type": "Degrees"
 | |
|               }
 | |
|             }
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         },
 | |
|         "tags": {
 | |
|           "value": {
 | |
|             "type": "Array",
 | |
|             "value": [
 | |
|               {
 | |
|                 "type": "TagIdentifier",
 | |
|                 "value": "seg01",
 | |
|                 "artifact_id": "[uuid]"
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         }
 | |
|       },
 | |
|       "nodePath": {
 | |
|         "steps": [
 | |
|           {
 | |
|             "type": "ProgramBodyItem",
 | |
|             "index": 1
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationDeclaration"
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationInit"
 | |
|           },
 | |
|           {
 | |
|             "type": "PipeBodyItem",
 | |
|             "index": 1
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "StdLibCall",
 | |
|       "name": "chamfer",
 | |
|       "unlabeledArg": {
 | |
|         "value": {
 | |
|           "type": "Solid",
 | |
|           "value": {
 | |
|             "artifactId": "[uuid]"
 | |
|           }
 | |
|         },
 | |
|         "sourceRange": []
 | |
|       },
 | |
|       "labeledArgs": {
 | |
|         "length": {
 | |
|           "value": {
 | |
|             "type": "Number",
 | |
|             "value": 50.0,
 | |
|             "ty": {
 | |
|               "type": "Default",
 | |
|               "len": {
 | |
|                 "type": "Mm"
 | |
|               },
 | |
|               "angle": {
 | |
|                 "type": "Degrees"
 | |
|               }
 | |
|             }
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         },
 | |
|         "tag": {
 | |
|           "value": {
 | |
|             "type": "TagDeclarator",
 | |
|             "name": "seg03"
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         },
 | |
|         "tags": {
 | |
|           "value": {
 | |
|             "type": "Array",
 | |
|             "value": [
 | |
|               {
 | |
|                 "type": "Uuid",
 | |
|                 "value": "[uuid]"
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         }
 | |
|       },
 | |
|       "nodePath": {
 | |
|         "steps": [
 | |
|           {
 | |
|             "type": "ProgramBodyItem",
 | |
|             "index": 1
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationDeclaration"
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationInit"
 | |
|           },
 | |
|           {
 | |
|             "type": "PipeBodyItem",
 | |
|             "index": 2
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "StdLibCall",
 | |
|       "name": "chamfer",
 | |
|       "unlabeledArg": {
 | |
|         "value": {
 | |
|           "type": "Solid",
 | |
|           "value": {
 | |
|             "artifactId": "[uuid]"
 | |
|           }
 | |
|         },
 | |
|         "sourceRange": []
 | |
|       },
 | |
|       "labeledArgs": {
 | |
|         "length": {
 | |
|           "value": {
 | |
|             "type": "Number",
 | |
|             "value": 50.0,
 | |
|             "ty": {
 | |
|               "type": "Default",
 | |
|               "len": {
 | |
|                 "type": "Mm"
 | |
|               },
 | |
|               "angle": {
 | |
|                 "type": "Degrees"
 | |
|               }
 | |
|             }
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         },
 | |
|         "tag": {
 | |
|           "value": {
 | |
|             "type": "TagDeclarator",
 | |
|             "name": "seg04"
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         },
 | |
|         "tags": {
 | |
|           "value": {
 | |
|             "type": "Array",
 | |
|             "value": [
 | |
|               {
 | |
|                 "type": "TagIdentifier",
 | |
|                 "value": "seg02",
 | |
|                 "artifact_id": "[uuid]"
 | |
|               }
 | |
|             ]
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         }
 | |
|       },
 | |
|       "nodePath": {
 | |
|         "steps": [
 | |
|           {
 | |
|             "type": "ProgramBodyItem",
 | |
|             "index": 1
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationDeclaration"
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationInit"
 | |
|           },
 | |
|           {
 | |
|             "type": "PipeBodyItem",
 | |
|             "index": 3
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "StdLibCall",
 | |
|       "name": "startSketchOn",
 | |
|       "unlabeledArg": {
 | |
|         "value": {
 | |
|           "type": "Solid",
 | |
|           "value": {
 | |
|             "artifactId": "[uuid]"
 | |
|           }
 | |
|         },
 | |
|         "sourceRange": []
 | |
|       },
 | |
|       "labeledArgs": {
 | |
|         "face": {
 | |
|           "value": {
 | |
|             "type": "TagIdentifier",
 | |
|             "value": "seg04",
 | |
|             "artifact_id": "[uuid]"
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         }
 | |
|       },
 | |
|       "nodePath": {
 | |
|         "steps": [
 | |
|           {
 | |
|             "type": "ProgramBodyItem",
 | |
|             "index": 2
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationDeclaration"
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationInit"
 | |
|           },
 | |
|           {
 | |
|             "type": "PipeBodyItem",
 | |
|             "index": 0
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "StdLibCall",
 | |
|       "name": "startSketchOn",
 | |
|       "unlabeledArg": {
 | |
|         "value": {
 | |
|           "type": "Solid",
 | |
|           "value": {
 | |
|             "artifactId": "[uuid]"
 | |
|           }
 | |
|         },
 | |
|         "sourceRange": []
 | |
|       },
 | |
|       "labeledArgs": {
 | |
|         "face": {
 | |
|           "value": {
 | |
|             "type": "TagIdentifier",
 | |
|             "value": "seg03",
 | |
|             "artifact_id": "[uuid]"
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         }
 | |
|       },
 | |
|       "nodePath": {
 | |
|         "steps": [
 | |
|           {
 | |
|             "type": "ProgramBodyItem",
 | |
|             "index": 3
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationDeclaration"
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationInit"
 | |
|           },
 | |
|           {
 | |
|             "type": "PipeBodyItem",
 | |
|             "index": 0
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "StdLibCall",
 | |
|       "name": "extrude",
 | |
|       "unlabeledArg": {
 | |
|         "value": {
 | |
|           "type": "Sketch",
 | |
|           "value": {
 | |
|             "artifactId": "[uuid]"
 | |
|           }
 | |
|         },
 | |
|         "sourceRange": []
 | |
|       },
 | |
|       "labeledArgs": {
 | |
|         "length": {
 | |
|           "value": {
 | |
|             "type": "Number",
 | |
|             "value": 50.0,
 | |
|             "ty": {
 | |
|               "type": "Default",
 | |
|               "len": {
 | |
|                 "type": "Mm"
 | |
|               },
 | |
|               "angle": {
 | |
|                 "type": "Degrees"
 | |
|               }
 | |
|             }
 | |
|           },
 | |
|           "sourceRange": []
 | |
|         }
 | |
|       },
 | |
|       "nodePath": {
 | |
|         "steps": [
 | |
|           {
 | |
|             "type": "ProgramBodyItem",
 | |
|             "index": 4
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationDeclaration"
 | |
|           },
 | |
|           {
 | |
|             "type": "VariableDeclarationInit"
 | |
|           }
 | |
|         ]
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     }
 | |
|   ],
 | |
|   "std::appearance": [],
 | |
|   "std::array": [],
 | |
|   "std::math": [
 | |
|     {
 | |
|       "type": "VariableDeclaration",
 | |
|       "name": "PI",
 | |
|       "value": {
 | |
|         "type": "Number",
 | |
|         "value": 3.142,
 | |
|         "ty": {
 | |
|           "type": "Unknown"
 | |
|         }
 | |
|       },
 | |
|       "visibility": "export",
 | |
|       "nodePath": {
 | |
|         "steps": []
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "VariableDeclaration",
 | |
|       "name": "E",
 | |
|       "value": {
 | |
|         "type": "Number",
 | |
|         "value": 2.718,
 | |
|         "ty": {
 | |
|           "type": "Known",
 | |
|           "type": "Count"
 | |
|         }
 | |
|       },
 | |
|       "visibility": "export",
 | |
|       "nodePath": {
 | |
|         "steps": []
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "VariableDeclaration",
 | |
|       "name": "TAU",
 | |
|       "value": {
 | |
|         "type": "Number",
 | |
|         "value": 6.283,
 | |
|         "ty": {
 | |
|           "type": "Known",
 | |
|           "type": "Count"
 | |
|         }
 | |
|       },
 | |
|       "visibility": "export",
 | |
|       "nodePath": {
 | |
|         "steps": []
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     }
 | |
|   ],
 | |
|   "std::prelude": [
 | |
|     {
 | |
|       "type": "VariableDeclaration",
 | |
|       "name": "START",
 | |
|       "value": {
 | |
|         "type": "String",
 | |
|         "value": "start"
 | |
|       },
 | |
|       "visibility": "export",
 | |
|       "nodePath": {
 | |
|         "steps": []
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     },
 | |
|     {
 | |
|       "type": "VariableDeclaration",
 | |
|       "name": "END",
 | |
|       "value": {
 | |
|         "type": "String",
 | |
|         "value": "end"
 | |
|       },
 | |
|       "visibility": "export",
 | |
|       "nodePath": {
 | |
|         "steps": []
 | |
|       },
 | |
|       "sourceRange": []
 | |
|     }
 | |
|   ],
 | |
|   "std::sketch": [],
 | |
|   "std::solid": [],
 | |
|   "std::sweep": [],
 | |
|   "std::transform": [],
 | |
|   "std::turns": [],
 | |
|   "std::types": [],
 | |
|   "std::units": []
 | |
| }
 |