forked from marian42/partdesigner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
247 lines (235 loc) · 11.2 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Part Designer</title>
<meta name="author" content="Marian Kleineberg">
<meta name="description" content="A free online CAD tool to create custom LEGO® Technic compatible construction parts for 3D printing.">
<link rel="stylesheet" href="app.css" type="text/css" />
<link rel="icon" href="favicon.png" type="image/png" sizes="16x16"/>
</head>
<body>
<div class="sidebar">
<details open>
<summary>Part</summary>
<div class="part-buttons">
<button id="clear">Clear</button>
<button id="share">Share</button>
<button id="save-stl">Save STL</button>
<button id="save-studio">Save Studio part</button>
</div>
<div class="group">
<span class="measurementhint">Display style</span>
<select id="style">
<option value="0">Contour</option>
<option value="1">Solid</option>
<option value="2">Wireframe</option>
<option value="3">Solid Wireframe</option>
</select>
</div>
<div class="group">
<span class="measurementhint">Part name</span>
<input type="text" id="partName" placeholder="Unnamed part">
</div>
</details>
<details id="blockeditor" open>
<summary>Edit Block</summary>
<div class="group" id="type">
<span class="editorhint">Type</span>
<input type="radio" id="pinhole" name="type" value="pinhole" checked>
<label class="radiolabel" for="pinhole">Pin Hole</label>
<input type="radio" id="axlehole" name="type" value="axlehole">
<label class="radiolabel" for="axlehole">Axle Hole</label>
<input type="radio" id="pin" name="type" value="pin">
<label class="radiolabel" for="pin">Pin</label>
<input type="radio" id="axle" name="type" value="axle">
<label class="radiolabel" for="axle">Axle</label>
<input type="radio" id="solid" name="type" value="solid">
<label class="radiolabel" for="solid">Solid</label>
<input type="radio" id="balljoint" name="type" value="balljoint">
<label class="radiolabel" for="balljoint">Ball Joint</label>
</div>
<div class="group" id="orientation">
<span class="editorhint">Orientation</span>
<input type="radio" id="x" name="orientation" value="x" checked>
<label class="radiolabel x" for="x">X</label>
<input type="radio" id="y" name="orientation" value="y">
<label class="radiolabel y" for="y">Y</label>
<input type="radio" id="z" name="orientation" value="z">
<label class="radiolabel z" for="z">Z</label>
</div>
<div class="group" id="size">
<span class="editorhint">Size</span>
<input type="radio" id="full" name="blocksize" value="full" checked>
<label class="radiolabel" for="full">Full Block</label>
<input type="radio" id="half" name="blocksize" value="half">
<label class="radiolabel" for="half">Half Block</label>
</div>
<div class="group" id="rounded">
<span class="editorhint">Edges</span>
<input type="radio" id="true" name="rounded" value="true" checked>
<label class="radiolabel" for="true">Rounded</label>
<input type="radio" id="false" name="rounded" value="false">
<label class="radiolabel" for="false">Not Rounded</label>
</div>
<div class="group">
<span class="editorhint"></span>
<button id="remove">Remove block</button>
</div>
</details>
<details id="catalog">
<summary>Catalog</summary>
</details>
<details>
<summary>Measurements</summary>
<div class="group">
<span class="measurementhint">Technic Unit</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="technicUnit">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Subdivisions Per Quarter</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="subdivisionsPerQuarter">
</div>
<div class="group">
<span class="measurementhint">Edge Margin</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="edgeMargin">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Interior Diameter</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="interiorRadius">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Pin Hole Diameter</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="pinHoleRadius">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Pin Hole Offset</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="pinHoleOffset">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Axle Hole Size</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="axleHoleSize">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Pin Diameter</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="pinRadius">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Pin Lip Size</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="pinLipRadius">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Lip Subdivisions</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="lipSubdivisions">
</div>
<div class="group">
<span class="measurementhint">Axle Size Inner</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="axleSizeInner">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Axle Size Outer</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="axleSizeOuter">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Attachment Adapter Size</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="attachmentAdapterSize">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Attachment Adapter Diameter</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="attachmentAdapterRadius">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Interior End Margin</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="interiorEndMargin">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Ball Joint Ball Diameter</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="ballRadius">
<span class="unit">mm</span>
</div>
<div class="group">
<span class="measurementhint">Ball Joint Base Diameter</span>
<a href="#" class="reset">Reset</a>
<input class="measurement" type="text" id="ballBaseRadius">
<span class="unit">mm</span>
</div>
<div class="group">
<div class="cell"><button id="resetmeasurements">Reset</button></div>
<div class="cell"><button id="applymeasurements">Apply</button></div>
</div>
</details>
<details open>
<summary>About</summary>
<p>This is a free online CAD tool to create custom LEGO® Technic compatible construction parts for 3D printing.</p>
<p>
<table>
<tr>
<td><span class="key">1</span> <span class="key">2</span> <span class="key">3</span>
<span class="key">4</span> <span class="key">5</span> <span class="key">6</span>
</td>
<td>set type</td>
</tr>
<tr>
<td><span class="key">x</span> <span class="key">y</span> <span class="key">z</span></td>
<td>set orientation</td>
</tr>
<tr>
<td><span class="key">←</span> <span class="key">→</span> <span class="key">↑</span>
<span class="key">↓</span> <span class="key">PgUp</span> <span class="key">PgDown</span>
</td>
<td>
move cursor
</td>
</tr>
<tr>
<td>
<span class="key">Del</span>, <span class="key">BkSp</span>
</td>
<td>
remove block
</td>
</tr>
</table>
</p>
<p>You can find the source code for this project on <a href="https://github.com/marian42/partdesigner" target="_blank">Github</a>.</p>
<p class="fineprint">
<a href="https://marian42.de/" target="_blank">marian42.de</a> ·
<a href="mailto:mail@marian42.de">Contact</a>
</p>
</details>
</div>
<div class="canvas-container">
<canvas id="canvas"></canvas>
</div>
<script src="app.js"></script>
</body>
</html>