-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
147 lines (129 loc) · 5.51 KB
/
index.html
File metadata and controls
147 lines (129 loc) · 5.51 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>QS Box Takeoff Multi</title>
<link rel="stylesheet" href="./style.css" />
<!-- Import map required by index.js (three + addons) -->
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/"
}
}
</script>
</head>
<body>
<div id="ui">
<div class="ui-title">QS Box Takeoff (Multi)</div>
<!-- View Controls -->
<div class="ui-row" style="border-bottom: 1px solid #444; padding-bottom: 8px; margin-bottom: 8px;">
<label style="font-weight: bold; margin-bottom: 4px; display: block;">View</label>
<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px;">
<button id="viewPlan" type="button" class="btn secondary view-btn">Plan</button>
<button id="viewFront" type="button" class="btn secondary view-btn">Front</button>
<button id="viewRear" type="button" class="btn secondary view-btn">Rear</button>
<button id="viewLeft" type="button" class="btn secondary view-btn">Left</button>
<button id="viewRight" type="button" class="btn secondary view-btn">Right</button>
<button id="view3D" type="button" class="btn primary view-btn">3D</button>
</div>
</div>
<div class="ui-row">
<label>Length (X) mm</label>
<input id="len" type="number" value="2000" />
</div>
<div class="ui-row">
<label>Width (Z) mm</label>
<input id="wid" type="number" value="2000" />
</div>
<div class="ui-row">
<label>Height (Y) mm</label>
<input id="hgt" type="number" value="150" />
</div>
<div class="ui-row">
<label>BaseY (mm)</label>
<input id="baseY" type="number" value="0" />
</div>
<div class="ui-row ui-inline">
<label><input id="snap" type="checkbox" checked /> Grid snap</label>
<input id="snapSize" type="number" value="10" min="1" />
</div>
<div class="ui-row ui-inline">
<label><input id="angleSnap" type="checkbox" checked /> Angle snap</label>
<select id="angleSnapIncrement">
<option value="45">45°</option>
<option value="22.5">22.5°</option>
<option value="15">15°</option>
<option value="5">5°</option>
<option value="1">1°</option>
</select>
</div>
<div class="ui-row ui-inline">
<label>Custom Angle:</label>
<input id="customAngle" type="number" step="0.1" placeholder="degrees" style="width: 80px;" />
</div>
<div class="ui-row ui-inline">
<label><input id="pp" type="checkbox" checked /> Push / Pull</label>
</div>
<div class="ui-row" style="border-top: 1px solid #444; padding-top: 8px; margin-top: 8px;">
<label style="font-weight: bold; margin-bottom: 4px; display: block;">Drawing Mode</label>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 4px;">
<button id="wallModeBtn" type="button" class="btn primary mode-btn">WALL</button>
<button id="slabModeBtn" type="button" class="btn secondary mode-btn">SLAB</button>
</div>
<div style="font-size: 11px; color: #999; margin-top: 4px;">
Click both off to navigate only
</div>
</div>
<div class="ui-actions">
<button id="apply" type="button" class="btn primary">Apply to Selected</button>
<button id="clear" type="button" class="btn secondary">Clear All</button>
<button id="resetOrigin" type="button" class="btn secondary" style="margin-top: 8px;">Reset to Origin (0,0)</button>
</div>
<label class="ui-subtitle">Export</label>
<pre id="out">{}</pre>
</div>
<!-- Dimension entry modal -->
<div id="dimModal" class="modal hidden" aria-hidden="true">
<div class="modal__panel">
<div class="modal__header">
<div class="modal__title">Wall Dimensions (UVW)</div>
<div class="modal__help">Tab = next • Enter = apply • Esc = cancel</div>
</div>
<div class="modal__grid">
<div class="field">
<label for="dl_U">U - Length (mm)</label>
<input id="dl_U" type="number" step="1" placeholder="drag or type" />
</div>
<div class="field">
<label for="dl_V">V - Height (mm)</label>
<input id="dl_V" type="number" step="1" placeholder="drag or type" />
</div>
<div class="field">
<label for="dl_W">W - Thickness (mm)</label>
<input id="dl_W" type="number" step="1" placeholder="drag or type" />
</div>
<div class="field">
<label for="dl_baseY">BaseY (mm)</label>
<input id="dl_baseY" type="number" step="1" placeholder="uses UI" />
</div>
</div>
<div class="modal__actions">
<button id="dl_apply" type="button" class="btn primary">Complete Wall</button>
<button id="dl_clear" type="button" class="btn secondary">Cancel</button>
</div>
</div>
</div>
<div id="hint">
<span id="hintBoxMode">Click empty space: start box • Click again: finish box • Drag selected: move • Delete: remove</span>
<span id="hintWallMode" style="display:none">
Step 1: Drag U (length) • Step 2: Set V (height) • Step 3: Set W (thickness) • Tab=next • Enter=apply
</span>
<br/>
Push/Pull: enable checkbox, hover a face, click+drag. Axis lock: X/Y/Z.
</div>
<script type="module" src="./index.js"></script>
</body>
</html>