-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1066 lines (988 loc) · 57.6 KB
/
Copy pathindex.html
File metadata and controls
1066 lines (988 loc) · 57.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Center, rotate, and level 3D mesh files with a precise visual workspace.">
<meta name="theme-color" content="#b3b3b3">
<title>MeshToZero</title>
<link rel="icon" href="favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="styles.css">
<script>
(() => {
const savedTheme = localStorage.getItem("mesh-to-zero-theme");
const preferredTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = savedTheme || preferredTheme;
})();
</script>
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.185.1/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.185.1/examples/jsm/"
}
}
</script>
<script type="module" src="app.js"></script>
</head>
<body>
<svg class="icon-library" aria-hidden="true">
<symbol id="icon-import" viewBox="0 0 24 24">
<path d="M3.5 6.5h6l2 2h9v10.5a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 19V6.5Z"/>
<path d="M12 17V11m0 0-2.5 2.5M12 11l2.5 2.5"/>
</symbol>
<symbol id="icon-export" viewBox="0 0 24 24">
<path d="M12 15V3m0 0L8.5 6.5M12 3l3.5 3.5"/>
<path d="M5 11v8.5h14V11"/>
</symbol>
<symbol id="icon-undo" viewBox="0 0 24 24">
<path d="m9 7-5 5 5 5"/>
<path d="M5 12h8.5a5.5 5.5 0 0 1 5.5 5.5V19"/>
</symbol>
<symbol id="icon-redo" viewBox="0 0 24 24">
<path d="m15 7 5 5-5 5"/>
<path d="M19 12h-8.5A5.5 5.5 0 0 0 5 17.5V19"/>
</symbol>
<symbol id="icon-history" viewBox="0 0 24 24">
<path d="M3.5 8V3.5M3.5 8H8"/>
<path d="M4.7 6.2A9 9 0 1 1 3 14"/>
<path d="M12 7v5l3.5 2"/>
</symbol>
<symbol id="icon-sun" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="3.5"/>
<path d="M12 2v2m0 16v2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3 1.42-1.42"/>
</symbol>
<symbol id="icon-moon" viewBox="0 0 24 24">
<path d="M20 15.1A8.3 8.3 0 0 1 8.9 4a8.3 8.3 0 1 0 11.1 11.1Z"/>
</symbol>
<symbol id="icon-cube" viewBox="0 0 24 24">
<path d="m12 2.8 8 4.6v9.2l-8 4.6-8-4.6V7.4l8-4.6Z"/>
<path d="m4.4 7.6 7.6 4.5 7.6-4.5M12 12.1v8.6M7.9 5l8.2 14"/>
</symbol>
<symbol id="icon-level" viewBox="0 0 24 24">
<path d="M4 5h16M7 2v6m10-6v6M3 12h18M6 9v6m12-6v6M4 19h16"/>
<path d="m9 16 3 3 3-3"/>
</symbol>
<symbol id="icon-lay-flat" viewBox="0 0 24 24">
<path d="m5 5 14 4-3 7-14-4 3-7Z"/>
<path d="M20 4v5h-5M4 20h16"/>
</symbol>
<symbol id="icon-drop-bed" viewBox="0 0 24 24">
<path d="M12 3v12m0 0-4-4m4 4 4-4M4 20h16"/>
</symbol>
<symbol id="icon-plane" viewBox="0 0 24 24">
<rect x="3.5" y="3.5" width="17" height="17" rx="2"/>
<path d="M9 4v16m6-16v16M4 9h16M4 15h16"/>
</symbol>
<symbol id="icon-mesh" viewBox="0 0 24 24">
<rect x="3.5" y="3.5" width="17" height="17" rx="1.5"/>
<path d="M9 4v16m6-16v16M4 9h16M4 15h16"/>
</symbol>
<symbol id="icon-vertices" viewBox="0 0 24 24">
<path d="m12 3 8 9-8 9-8-9 8-9Z"/>
<circle class="icon-fill" cx="12" cy="3" r="1.7"/>
<circle class="icon-fill" cx="20" cy="12" r="1.7"/>
<circle class="icon-fill" cx="12" cy="21" r="1.7"/>
<circle class="icon-fill" cx="4" cy="12" r="1.7"/>
</symbol>
<symbol id="icon-edges" viewBox="0 0 24 24">
<rect x="4" y="4" width="16" height="16" rx="1"/>
<circle class="icon-fill" cx="4" cy="4" r="1.5"/>
<circle class="icon-fill" cx="20" cy="4" r="1.5"/>
<circle class="icon-fill" cx="20" cy="20" r="1.5"/>
<circle class="icon-fill" cx="4" cy="20" r="1.5"/>
</symbol>
<symbol id="icon-link" viewBox="0 0 24 24">
<path d="M10.5 13.5a4 4 0 0 0 5.7.1l2.2-2.2a4 4 0 0 0-5.7-5.7l-1.3 1.3"/>
<path d="M13.5 10.5a4 4 0 0 0-5.7-.1l-2.2 2.2a4 4 0 0 0 5.7 5.7l1.3-1.3"/>
</symbol>
<symbol id="icon-unlink" viewBox="0 0 24 24">
<path d="M15.5 14.5h.7a4 4 0 0 0 2.2-7.1l-1.8-1.8a4 4 0 0 0-5.7 0l-.5.5M8.5 9.5h-.7a4 4 0 0 0-2.2 7.1l1.8 1.8a4 4 0 0 0 5.7 0l.5-.5M4 4l16 16"/>
</symbol>
<symbol id="icon-orbit" viewBox="0 0 24 24">
<path d="M20.5 7.5V3.8l-2.2 2.1A8.5 8.5 0 0 0 4 9"/>
<path d="M3.5 16.5v3.7l2.2-2.1A8.5 8.5 0 0 0 20 15"/>
</symbol>
<symbol id="icon-move" viewBox="0 0 24 24">
<path d="M12 2v20M2 12h20"/>
<path d="m9 5 3-3 3 3M9 19l3 3 3-3M5 9l-3 3 3 3m14-6 3 3-3 3"/>
</symbol>
<symbol id="icon-rotate" viewBox="0 0 24 24">
<path d="M20 8V3l-2.6 2.6A8.5 8.5 0 1 0 20.2 15"/>
<path d="M20 3h-5"/>
</symbol>
<symbol id="icon-hand" viewBox="0 0 24 24">
<path d="M7.5 11V6.5a1.5 1.5 0 0 1 3 0V10m0-4.5V4a1.5 1.5 0 0 1 3 0v6m0-4.5a1.5 1.5 0 0 1 3 0V10m0-2.5a1.5 1.5 0 0 1 3 0V14c0 4.4-2.7 7-7 7h-.7a6 6 0 0 1-4.7-2.3L3.8 14a1.7 1.7 0 0 1 2.5-2.3L7.5 13v-2Z"/>
</symbol>
<symbol id="icon-zoom-in" viewBox="0 0 24 24">
<circle cx="10.5" cy="10.5" r="6.5"/>
<path d="m15.5 15.5 5 5M10.5 7.5v6m-3-3h6"/>
</symbol>
<symbol id="icon-zoom-out" viewBox="0 0 24 24">
<circle cx="10.5" cy="10.5" r="6.5"/>
<path d="m15.5 15.5 5 5M7.5 10.5h6"/>
</symbol>
<symbol id="icon-fit" viewBox="0 0 24 24">
<path d="M8 3H3v5m13-5h5v5M8 21H3v-5m13 5h5v-5"/>
<path d="M8 8h8v8H8z"/>
</symbol>
<symbol id="icon-focus" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="6"/>
<circle cx="12" cy="12" r="2"/>
<path d="M12 1v4m0 14v4M1 12h4m14 0h4"/>
</symbol>
<symbol id="icon-chevron" viewBox="0 0 24 24">
<path d="m8 10 4 4 4-4"/>
</symbol>
<symbol id="icon-check" viewBox="0 0 24 24">
<path d="m5 12 4 4L19 6"/>
</symbol>
<symbol id="icon-close" viewBox="0 0 24 24">
<path d="m6 6 12 12M18 6 6 18"/>
</symbol>
<symbol id="icon-eye" viewBox="0 0 24 24">
<path d="M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"/>
<circle cx="12" cy="12" r="2.6"/>
</symbol>
<symbol id="icon-trash" viewBox="0 0 24 24">
<path d="M4 7h16M9 3h6l1 4H8l1-4Zm-3 4 1 14h10l1-14M10 11v6m4-6v6"/>
</symbol>
<symbol id="icon-plus" viewBox="0 0 24 24">
<path d="M12 5v14M5 12h14"/>
</symbol>
<symbol id="icon-select" viewBox="0 0 24 24">
<path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5"/>
<path d="m10 9 8 3-4 2-2 4-2-9Z"/>
</symbol>
<symbol id="icon-measure" viewBox="0 0 24 24">
<path d="m5 19 14-14 2 2L7 21l-2-2Z"/>
<path d="m9 15 2 2m1-5 2 2m1-5 2 2M3 12a9 9 0 0 1 9-9M3 8v4h4"/>
</symbol>
</svg>
<div class="app-shell">
<main class="workspace" aria-label="3D mesh alignment workspace">
<canvas id="viewportCanvas" role="application" aria-label="Interactive 3D preview. Left-drag the transform gizmo, middle-drag to orbit, right-drag to pan, or left-click model references and visible planes while their tools are open."></canvas>
<div class="drop-overlay" id="dropOverlay" role="status" aria-live="polite" aria-hidden="true">
<div class="drop-card">
<span class="drop-icon" aria-hidden="true">
<svg class="icon"><use href="#icon-import"></use></svg>
</span>
<strong>Drop model to import</strong>
<span>PLY, OBJ, or STL</span>
</div>
</div>
<header class="topbar">
<div class="topbar-start">
<a class="brand" href="#" aria-label="MeshToZero home">
<img src="favicon.svg" alt="" width="64" height="48">
<span>MeshToZero</span>
</a>
<nav class="cad-menu-bar" aria-label="Application menu">
<details class="cad-menu">
<summary>File</summary>
<div class="cad-menu-popover">
<button id="menuImportButton" type="button" data-cad-command="import">
<span>Import Model</span><kbd>Ctrl+O</kbd>
</button>
<button id="menuExportButton" type="button" data-cad-command="export">
<span>Export Model</span><kbd>Ctrl+E</kbd>
</button>
<button type="button" data-cad-command="clear">
<span>Clear Model</span>
</button>
</div>
</details>
<details class="cad-menu">
<summary>Edit</summary>
<div class="cad-menu-popover">
<button id="menuUndoButton" type="button" data-cad-command="undo">
<span>Undo</span><kbd>Ctrl+Z</kbd>
</button>
<button id="menuRedoButton" type="button" data-cad-command="redo">
<span>Redo</span><kbd>Ctrl+Shift+Z</kbd>
</button>
</div>
</details>
<details class="cad-menu">
<summary>View</summary>
<div class="cad-menu-popover">
<button type="button" data-cad-command="fit">
<span>Fit Model</span><kbd>F</kbd>
</button>
<button type="button" data-cad-command="mesh"><span>Mesh</span><kbd>1</kbd></button>
<button type="button" data-cad-command="vertices"><span>Vertices</span><kbd>2</kbd></button>
<button type="button" data-cad-command="edges"><span>Edges</span><kbd>3</kbd></button>
<button type="button" data-cad-command="theme"><span>Switch Theme</span></button>
</div>
</details>
</nav>
</div>
<div class="header-actions">
<button class="action-button" id="importButton" type="button">
<svg class="icon" aria-hidden="true"><use href="#icon-import"></use></svg>
<span>Import Model</span>
</button>
<button class="action-button" id="exportButton" type="button" disabled>
<svg class="icon" aria-hidden="true"><use href="#icon-export"></use></svg>
<span>Export Model</span>
</button>
<button class="theme-toggle" id="themeToggle" type="button" aria-label="Switch theme">
<svg class="icon theme-icon theme-icon-sun" aria-hidden="true"><use href="#icon-sun"></use></svg>
<svg class="icon theme-icon theme-icon-moon" aria-hidden="true"><use href="#icon-moon"></use></svg>
</button>
<input id="fileInput" type="file" accept=".ply,.obj,.stl" hidden>
</div>
</header>
<div class="model-status" id="modelStatus" aria-live="polite" hidden>
<span class="status-dot" aria-hidden="true"></span>
<span id="modelName">Untitled mesh</span>
<button id="clearModelButton" type="button" aria-label="Clear selected model">×</button>
</div>
<aside class="left-rail" aria-label="Model tools">
<nav class="tool-panel" id="toolPanel" aria-label="Model tools">
<button class="rail-button select-tool-button" type="button" data-view-help="selection">
<svg class="icon" aria-hidden="true"><use href="#icon-select"></use></svg>
<span>Select</span>
</button>
<div class="tool-gizmo-slot" id="toolGizmoSlot"></div>
<button class="rail-button" type="button" data-section="rotation" aria-pressed="false" aria-controls="rotationWorkbench">
<svg class="icon" aria-hidden="true"><use href="#icon-cube"></use></svg>
<span>Auto Orient</span>
</button>
<button class="rail-button" type="button" data-section="level" aria-pressed="false" aria-controls="levelWorkbench">
<svg class="icon" aria-hidden="true"><use href="#icon-level"></use></svg>
<span>Align & Level</span>
</button>
<button class="rail-button" id="layFlatButton" type="button" data-section="lay-flat" aria-pressed="false" aria-controls="layFlatWorkbench">
<svg class="icon" aria-hidden="true"><use href="#icon-lay-flat"></use></svg>
<span>Lay Flat</span>
</button>
<button class="rail-button" id="dropToBedButton" type="button">
<svg class="icon" aria-hidden="true"><use href="#icon-drop-bed"></use></svg>
<span>Drop to Bed</span>
</button>
<button class="rail-button" id="planeButton" type="button" aria-expanded="false" aria-controls="planeWorkbench">
<svg class="icon" aria-hidden="true"><use href="#icon-plane"></use></svg>
<span>Create Plane</span>
</button>
<button class="rail-button" id="inspectButton" type="button" data-section="inspect" aria-pressed="false" aria-controls="inspectWorkbench">
<svg class="icon" aria-hidden="true"><use href="#icon-measure"></use></svg>
<span>Plane Inspector</span>
</button>
</nav>
<section class="browser-panel" aria-labelledby="browserTitle">
<header class="browser-header">
<h2 id="browserTitle">Browser</h2>
</header>
<div class="browser-tree">
<div class="browser-model-row">
<svg class="icon" aria-hidden="true"><use href="#icon-cube"></use></svg>
<span>
<strong id="browserModelName">Demo Model</strong>
<small>Selected mesh</small>
</span>
</div>
<section class="browser-group" aria-labelledby="browserOriginTitle">
<h3 id="browserOriginTitle">
<svg class="icon" aria-hidden="true"><use href="#icon-focus"></use></svg>
<span>Origin</span>
</h3>
<div class="browser-slot" id="browserOriginSlot"></div>
</section>
<section class="browser-group" aria-labelledby="browserPlanesTitle">
<h3 id="browserPlanesTitle">
<svg class="icon" aria-hidden="true"><use href="#icon-plane"></use></svg>
<span>Construction Planes</span>
</h3>
<div class="browser-slot" id="browserPlaneSlot"></div>
</section>
<section class="browser-group browser-history-group" aria-labelledby="browserHistoryTitle">
<h3 id="browserHistoryTitle">
<svg class="icon" aria-hidden="true"><use href="#icon-history"></use></svg>
<span>Transform History</span>
</h3>
<div class="browser-slot" id="browserHistorySlot"></div>
</section>
</div>
</section>
<section class="plane-workbench" id="planeWorkbench" aria-labelledby="planeWorkbenchTitle" hidden>
<header class="workbench-header">
<div>
<p class="eyebrow">Construction geometry</p>
<h2 id="planeWorkbenchTitle">Create Plane</h2>
</div>
<button class="icon-button" id="closePlaneWorkbench" type="button" aria-label="Close plane tools">
<svg class="icon" aria-hidden="true"><use href="#icon-close"></use></svg>
</button>
</header>
<div class="workbench-scroll">
<section class="origin-plane-section" aria-labelledby="originPlanesTitle">
<p class="workbench-label" id="originPlanesTitle">Origin planes</p>
<div class="origin-plane-list">
<button class="origin-plane-toggle is-active" type="button" data-origin-plane="top" aria-pressed="true">
<span>
<strong>Top</strong>
<small>XY · Z = 0</small>
</span>
<span class="toggle-track" aria-hidden="true"><span></span></span>
</button>
<button class="origin-plane-toggle is-active" type="button" data-origin-plane="front" aria-pressed="true">
<span>
<strong>Front</strong>
<small>XZ · Y = 0</small>
</span>
<span class="toggle-track" aria-hidden="true"><span></span></span>
</button>
<button class="origin-plane-toggle is-active" type="button" data-origin-plane="right" aria-pressed="true">
<span>
<strong>Right</strong>
<small>YZ · X = 0</small>
</span>
<span class="toggle-track" aria-hidden="true"><span></span></span>
</button>
</div>
</section>
<section class="plane-mode-section" aria-labelledby="planeModeTitle">
<p class="workbench-label" id="planeModeTitle">Creation mode</p>
<div class="plane-mode-switch" role="group" aria-label="Plane creation mode">
<button class="plane-mode-button is-active" type="button" data-plane-mode="automatic" aria-pressed="true">
<strong>Automatic</strong>
<small>Analyze model</small>
</button>
<button class="plane-mode-button" type="button" data-plane-mode="manual" aria-pressed="false">
<strong>Manual</strong>
<small>Pick references</small>
</button>
</div>
<p class="plane-mode-description" id="planeModeDescription">Create planes from the complete model automatically.</p>
</section>
<section class="model-center-section" id="modelCenterSection" aria-labelledby="modelCenterTitle" hidden>
<p class="workbench-label" id="modelCenterTitle">Point reference</p>
<div class="model-center-card">
<div class="model-center-summary">
<span class="model-center-symbol" aria-hidden="true">
<svg class="icon"><use href="#icon-focus"></use></svg>
</span>
<span class="model-center-copy">
<strong>Model center</strong>
<small>Exact source-space AABB midpoint</small>
</span>
<button class="plane-row-action" id="modelCenterVisibility" type="button" aria-label="Hide model center" aria-pressed="true">
<svg class="icon" aria-hidden="true"><use href="#icon-eye"></use></svg>
</button>
</div>
<div class="model-center-coordinates">
<span>Source</span>
<strong id="modelCenterLocal">X 0 · Y 0 · Z 0</strong>
<span>World</span>
<strong id="modelCenterWorld">X 0 · Y 0 · Z 0</strong>
</div>
<button class="model-center-use" id="useModelCenter" type="button">
<svg class="icon" aria-hidden="true"><use href="#icon-plus"></use></svg>
<span>Use as point</span>
</button>
</div>
</section>
<div class="method-section">
<p class="workbench-label" id="planeMethodGroupLabel">Automatic methods</p>
<div class="plane-methods" data-plane-mode-panel="automatic" role="group" aria-label="Automatic construction plane method">
<button class="method-button is-active" type="button" data-plane-method="auto-axes" aria-pressed="true">Auto Axes</button>
<button class="method-button" type="button" data-plane-method="bounds" aria-pressed="false">Boundary Box</button>
</div>
<div class="plane-methods" data-plane-mode-panel="manual" role="group" aria-label="Manual construction plane method" hidden>
<button class="method-button" type="button" data-plane-method="planar-surface" aria-pressed="false">Planar Surface</button>
<button class="method-button is-active" type="button" data-plane-method="three-points" aria-pressed="true">3 Points</button>
<button class="method-button" type="button" data-plane-method="best-fit" aria-pressed="false">Best Fit</button>
<button class="method-button" type="button" data-plane-method="tangent" aria-pressed="false">Tangent</button>
<button class="method-button" type="button" data-plane-method="two-edges" aria-pressed="false">2 Edges</button>
<button class="method-button" type="button" data-plane-method="along-path" aria-pressed="false">Along Path</button>
<button class="method-button" type="button" data-plane-method="offset" aria-pressed="false">Offset</button>
<button class="method-button" type="button" data-plane-method="angle" aria-pressed="false">At Angle</button>
<button class="method-button" type="button" data-plane-method="midplane" aria-pressed="false">Midplane</button>
<button class="method-button" type="button" data-plane-method="perpendicular" aria-pressed="false">Perpendicular</button>
</div>
<p class="method-description" id="planeMethodDescription"></p>
</div>
<div class="workbench-fields">
<label class="workbench-field" id="referenceAField" hidden>
<span>Reference plane</span>
<select id="planeReferenceA"></select>
</label>
<label class="workbench-field" id="referenceBField" hidden>
<span>Second plane</span>
<select id="planeReferenceB"></select>
</label>
<label class="workbench-field" id="distanceField" hidden>
<span>Distance</span>
<span class="unit-input"><input id="planeDistance" type="number" value="10" step="0.1"><small>mm</small></span>
</label>
<label class="workbench-field" id="angleField" hidden>
<span>Angle</span>
<span class="unit-input"><input id="planeAngle" type="number" value="45" step="1"><small>deg</small></span>
</label>
<label class="workbench-field" id="pathPositionField" hidden>
<span>Path position</span>
<span class="unit-input"><input id="pathPosition" type="number" value="50" min="0" max="100" step="1"><small>%</small></span>
</label>
<label class="workbench-field" id="boundsOrientationField" hidden>
<span>Box orientation</span>
<select id="boundsOrientation">
<option value="model">Model axes (oriented)</option>
<option value="source">Source axes (AABB)</option>
</select>
</label>
<label class="workbench-field" id="boundsSetField" hidden>
<span>Plane set</span>
<select id="boundsPlaneSet">
<option value="faces">6 boundary faces</option>
<option value="centers">3 center planes</option>
</select>
</label>
<label class="workbench-field">
<span>Name</span>
<input id="planeName" type="text" maxlength="48" placeholder="Automatic name">
</label>
</div>
<section class="reference-selection" id="referenceSelection" aria-labelledby="selectionTitle">
<div class="selection-heading">
<div>
<p class="workbench-label" id="selectionTitle">Model references</p>
<strong id="selectionCount">0 / 3 points</strong>
</div>
<button class="text-button" id="clearPlaneSelection" type="button">Clear</button>
</div>
<p id="selectionInstruction">Left-click three model vertices.</p>
<div class="selection-dots" id="selectionDots" aria-hidden="true"></div>
</section>
<section class="bounds-readout" id="boundsReadout" hidden>
<div>
<span>Source AABB center</span>
<strong id="boundsCenter">X 0 · Y 0 · Z 0</strong>
</div>
<div>
<span>Source AABB size</span>
<strong id="boundsSize">X 0 · Y 0 · Z 0</strong>
</div>
</section>
<button class="create-plane-button" id="createPlaneButton" type="button">
<svg class="icon" aria-hidden="true"><use href="#icon-plus"></use></svg>
<span>Create Plane</span>
</button>
<section class="created-section" aria-labelledby="createdPlanesTitle">
<div class="created-heading">
<p class="workbench-label" id="createdPlanesTitle">Created planes</p>
<button class="text-button" id="clearCreatedPlanes" type="button">Clear all</button>
</div>
<div class="created-plane-list" id="createdPlaneList">
<p class="empty-planes">No construction planes yet.</p>
</div>
</section>
</div>
</section>
<section class="alignment-workbench lay-flat-workbench" id="layFlatWorkbench" aria-labelledby="layFlatWorkbenchTitle" hidden>
<header class="workbench-header">
<div>
<p class="eyebrow">Bed placement</p>
<h2 id="layFlatWorkbenchTitle">Lay Flat</h2>
</div>
<button class="icon-button" id="closeLayFlatWorkbench" type="button" aria-label="Cancel Lay Flat">
<svg class="icon" aria-hidden="true"><use href="#icon-close"></use></svg>
</button>
</header>
<div class="workbench-scroll">
<p class="alignment-copy">Choose a flat model surface. MeshToZero fits its local plane, turns the model from its current state, and places that surface on Z = 0.</p>
<div class="alignment-empty lay-flat-selection" role="status" aria-live="polite">
<svg class="icon" aria-hidden="true"><use href="#icon-lay-flat"></use></svg>
<strong id="layFlatSelectionStatus">Choose a planar surface</strong>
<span id="layFlatSelectionHint">Left-click away from edges. Meshes and point clouds are supported.</span>
</div>
<p class="alignment-hint">The side that keeps the rest of the model above the bed is selected automatically. The operation is saved as one undoable edit.</p>
<div class="alignment-actions lay-flat-actions">
<button class="alignment-cancel-button" id="cancelLayFlat" type="button">Cancel</button>
</div>
</div>
</section>
<section class="alignment-workbench inspect-workbench" id="inspectWorkbench" aria-labelledby="inspectWorkbenchTitle" hidden>
<header class="workbench-header">
<div>
<p class="eyebrow">Surface deviation</p>
<h2 id="inspectWorkbenchTitle">Plane Inspector</h2>
</div>
<button class="icon-button" id="closeInspectWorkbench" type="button" aria-label="Close Plane Inspector">
<svg class="icon" aria-hidden="true"><use href="#icon-close"></use></svg>
</button>
</header>
<div class="workbench-scroll">
<p class="alignment-copy">Fit a plane to a model surface, then compare it with the exact MeshToZero plane you choose.</p>
<section class="inspect-step" aria-labelledby="inspectSurfaceStepTitle">
<header class="inspect-step-heading">
<span class="inspect-step-number" aria-hidden="true">1</span>
<span>
<small>Model geometry</small>
<strong id="inspectSurfaceStepTitle">Choose surface</strong>
</span>
</header>
<div class="alignment-empty inspect-empty" id="inspectSurfaceEmpty" role="status" aria-live="polite" data-state="waiting">
<svg class="icon" aria-hidden="true"><use href="#icon-plane"></use></svg>
<strong id="inspectSurfaceStatus">Click a planar surface</strong>
<span id="inspectSurfaceHint">Click away from edges. Meshes and point clouds are supported.</span>
</div>
</section>
<section class="inspect-reference-section" aria-labelledby="inspectReferenceTitle">
<header class="inspect-step-heading">
<span class="inspect-step-number" aria-hidden="true">2</span>
<span>
<small>Comparison target</small>
<strong id="inspectReferenceTitle">Choose reference plane</strong>
</span>
</header>
<div class="inspect-axis-buttons" role="group" aria-label="MeshToZero world planes">
<button type="button" data-inspect-reference-plane="world-yz" aria-pressed="false">
<strong>X</strong><small>Right · YZ</small>
</button>
<button type="button" data-inspect-reference-plane="world-xz" aria-pressed="false">
<strong>Y</strong><small>Front · XZ</small>
</button>
<button class="is-active" type="button" data-inspect-reference-plane="world-xy" aria-pressed="true">
<strong>Z</strong><small>Top · XY</small>
</button>
</div>
<label class="workbench-field inspect-reference-field">
<span>World or construction plane</span>
<select id="inspectReferencePlane" aria-describedby="inspectReferenceHint"></select>
</label>
<p class="alignment-hint" id="inspectReferenceHint">After choosing the surface, select here or click any visible origin or construction plane in the viewport.</p>
</section>
<section class="inspect-results" id="inspectSurfaceResults" aria-labelledby="inspectSurfaceResultTitle" hidden>
<div class="inspect-primary-result">
<span id="inspectSurfaceResultTitle">Angular deviation</span>
<strong id="inspectComparisonAngle">0.000°</strong>
<output id="inspectComparisonPlane">Surface ↔ Z · Top (XY)</output>
</div>
<div class="inspect-value-grid" aria-label="Plane comparison details">
<div><span>Alignment</span><output id="inspectAlignmentState">Exact</output></div>
<div><span>Normal match</span><output id="inspectNormalMatch">100.0000%</output></div>
<div><span>Fit samples</span><output id="inspectSampleCount">0</output></div>
<div><span>Fit RMS</span><output id="inspectFitRms">0.000 mm</output></div>
</div>
<dl class="inspect-detail-list">
<div><dt>Surface normal · world</dt><dd id="inspectSurfaceNormal">X 0 · Y 0 · Z 1</dd></div>
<div><dt>Reference normal · world</dt><dd id="inspectReferenceNormal">X 0 · Y 0 · Z 1</dd></div>
<div><dt>Selected surface point</dt><dd id="inspectSurfacePoint">X 0 · Y 0 · Z 0</dd></div>
<div><dt>Reference plane origin</dt><dd id="inspectReferenceOrigin">X 0 · Y 0 · Z 0</dd></div>
</dl>
</section>
<div class="alignment-actions inspect-actions">
<button class="alignment-cancel-button" id="clearInspection" type="button" disabled>Choose Another Surface</button>
</div>
</div>
</section>
<section class="alignment-workbench" id="rotationWorkbench" aria-labelledby="rotationWorkbenchTitle" hidden>
<header class="workbench-header">
<div>
<p class="eyebrow">Automatic alignment</p>
<h2 id="rotationWorkbenchTitle">Auto Orient</h2>
</div>
<button class="icon-button" id="closeRotationWorkbench" type="button" aria-label="Cancel automatic alignment">
<svg class="icon" aria-hidden="true"><use href="#icon-close"></use></svg>
</button>
</header>
<div class="workbench-scroll">
<p class="alignment-copy">MeshToZero detects planar or dominant surface directions, cylindrical or elongated axes, and whole-model principal directions. Choose the interpretation that matches your model; position and scale stay unchanged.</p>
<div class="alignment-status" id="rotationAnalysisStatus" role="status" aria-live="polite">
<span class="alignment-status-dot" aria-hidden="true"></span>
<span id="rotationAnalysisText">Ready to analyze the model.</span>
</div>
<section class="orientation-results" id="orientationResults" aria-labelledby="orientationResultsTitle" hidden>
<div class="orientation-target-field">
<span class="workbench-label">Align detected plane with</span>
<div class="orientation-target-buttons" role="group" aria-label="Auto orientation target plane">
<button type="button" data-orientation-target="x" aria-pressed="false"><strong>X</strong><small>Right · YZ</small></button>
<button type="button" data-orientation-target="y" aria-pressed="false"><strong>Y</strong><small>Front · XZ</small></button>
<button class="is-active" type="button" data-orientation-target="z" aria-pressed="true"><strong>Z</strong><small>Top · XY</small></button>
</div>
</div>
<div class="alignment-section-heading">
<p class="workbench-label" id="orientationResultsTitle">Detected reference planes</p>
<button class="text-button" id="recalculateOrientation" type="button">Recalculate</button>
</div>
<div class="orientation-candidate-list" id="orientationCandidateList" role="listbox" aria-label="Automatic orientation candidates"></div>
<p class="alignment-hint">Selecting a result previews both the rotation and a blue reference plane through the model center. The plane is saved as construction geometry when you apply.</p>
<div class="orientation-adjustments">
<button class="alignment-adjust-button" id="flipOrientationNormal" type="button" aria-pressed="false" disabled>
<svg class="icon" aria-hidden="true"><use href="#icon-level"></use></svg>
<span>Flip side</span>
</button>
<button class="alignment-adjust-button" id="turnOrientation" type="button" disabled>
<svg class="icon" aria-hidden="true"><use href="#icon-orbit"></use></svg>
<span>Turn 90° around Z</span>
</button>
</div>
</section>
<button class="alignment-analyze-button" id="analyzeOrientation" type="button">
<svg class="icon" aria-hidden="true"><use href="#icon-cube"></use></svg>
<span>Find Alignment Variants</span>
</button>
<div class="alignment-actions">
<button class="alignment-cancel-button" id="cancelOrientation" type="button">Cancel</button>
<button class="alignment-apply-button" id="applyOrientation" type="button" disabled>
<svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg>
<span>Apply Auto Orient</span>
</button>
</div>
</div>
</section>
<section class="alignment-workbench" id="levelWorkbench" aria-labelledby="levelWorkbenchTitle" hidden>
<header class="workbench-header">
<div>
<p class="eyebrow">Reference alignment</p>
<h2 id="levelWorkbenchTitle">Align & Level</h2>
</div>
<button class="icon-button" id="closeLevelWorkbench" type="button" aria-label="Cancel manual alignment">
<svg class="icon" aria-hidden="true"><use href="#icon-close"></use></svg>
</button>
</header>
<div class="workbench-scroll">
<div class="level-mode-switch" role="group" aria-label="Alignment method">
<button class="level-mode-button is-active" type="button" data-level-mode="plane" aria-controls="levelPlanePanel" aria-pressed="true">
<strong>Plane to Plane</strong>
<small>Position + rotation</small>
</button>
<button class="level-mode-button" type="button" data-level-mode="snap" aria-controls="snapAlignPanel" aria-pressed="false">
<strong>Snap to Snap</strong>
<small>Exact translation</small>
</button>
</div>
<div id="levelPlanePanel">
<p class="alignment-copy">A model plane supplies an exact origin, normal, and in-plane X direction. Matching all three can place a flat face on an origin plane or align a center plane precisely.</p>
<div class="alignment-empty" id="levelEmptyState">
<svg class="icon" aria-hidden="true"><use href="#icon-plane"></use></svg>
<strong>Create a model plane first</strong>
<span>Use a face, three points, two edges, or best fit in the Plane tool.</span>
<button class="alignment-adjust-button" id="openPlaneForLevel" type="button">Open Plane Tool</button>
</div>
<div id="levelControls" hidden>
<div class="alignment-pick-tip" id="levelPlanePickHint">
<svg class="icon" aria-hidden="true"><use href="#icon-plane"></use></svg>
<span><strong>Pick in the viewport</strong> Click a model plane for Source, or click the Top, Front, or Right origin grid for Target.</span>
</div>
<div class="alignment-fields">
<label class="workbench-field">
<span>Model reference</span>
<select id="levelSourcePlane" aria-describedby="levelPlanePickHint"></select>
</label>
<label class="workbench-field">
<span>World target</span>
<select id="levelTargetPlane" aria-describedby="levelPlanePickHint">
<option value="z">Top (XY) · Normal +Z</option>
<option value="y">Front (XZ) · Normal +Y</option>
<option value="x">Right (YZ) · Normal +X</option>
</select>
</label>
</div>
<div class="alignment-summary" id="levelAlignmentSummary">Plane normal → +Z · Plane offset on Z → 0 · Composed from current state</div>
<div class="alignment-adjustments">
<button class="alignment-adjust-button" id="flipLevelNormal" type="button" aria-pressed="false">
<svg class="icon" aria-hidden="true"><use href="#icon-level"></use></svg>
<span>Flip Normal</span>
</button>
<button class="alignment-adjust-button" id="turnLevelDirection" type="button">
<svg class="icon" aria-hidden="true"><use href="#icon-orbit"></use></svg>
<span>Turn 90°</span>
</button>
</div>
<p class="alignment-hint">The preview adds the smallest rotation to the current model state, then moves only along the target plane normal. Apply keeps that result as the base for the next alignment; Cancel restores the previous transform.</p>
</div>
</div>
<div id="snapAlignPanel" hidden>
<p class="alignment-copy">Choose one snap on the model, then a fixed point in world space. The model is translated exactly; its rotation and scale stay unchanged.</p>
<div class="alignment-pick-tip snap-align-pick-tip" id="snapAlignPickHint" role="status" aria-live="polite">
<svg class="icon" aria-hidden="true"><use href="#icon-focus"></use></svg>
<span><strong id="snapAlignPickTitle">Choose Source</strong><span id="snapAlignPickText">Enable Vertex, Midpoint, Edge, Face, Center, or Intersection below, then click its marker on the model.</span></span>
</div>
<div class="snap-align-steps">
<section class="snap-align-step is-active" id="snapAlignSourceStep" data-state="active" aria-labelledby="snapAlignSourceTitle">
<header>
<span class="snap-align-step-number" aria-hidden="true">1</span>
<span>
<small>Model point</small>
<strong id="snapAlignSourceTitle">Source</strong>
</span>
</header>
<strong class="snap-align-value" id="snapAlignSourceValue">Not selected</strong>
<small class="snap-align-coordinates" id="snapAlignSourceCoordinates">Choose a model snap in the viewport.</small>
<div class="snap-align-step-actions">
<button class="alignment-adjust-button" id="useSnapModelCenter" type="button">Use Model Center</button>
<button class="alignment-adjust-button" id="repickSnapSource" type="button" disabled>Repick</button>
</div>
</section>
<section class="snap-align-step" id="snapAlignTargetStep" data-state="pending" aria-labelledby="snapAlignTargetTitle">
<header>
<span class="snap-align-step-number" aria-hidden="true">2</span>
<span>
<small>Fixed world point</small>
<strong id="snapAlignTargetTitle">Target</strong>
</span>
</header>
<strong class="snap-align-value" id="snapAlignTargetValue">Waiting for Source</strong>
<small class="snap-align-coordinates" id="snapAlignTargetCoordinates">Grid, world-plane intersection, or origin.</small>
<div class="snap-align-step-actions">
<button class="alignment-adjust-button" id="useSnapWorldOrigin" type="button" disabled>Use World Origin</button>
<button class="alignment-adjust-button" id="repickSnapTarget" type="button" disabled>Repick</button>
</div>
</section>
</div>
<div class="alignment-summary" id="snapAlignSummary" hidden>Translation ΔX 0 · ΔY 0 · ΔZ 0</div>
<p class="alignment-hint" id="snapAlignModeHint">Active snaps are shown in the lower toolbar. Grid and world-plane Intersection can be used as fixed targets.</p>
</div>
<div class="alignment-actions">
<button class="alignment-cancel-button" id="cancelLevel" type="button">Cancel</button>
<button class="alignment-apply-button" id="applyLevel" type="button" disabled>
<svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg>
<span>Apply Alignment</span>
</button>
</div>
</div>
</section>
</aside>
<div class="viewport-display-slot" id="viewportDisplaySlot"></div>
<aside class="right-rail" aria-label="Tool settings and transforms">
<section class="inspector-panel" aria-label="Active tool settings">
<div class="inspector-empty" id="inspectorEmpty">
<svg class="icon" aria-hidden="true"><use href="#icon-select"></use></svg>
<strong>No active operation</strong>
<span>Choose an alignment, inspection, or construction tool from the left toolbar.</span>
</div>
<div class="inspector-workbench-slot" id="inspectorWorkbenchSlot"></div>
</section>
<div class="display-tabs" role="group" aria-label="Display mode">
<button class="display-tab is-active" type="button" data-display-mode="mesh" aria-pressed="true">
<svg class="icon" aria-hidden="true"><use href="#icon-mesh"></use></svg>
<span>Mesh</span>
</button>
<button class="display-tab" type="button" data-display-mode="vertices" aria-pressed="false">
<svg class="icon" aria-hidden="true"><use href="#icon-vertices"></use></svg>
<span>Vertices</span>
</button>
<button class="display-tab" type="button" data-display-mode="edges" aria-pressed="false">
<svg class="icon" aria-hidden="true"><use href="#icon-edges"></use></svg>
<span>Edges</span>
</button>
</div>
<section class="transform-card" aria-labelledby="transformTitle">
<div class="card-heading">
<div>
<p class="eyebrow">Selected mesh</p>
<h1 id="transformTitle">Transform</h1>
</div>
<span class="selection-chip">Cube</span>
</div>
<section class="gizmo-controls" aria-labelledby="gizmoControlsTitle">
<div class="gizmo-heading-row">
<span id="gizmoControlsTitle">Transform Gizmo</span>
<small>Model center pivot</small>
</div>
<div class="gizmo-control-row">
<div class="gizmo-segment" role="group" aria-label="Gizmo operation">
<button class="gizmo-option is-active" type="button" data-gizmo-mode="translate" aria-pressed="true">
<svg class="icon" aria-hidden="true"><use href="#icon-move"></use></svg>
<span>Move</span>
</button>
<button class="gizmo-option" type="button" data-gizmo-mode="rotate" aria-pressed="false">
<svg class="icon" aria-hidden="true"><use href="#icon-rotate"></use></svg>
<span>Rotate</span>
</button>
</div>
<div class="gizmo-segment gizmo-space-segment" role="group" aria-label="Gizmo coordinate space">
<button class="gizmo-option is-active" type="button" data-gizmo-space="world" aria-pressed="true">World</button>
<button class="gizmo-option" type="button" data-gizmo-space="local" aria-pressed="false">Local</button>
</div>
</div>
<div class="gizmo-snap-grid">
<div class="gizmo-snap-control">
<label class="gizmo-snap-heading">
<input id="gridSnapEnabled" type="checkbox">
<span class="gizmo-toggle-track" aria-hidden="true"><span></span></span>
<span>Grid Snap</span>
</label>
<label class="gizmo-snap-value">
<input id="gridSnapStep" type="number" value="1" min="0.000001" step="0.1" aria-label="Grid snap step in millimeters">
<small>mm</small>
</label>
</div>
<div class="gizmo-snap-control">
<label class="gizmo-snap-heading">
<input id="angleSnapEnabled" type="checkbox">
<span class="gizmo-toggle-track" aria-hidden="true"><span></span></span>
<span>Angle Snap</span>
</label>
<label class="gizmo-snap-value">
<input id="angleSnapStep" type="number" value="15" min="0.1" max="180" step="1" aria-label="Rotation snap step in degrees">
<small>deg</small>
</label>
</div>
</div>
</section>
<div class="transform-group">
<div class="group-label-row">
<label>Position</label>
<span>mm</span>
</div>
<div class="field-row">
<label class="axis-field">
<span>X</span>
<input type="number" value="0.000" step="0.1" data-transform="position" data-axis="x" aria-label="Position X in millimeters">
</label>
<label class="axis-field">
<span>Y</span>
<input type="number" value="0.000" step="0.1" data-transform="position" data-axis="y" aria-label="Position Y in millimeters">
</label>
<label class="axis-field">
<span>Z</span>
<input type="number" value="0.000" step="0.1" data-transform="position" data-axis="z" aria-label="Position Z in millimeters">
</label>
</div>
</div>
<div class="transform-group">
<div class="group-label-row">
<label>Rotation</label>
<span>deg</span>
</div>
<div class="field-row">
<label class="axis-field">
<span>X</span>
<input type="number" value="0.00" step="1" data-transform="rotation" data-axis="x" aria-label="Rotation X in degrees">
</label>
<label class="axis-field">
<span>Y</span>
<input type="number" value="0.00" step="1" data-transform="rotation" data-axis="y" aria-label="Rotation Y in degrees">
</label>
<label class="axis-field">
<span>Z</span>
<input type="number" value="0.00" step="1" data-transform="rotation" data-axis="z" aria-label="Rotation Z in degrees">
</label>
</div>
</div>
<div class="transform-group scale-group">
<div class="group-label-row">
<label>Scale</label>
<button class="link-button is-linked" id="linkScaleButton" type="button" aria-label="Unlink scale axes" aria-pressed="true">
<svg class="icon link-icon" aria-hidden="true"><use href="#icon-link"></use></svg>
<svg class="icon unlink-icon" aria-hidden="true"><use href="#icon-unlink"></use></svg>
</button>
</div>
<div class="field-row">
<label class="axis-field">
<span>X</span>
<input type="number" value="1.000" min="0.05" step="0.05" data-transform="scale" data-axis="x" aria-label="Scale X">
</label>
<label class="axis-field">
<span>Y</span>
<input type="number" value="1.000" min="0.05" step="0.05" data-transform="scale" data-axis="y" aria-label="Scale Y">
</label>
<label class="axis-field">
<span>Z</span>
<input type="number" value="1.000" min="0.05" step="0.05" data-transform="scale" data-axis="z" aria-label="Scale Z">
</label>
</div>
</div>
<button class="primary-button" id="centerButton" type="button">
<svg class="icon" aria-hidden="true"><use href="#icon-focus"></use></svg>
<span>Center to Origin</span>
</button>
</section>
<section class="history-panel" id="historyPanel" aria-labelledby="historyPanelTitle">
<button class="history-panel-toggle" id="historyPanelToggle" type="button" aria-expanded="true" aria-controls="historyPanelBody">
<span class="history-panel-heading">
<svg class="icon" aria-hidden="true"><use href="#icon-history"></use></svg>
<span>
<small>Document states</small>
<strong id="historyPanelTitle">Transform History</strong>
</span>
</span>
<span class="history-panel-meta">
<span id="historyPosition">0 / 0</span>
<svg class="icon history-panel-chevron" aria-hidden="true"><use href="#icon-chevron"></use></svg>
</span>
</button>
<div class="history-panel-body" id="historyPanelBody">
<div class="history-list" id="historyList" role="listbox" aria-label="Transform history states"></div>
<p class="history-panel-note">Choose any state to restore the model and its planes. A new edit replaces later states.</p>
</div>
</section>
</aside>
<footer class="cad-statusbar" role="group" aria-label="Coordinate space and snapping">
<div class="status-space-slot" id="statusSpaceSlot"></div>
<div class="status-snap-slot" id="statusSnapSlot"></div>
<div class="status-snap-modes" role="group" aria-label="Object snap modes">
<span>SNAP</span>
<button class="status-snap-button" type="button" data-snap-mode="grid" aria-label="Toggle grid snap" title="Grid — snap translations to the grid step" aria-pressed="false">Grid</button>
<button class="status-snap-button" type="button" data-snap-mode="vertex" aria-label="Toggle vertex snap" title="Vertex — snap to mesh and point-cloud vertices" aria-pressed="false">Vertex</button>
<button class="status-snap-button" type="button" data-snap-mode="midpoint" aria-label="Toggle midpoint snap" title="Midpoint — snap to the middle of an edge" aria-pressed="false">Midpoint</button>
<button class="status-snap-button" type="button" data-snap-mode="edge" aria-label="Toggle edge snap" title="Edge — snap to the nearest point on an edge" aria-pressed="false">Edge</button>
<button class="status-snap-button" type="button" data-snap-mode="face" aria-label="Toggle face snap" title="Face — snap to the model surface" aria-pressed="false">Face</button>
<button class="status-snap-button" type="button" data-snap-mode="center" aria-label="Toggle center snap" title="Center — snap to circle, bounds, and model centers" aria-pressed="false">Center</button>
<button class="status-snap-button" type="button" data-snap-mode="intersection" aria-label="Toggle plane intersection snap" title="Intersection — snap to the intersection of visible planes" aria-pressed="false">Intersection</button>
</div>
<div class="status-help-slot" id="statusHelpSlot"></div>