* Add libm dependency * Change to use libm for trig functions * Remove redactions for floating point * Update output * Use clippy to prevent stdlib math sneaking back in --------- Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
		
			
				
	
	
		
			608 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			608 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
---
 | 
						|
source: kcl-lib/src/simulation_tests.rs
 | 
						|
description: Artifact commands t-slot-rail.kcl
 | 
						|
---
 | 
						|
{
 | 
						|
  "public/kcl-samples/t-slot-rail/main.kcl": [
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "make_plane",
 | 
						|
        "origin": {
 | 
						|
          "x": 0.0,
 | 
						|
          "y": 0.0,
 | 
						|
          "z": 0.0
 | 
						|
        },
 | 
						|
        "x_axis": {
 | 
						|
          "x": 1.0,
 | 
						|
          "y": 0.0,
 | 
						|
          "z": 0.0
 | 
						|
        },
 | 
						|
        "y_axis": {
 | 
						|
          "x": 0.0,
 | 
						|
          "y": 0.0,
 | 
						|
          "z": 1.0
 | 
						|
        },
 | 
						|
        "size": 60.0,
 | 
						|
        "clobber": false,
 | 
						|
        "hide": true
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "enable_sketch_mode",
 | 
						|
        "entity_id": "[uuid]",
 | 
						|
        "ortho": false,
 | 
						|
        "animated": false,
 | 
						|
        "adjust_camera": false,
 | 
						|
        "planar_normal": {
 | 
						|
          "x": 0.0,
 | 
						|
          "y": -1.0,
 | 
						|
          "z": 0.0
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "start_path"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "move_path_pen",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "to": {
 | 
						|
          "x": 12.7,
 | 
						|
          "y": 8.178799999999999,
 | 
						|
          "z": 0.0
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "sketch_mode_disable"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "line",
 | 
						|
          "end": {
 | 
						|
            "x": -2.032,
 | 
						|
            "y": 0.0,
 | 
						|
            "z": 0.0
 | 
						|
          },
 | 
						|
          "relative": true
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "tangential_arc",
 | 
						|
          "radius": 2.2859999999999996,
 | 
						|
          "offset": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": 45.0
 | 
						|
          }
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "line",
 | 
						|
          "end": {
 | 
						|
            "x": 4.4125077964151025,
 | 
						|
            "y": 2.8702,
 | 
						|
            "z": 0.0
 | 
						|
          },
 | 
						|
          "relative": false
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "tangential_arc",
 | 
						|
          "radius": 0.254,
 | 
						|
          "offset": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": 135.0
 | 
						|
          }
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "line",
 | 
						|
          "end": {
 | 
						|
            "x": 8.381999999999998,
 | 
						|
            "y": 2.436594877578617,
 | 
						|
            "z": 0.0
 | 
						|
          },
 | 
						|
          "relative": false
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "tangential_arc",
 | 
						|
          "radius": 0.254,
 | 
						|
          "offset": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": -90.0
 | 
						|
          }
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "line",
 | 
						|
          "end": {
 | 
						|
            "x": 8.636,
 | 
						|
            "y": 0.254,
 | 
						|
            "z": 0.0
 | 
						|
          },
 | 
						|
          "relative": false
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "tangential_arc",
 | 
						|
          "radius": 0.254,
 | 
						|
          "offset": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": -90.0
 | 
						|
          }
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "line",
 | 
						|
          "end": {
 | 
						|
            "x": -0.7619999999999999,
 | 
						|
            "y": 0.0,
 | 
						|
            "z": 0.0
 | 
						|
          },
 | 
						|
          "relative": true
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "arc",
 | 
						|
          "center": {
 | 
						|
            "x": 7.162799999999997,
 | 
						|
            "y": -0.0
 | 
						|
          },
 | 
						|
          "radius": 0.45719999999999994,
 | 
						|
          "start": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": 0.0
 | 
						|
          },
 | 
						|
          "end": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": 180.0
 | 
						|
          },
 | 
						|
          "relative": false
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "line",
 | 
						|
          "end": {
 | 
						|
            "x": -2.54,
 | 
						|
            "y": 0.0,
 | 
						|
            "z": 0.0
 | 
						|
          },
 | 
						|
          "relative": true
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "arc",
 | 
						|
          "center": {
 | 
						|
            "x": 3.7083999999999975,
 | 
						|
            "y": 0.00000000000000005599085165701698
 | 
						|
          },
 | 
						|
          "radius": 0.45719999999999994,
 | 
						|
          "start": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": 0.0
 | 
						|
          },
 | 
						|
          "end": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": 180.0
 | 
						|
          },
 | 
						|
          "relative": false
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "line",
 | 
						|
          "end": {
 | 
						|
            "x": -0.7619999999999999,
 | 
						|
            "y": 0.0,
 | 
						|
            "z": 0.0
 | 
						|
          },
 | 
						|
          "relative": true
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "tangential_arc_to",
 | 
						|
          "to": {
 | 
						|
            "x": -1.790699999999998,
 | 
						|
            "y": 0.6984999999999999,
 | 
						|
            "z": 0.0
 | 
						|
          },
 | 
						|
          "angle_snap_increment": null
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "entity_mirror",
 | 
						|
        "ids": [
 | 
						|
          "[uuid]"
 | 
						|
        ],
 | 
						|
        "axis": {
 | 
						|
          "x": 25.4,
 | 
						|
          "y": 25.4,
 | 
						|
          "z": 0.0
 | 
						|
        },
 | 
						|
        "point": {
 | 
						|
          "x": 0.0,
 | 
						|
          "y": 0.0,
 | 
						|
          "z": 0.0
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "entity_get_all_child_uuids",
 | 
						|
        "entity_id": "[uuid]"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "entity_mirror",
 | 
						|
        "ids": [
 | 
						|
          "[uuid]"
 | 
						|
        ],
 | 
						|
        "axis": {
 | 
						|
          "x": 25.4,
 | 
						|
          "y": 0.0,
 | 
						|
          "z": 0.0
 | 
						|
        },
 | 
						|
        "point": {
 | 
						|
          "x": 0.0,
 | 
						|
          "y": 12.7,
 | 
						|
          "z": 0.0
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "entity_get_all_child_uuids",
 | 
						|
        "entity_id": "[uuid]"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "entity_mirror",
 | 
						|
        "ids": [
 | 
						|
          "[uuid]"
 | 
						|
        ],
 | 
						|
        "axis": {
 | 
						|
          "x": 0.0,
 | 
						|
          "y": 25.4,
 | 
						|
          "z": 0.0
 | 
						|
        },
 | 
						|
        "point": {
 | 
						|
          "x": 12.7,
 | 
						|
          "y": 0.0,
 | 
						|
          "z": 0.0
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "entity_get_all_child_uuids",
 | 
						|
        "entity_id": "[uuid]"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "close_path",
 | 
						|
        "path_id": "[uuid]"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "enable_sketch_mode",
 | 
						|
        "entity_id": "[uuid]",
 | 
						|
        "ortho": false,
 | 
						|
        "animated": false,
 | 
						|
        "adjust_camera": false,
 | 
						|
        "planar_normal": {
 | 
						|
          "x": 0.0,
 | 
						|
          "y": -1.0,
 | 
						|
          "z": 0.0
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "start_path"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "move_path_pen",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "to": {
 | 
						|
          "x": 22.377399999999998,
 | 
						|
          "y": 19.049999999999997,
 | 
						|
          "z": 0.0
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "sketch_mode_disable"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extend_path",
 | 
						|
        "path": "[uuid]",
 | 
						|
        "segment": {
 | 
						|
          "type": "arc",
 | 
						|
          "center": {
 | 
						|
            "x": 19.049999999999997,
 | 
						|
            "y": 19.049999999999997
 | 
						|
          },
 | 
						|
          "radius": 3.3274,
 | 
						|
          "start": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": 0.0
 | 
						|
          },
 | 
						|
          "end": {
 | 
						|
            "unit": "degrees",
 | 
						|
            "value": 360.0
 | 
						|
          },
 | 
						|
          "relative": false
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "close_path",
 | 
						|
        "path_id": "[uuid]"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "solid2d_add_hole",
 | 
						|
        "object_id": "[uuid]",
 | 
						|
        "hole_id": "[uuid]"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "object_visible",
 | 
						|
        "object_id": "[uuid]",
 | 
						|
        "hidden": true
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "set_object_transform",
 | 
						|
        "object_id": "[uuid]",
 | 
						|
        "transforms": [
 | 
						|
          {
 | 
						|
            "translate": null,
 | 
						|
            "rotate_rpy": null,
 | 
						|
            "rotate_angle_axis": null,
 | 
						|
            "scale": {
 | 
						|
              "property": {
 | 
						|
                "x": 1.5,
 | 
						|
                "y": 1.0,
 | 
						|
                "z": 1.5
 | 
						|
              },
 | 
						|
              "set": false,
 | 
						|
              "is_local": true
 | 
						|
            }
 | 
						|
          }
 | 
						|
        ]
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "enable_sketch_mode",
 | 
						|
        "entity_id": "[uuid]",
 | 
						|
        "ortho": false,
 | 
						|
        "animated": false,
 | 
						|
        "adjust_camera": false,
 | 
						|
        "planar_normal": {
 | 
						|
          "x": 0.0,
 | 
						|
          "y": -1.0,
 | 
						|
          "z": 0.0
 | 
						|
        }
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "extrude",
 | 
						|
        "target": "[uuid]",
 | 
						|
        "distance": -609.5999999999999,
 | 
						|
        "faces": null,
 | 
						|
        "opposite": "None"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "sketch_mode_disable"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "object_bring_to_front",
 | 
						|
        "object_id": "[uuid]"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "solid3d_get_extrusion_face_info",
 | 
						|
        "object_id": "[uuid]",
 | 
						|
        "edge_id": "[uuid]"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "cmdId": "[uuid]",
 | 
						|
      "range": [],
 | 
						|
      "command": {
 | 
						|
        "type": "solid3d_get_adjacency_info",
 | 
						|
        "object_id": "[uuid]",
 | 
						|
        "edge_id": "[uuid]"
 | 
						|
      }
 | 
						|
    }
 | 
						|
  ],
 | 
						|
  "std::appearance": [],
 | 
						|
  "std::array": [],
 | 
						|
  "std::math": [],
 | 
						|
  "std::prelude": [],
 | 
						|
  "std::sketch": [],
 | 
						|
  "std::solid": [],
 | 
						|
  "std::sweep": [],
 | 
						|
  "std::transform": [],
 | 
						|
  "std::turns": [],
 | 
						|
  "std::types": [],
 | 
						|
  "std::units": []
 | 
						|
}
 |