Change KCL stdlib floating-point results to not be platform dependent (#7499)

* 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>
This commit is contained in:
Jonathan Tran
2025-06-16 21:34:50 -04:00
committed by GitHub
parent 1a4a030671
commit 7486d25cf1
433 changed files with 24677 additions and 24672 deletions

View File

@ -148,8 +148,8 @@ description: Artifact commands surgical-drill-guide.kcl
"segment": {
"type": "line",
"end": {
"x": -25.0,
"y": 43.301,
"x": -25.00000000000001,
"y": 43.30127018922193,
"z": 0.0
},
"relative": true
@ -165,8 +165,8 @@ description: Artifact commands surgical-drill-guide.kcl
"segment": {
"type": "line",
"end": {
"x": -5.196,
"y": -3.0,
"x": -5.196152422706632,
"y": -3.000000000000001,
"z": 0.0
},
"relative": true
@ -182,8 +182,8 @@ description: Artifact commands surgical-drill-guide.kcl
"segment": {
"type": "line",
"end": {
"x": 25.0,
"y": -43.301,
"x": 25.00000000000001,
"y": -43.30127018922194,
"z": 0.0
},
"relative": true
@ -199,8 +199,8 @@ description: Artifact commands surgical-drill-guide.kcl
"segment": {
"type": "tangential_arc_to",
"to": {
"x": 11.691,
"y": -6.75,
"x": 11.691342951089919,
"y": -6.749999999999993,
"z": 0.0
},
"angle_snap_increment": null
@ -330,8 +330,8 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "move_path_pen",
"path": "[uuid]",
"to": {
"x": 15.789,
"y": 53.151,
"x": 15.789473684210527,
"y": 53.15127018922193,
"z": 0.0
}
}
@ -353,7 +353,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "arc",
"center": {
"x": 0.0,
"y": 53.151
"y": 53.15127018922193
},
"radius": 15.789473684210527,
"start": {
@ -514,7 +514,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "move_path_pen",
"path": "[uuid]",
"to": {
"x": 15.789,
"x": 15.789473684210527,
"y": 150.0,
"z": 0.0
}
@ -653,7 +653,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "make_plane",
"origin": {
"x": 0.0,
"y": -28.495,
"y": -28.495190528383297,
"z": 0.0
},
"x_axis": {
@ -724,8 +724,8 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "move_path_pen",
"path": "[uuid]",
"to": {
"x": 15.789,
"y": 53.151,
"x": 15.789473684210527,
"y": 53.15127018922193,
"z": 0.0
}
}
@ -747,7 +747,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "arc",
"center": {
"x": 0.0,
"y": 53.151
"y": 53.15127018922193
},
"radius": 15.789473684210527,
"start": {
@ -857,7 +857,7 @@ description: Artifact commands surgical-drill-guide.kcl
"path": "[uuid]",
"to": {
"x": 2.0,
"y": 53.151,
"y": 53.15127018922193,
"z": 0.0
}
}
@ -879,7 +879,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "arc",
"center": {
"x": 0.0,
"y": 53.151
"y": 53.15127018922193
},
"radius": 2.0,
"start": {
@ -1014,7 +1014,7 @@ description: Artifact commands surgical-drill-guide.kcl
"path": "[uuid]",
"to": {
"x": 1.0,
"y": 53.151,
"y": 53.15127018922193,
"z": 0.0
}
}
@ -1036,7 +1036,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "arc",
"center": {
"x": 0.0,
"y": 53.151
"y": 53.15127018922193
},
"radius": 1.0,
"start": {
@ -1122,7 +1122,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "make_plane",
"origin": {
"x": 0.0,
"y": -47.495,
"y": -47.4951905283833,
"z": 0.0
},
"x_axis": {
@ -1193,8 +1193,8 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "move_path_pen",
"path": "[uuid]",
"to": {
"x": 16.216,
"y": 53.151,
"x": 16.216216216216214,
"y": 53.15127018922193,
"z": 0.0
}
}
@ -1216,7 +1216,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "arc",
"center": {
"x": 0.0,
"y": 53.151
"y": 53.15127018922193
},
"radius": 16.216216216216214,
"start": {
@ -1279,7 +1279,7 @@ description: Artifact commands surgical-drill-guide.kcl
"path": "[uuid]",
"to": {
"x": 2.0,
"y": 53.151,
"y": 53.15127018922193,
"z": 0.0
}
}
@ -1301,7 +1301,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "arc",
"center": {
"x": 0.0,
"y": 53.151
"y": 53.15127018922193
},
"radius": 2.0,
"start": {
@ -1541,7 +1541,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "move_path_pen",
"path": "[uuid]",
"to": {
"x": 15.789,
"x": 15.789473684210527,
"y": 150.0,
"z": 0.0
}
@ -2010,7 +2010,7 @@ description: Artifact commands surgical-drill-guide.kcl
"type": "move_path_pen",
"path": "[uuid]",
"to": {
"x": 16.216,
"x": 16.216216216216214,
"y": 150.0,
"z": 0.0
}

View File

@ -652,7 +652,7 @@ description: Operations executed surgical-drill-guide.kcl
"offset": {
"value": {
"type": "Number",
"value": 28.495,
"value": 28.495190528383297,
"ty": {
"type": "Known",
"type": "Length",
@ -887,7 +887,7 @@ description: Operations executed surgical-drill-guide.kcl
"length": {
"value": {
"type": "Number",
"value": 0.667,
"value": 0.6666666666666666,
"ty": {
"type": "Default",
"len": {
@ -1038,7 +1038,7 @@ description: Operations executed surgical-drill-guide.kcl
"offset": {
"value": {
"type": "Number",
"value": 47.495,
"value": 47.4951905283833,
"ty": {
"type": "Known",
"type": "Length",
@ -1521,7 +1521,7 @@ description: Operations executed surgical-drill-guide.kcl
"length": {
"value": {
"type": "Number",
"value": 1.067,
"value": 1.0666666666666667,
"ty": {
"type": "Default",
"len": {
@ -1922,7 +1922,7 @@ description: Operations executed surgical-drill-guide.kcl
"name": "PI",
"value": {
"type": "Number",
"value": 3.142,
"value": 3.141592653589793,
"ty": {
"type": "Unknown"
}
@ -1938,7 +1938,7 @@ description: Operations executed surgical-drill-guide.kcl
"name": "E",
"value": {
"type": "Number",
"value": 2.718,
"value": 2.718281828459045,
"ty": {
"type": "Known",
"type": "Count"
@ -1955,7 +1955,7 @@ description: Operations executed surgical-drill-guide.kcl
"name": "TAU",
"value": {
"type": "Number",
"value": 6.283,
"value": 6.283185307179586,
"ty": {
"type": "Known",
"type": "Count"

View File

@ -43,17 +43,17 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"ccw": true,
"center": [
0.0,
53.151
53.15127018922193
],
"from": [
1.0,
53.151
53.15127018922193
],
"radius": 1.0,
"tag": null,
"to": [
1.0,
53.151
53.15127018922193
],
"type": "Circle",
"units": {
@ -126,11 +126,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"ccw": true,
"center": [
0.0,
53.151
53.15127018922193
],
"from": [
2.0,
53.151
53.15127018922193
],
"radius": 2.0,
"tag": {
@ -142,7 +142,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"to": [
2.0,
53.151
53.15127018922193
],
"type": "Circle",
"units": {
@ -196,17 +196,17 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"ccw": true,
"center": [
0.0,
53.151
53.15127018922193
],
"from": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"radius": 15.789473684210527,
"tag": null,
"to": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"type": "Circle",
"units": {
@ -219,7 +219,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -28.495,
"y": -28.495190528383297,
"z": 0.0,
"units": {
"type": "Mm"
@ -246,12 +246,12 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"to": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"units": {
"type": "Mm"
@ -283,11 +283,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"start": {
"from": [
2.0,
53.151
53.15127018922193
],
"to": [
2.0,
53.151
53.15127018922193
],
"units": {
"type": "Mm"
@ -349,11 +349,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"start": {
"from": [
1.0,
53.151
53.15127018922193
],
"to": [
1.0,
53.151
53.15127018922193
],
"units": {
"type": "Mm"
@ -562,13 +562,13 @@ description: Variables in memory after executing surgical-drill-guide.kcl
150.0
],
"from": [
15.789,
15.789473684210527,
150.0
],
"radius": 15.789473684210527,
"tag": null,
"to": [
15.789,
15.789473684210527,
150.0
],
"type": "Circle",
@ -609,11 +609,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
15.789,
15.789473684210527,
150.0
],
"to": [
15.789,
15.789473684210527,
150.0
],
"units": {
@ -769,17 +769,17 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"ccw": true,
"center": [
0.0,
53.151
53.15127018922193
],
"from": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"radius": 15.789473684210527,
"tag": null,
"to": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"type": "Circle",
"units": {
@ -819,12 +819,12 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"to": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"units": {
"type": "Mm"
@ -880,13 +880,13 @@ description: Variables in memory after executing surgical-drill-guide.kcl
150.0
],
"from": [
15.789,
15.789473684210527,
150.0
],
"radius": 15.789473684210527,
"tag": null,
"to": [
15.789,
15.789473684210527,
150.0
],
"type": "Circle",
@ -927,11 +927,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
15.789,
15.789473684210527,
150.0
],
"to": [
15.789,
15.789473684210527,
150.0
],
"units": {
@ -1024,17 +1024,17 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"ccw": true,
"center": [
0.0,
53.151
53.15127018922193
],
"from": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"radius": 15.789473684210527,
"tag": null,
"to": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"type": "Circle",
"units": {
@ -1047,7 +1047,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -28.495,
"y": -28.495190528383297,
"z": 0.0,
"units": {
"type": "Mm"
@ -1074,12 +1074,12 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"to": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"units": {
"type": "Mm"
@ -1135,13 +1135,13 @@ description: Variables in memory after executing surgical-drill-guide.kcl
150.0
],
"from": [
15.789,
15.789473684210527,
150.0
],
"radius": 15.789473684210527,
"tag": null,
"to": [
15.789,
15.789473684210527,
150.0
],
"type": "Circle",
@ -1182,11 +1182,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
15.789,
15.789473684210527,
150.0
],
"to": [
15.789,
15.789473684210527,
150.0
],
"units": {
@ -1431,7 +1431,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"ccw": false,
"center": [
0.0,
0.0000000000000013777276490407722,
13.5
],
"from": [
@ -1446,7 +1446,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg01"
},
"to": [
-6.495,
-6.495190528383287,
9.75
],
"type": "TangentialArc",
@ -1460,7 +1460,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"sourceRange": []
},
"from": [
-6.495,
-6.495190528383287,
9.75
],
"tag": {
@ -1471,8 +1471,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg03"
},
"to": [
-31.495,
53.051
-31.495190528383297,
53.05127018922193
],
"type": "ToPoint",
"units": {
@ -1485,8 +1485,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"sourceRange": []
},
"from": [
-31.495,
53.051
-31.495190528383297,
53.05127018922193
],
"tag": {
"commentStart": 926,
@ -1496,8 +1496,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg05"
},
"to": [
-36.691,
50.051
-36.69134295108993,
50.05127018922193
],
"type": "ToPoint",
"units": {
@ -1510,8 +1510,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"sourceRange": []
},
"from": [
-36.691,
50.051
-36.69134295108993,
50.05127018922193
],
"tag": {
"commentStart": 1009,
@ -1521,8 +1521,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg07"
},
"to": [
-11.691,
6.75
-11.691342951089919,
6.749999999999993
],
"type": "ToPoint",
"units": {
@ -1536,12 +1536,12 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"ccw": true,
"center": [
-0.0,
13.5
-0.000000000000007691850745534247,
13.49999999999999
],
"from": [
-11.691,
6.75
-11.691342951089919,
6.749999999999993
],
"tag": null,
"to": [
@ -1773,11 +1773,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"ccw": true,
"center": [
0.0,
53.151
53.15127018922193
],
"from": [
16.216,
53.151
16.216216216216214,
53.15127018922193
],
"radius": 16.216216216216214,
"tag": {
@ -1788,8 +1788,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg11"
},
"to": [
16.216,
53.151
16.216216216216214,
53.15127018922193
],
"type": "Circle",
"units": {
@ -1802,7 +1802,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -47.495,
"y": -47.4951905283833,
"z": 0.0,
"units": {
"type": "Mm"
@ -1829,12 +1829,12 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
16.216,
53.151
16.216216216216214,
53.15127018922193
],
"to": [
16.216,
53.151
16.216216216216214,
53.15127018922193
],
"units": {
"type": "Mm"
@ -1974,7 +1974,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
150.0
],
"from": [
16.216,
16.216216216216214,
150.0
],
"radius": 16.216216216216214,
@ -1986,7 +1986,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg08"
},
"to": [
16.216,
16.216216216216214,
150.0
],
"type": "Circle",
@ -2027,11 +2027,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
16.216,
16.216216216216214,
150.0
],
"to": [
16.216,
16.216216216216214,
150.0
],
"units": {
@ -2328,7 +2328,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"ccw": false,
"center": [
0.0,
0.0000000000000013777276490407722,
13.5
],
"from": [
@ -2343,7 +2343,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg01"
},
"to": [
-6.495,
-6.495190528383287,
9.75
],
"type": "TangentialArc",
@ -2357,7 +2357,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"sourceRange": []
},
"from": [
-6.495,
-6.495190528383287,
9.75
],
"tag": {
@ -2368,8 +2368,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg03"
},
"to": [
-31.495,
53.051
-31.495190528383297,
53.05127018922193
],
"type": "ToPoint",
"units": {
@ -2382,8 +2382,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"sourceRange": []
},
"from": [
-31.495,
53.051
-31.495190528383297,
53.05127018922193
],
"tag": {
"commentStart": 926,
@ -2393,8 +2393,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg05"
},
"to": [
-36.691,
50.051
-36.69134295108993,
50.05127018922193
],
"type": "ToPoint",
"units": {
@ -2407,8 +2407,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"sourceRange": []
},
"from": [
-36.691,
50.051
-36.69134295108993,
50.05127018922193
],
"tag": {
"commentStart": 1009,
@ -2418,8 +2418,8 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "seg07"
},
"to": [
-11.691,
6.75
-11.691342951089919,
6.749999999999993
],
"type": "ToPoint",
"units": {
@ -2433,12 +2433,12 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"ccw": true,
"center": [
-0.0,
13.5
-0.000000000000007691850745534247,
13.49999999999999
],
"from": [
-11.691,
6.75
-11.691342951089919,
6.749999999999993
],
"tag": null,
"to": [
@ -2698,11 +2698,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"ccw": true,
"center": [
0.0,
53.151
53.15127018922193
],
"from": [
2.0,
53.151
53.15127018922193
],
"radius": 2.0,
"tag": {
@ -2714,7 +2714,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"to": [
2.0,
53.151
53.15127018922193
],
"type": "Circle",
"units": {
@ -2768,17 +2768,17 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"ccw": true,
"center": [
0.0,
53.151
53.15127018922193
],
"from": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"radius": 15.789473684210527,
"tag": null,
"to": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"type": "Circle",
"units": {
@ -2791,7 +2791,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -28.495,
"y": -28.495190528383297,
"z": 0.0,
"units": {
"type": "Mm"
@ -2818,12 +2818,12 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"to": [
15.789,
53.151
15.789473684210527,
53.15127018922193
],
"units": {
"type": "Mm"
@ -2855,11 +2855,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"start": {
"from": [
2.0,
53.151
53.15127018922193
],
"to": [
2.0,
53.151
53.15127018922193
],
"units": {
"type": "Mm"
@ -3034,13 +3034,13 @@ description: Variables in memory after executing surgical-drill-guide.kcl
150.0
],
"from": [
15.789,
15.789473684210527,
150.0
],
"radius": 15.789473684210527,
"tag": null,
"to": [
15.789,
15.789473684210527,
150.0
],
"type": "Circle",
@ -3081,11 +3081,11 @@ description: Variables in memory after executing surgical-drill-guide.kcl
},
"start": {
"from": [
15.789,
15.789473684210527,
150.0
],
"to": [
15.789,
15.789473684210527,
150.0
],
"units": {