-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
484 lines (456 loc) · 15.8 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
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
<!--
this file is a part of
papier 0.4.1
Author : Saint Pierre Thomas
If you got interest in such kind of app
feel free to contact me at spierro@free.fr
Licenced under the termes of the GNU GPL v3
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>fiber⨍old</title>
<meta charset="utf-8">
<link href="img/fiberfold.png" rel="icon" type="image/png">
<meta content="" name="description">
<meta content="s1pierro@free.fr" name="author">
<meta content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" name="viewport">
<link rel="stylesheet" href="css/impression.css" type="text/css" media="print">
<link href="css/papier-fonticon.css" rel="stylesheet">
<link href="css/papier.css" rel="stylesheet">
<link href="css/animate.min.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<style type="text/css">
#startapp.startable
{
font-family: TitilliumWeb-Light;
font-size: 1.5em;
font-weight: 400;
position: relative;
z-index: 300;
width: 35.35vh;
margin: auto;
margin-top: 2em;
display: block;
animation-name: start-fadein;
animation-duration: 1s;
}
#startapp
{
position: relative;
display: none;
}
#startcontainer
{
font-family: 'Open Sans';
background-color: #333;
color: #000;
position: absolute;
z-index: 101;
width: 100vw;
height: 100vh;
top: 0px;
left: 0px;
}
#startscreen
{
background-color: #333;
margin-top: 50vh; /* poussé de la moitié de hauteur de viewport */
transform: translateY(-50%); /* tiré de la moitié de sa propre hauteur */
}
#startlogo
{
font-family: TitilliumWeb-Light;
position: relative;
z-index: 300;
width: auto;
margin: auto;
margin-top: 2em;
display: block;
text-align: center;
font-size: 1.5em;
color: #fff;
}
#startlogo p
{
font-size: 1.5em;
}
#slogan
{
font-size: 1.5em;
}
@keyframes growup { from { font-size: 1em;
color: #fff;
}
to { font-size: 1.5em;
color: #f94; }
}
h1 span
{
font-family: 'Open Sans', 'sans', 'DejaVu Sans';
color: #f94;
font-size: 1.5em;
/* -webkit-animation: 1s linear 0s growup;
animation: 1s linear 0s growup;
*/ }
#startlogo h1
{
font-size: 3em;
}
#propulsedby
{
position: relative;
z-index: 300;
width: 35.35vh;
margin: auto;
margin-top: 2em;
display: block;
font-family: TitilliumWeb-Light;
font-size: 1.2em;
color: #f94;
text-align: center;
}
#propulsedby a
{
position: relative;
color: #f94;
text-decoration: none;
font-weight: 400;
}
#thirdpartcode
{
position: relative;
position: relative;
z-index: 300;
width: 35.35vh;
margin: auto;
margin-top: 2em;
display: block;
font-family: TitilliumWeb-Light;
font-size: 1em;
color: #bbb;
text-align: center;
}
#thirdpartcode a
{
position: relative;
padding: 0.3em;
color: #ddd;
text-decoration: none;
}
</style>
</head>
<body class="app-component">
<div id="logput">
</div>
<div id="dispatcher-dialog" class="app-component">
A4
</div>
<div id="page-nav" class="app-component">
<i class="icon-left-dir text-light" id="go-prev-page"></i>
<span class="text-light" id="page-nav-crt"></span>
<i class="icon-right-dir text-light" id="go-next-page"></i>
</div>
<div id="main-app-dialog" class="app-component">
<div id="main-app-dialog-title" class="app-component">
</div>
<span class="desc"><span class="sizeX">0</span> x <span class="sizeY">0</span> x <span class="sizeZ">0</span> cm</span>
<div id="main-app-dialog-info" class="app-component">
</div>
</div>
<div id="startcontainer">
<div id="startscreen">
<!--img alt="Papier's logo" class="" id="startlogo" src="img/papier-logo-big.svg"-->
<div id="startlogo"><h1>fiber<span>⨍</span>old</h1>
<p class="tlt"></p>
</div>
<div id="propulsedby">
Propelled by <a href="https://github.com/s1pierro">s1pierro</a>,
<br>
SuperCharged by Ben Heise
</div>
<div id="thirdpartcode">
Fueled from <a href="https://threejs.org/">Three.js</a> | <a href="https://jquery.com/">jQuery</a>
</div>
</div>
</div>
<div id="printing" class="app-component d-view" >
</div>
<div id="settings" class="app-component d-view" >
<button class="btn btn-sm btn-danger" id="close-settings" type="button"><i class="icon-close"></i></button>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="row">
<div class="col-lg-12 col-md-12">
<div id="p-title-info">
</div>
<div>
<h4>Load a ready to print example</h4>
<button class="btn" id="ldfex-ppce-body" type="button">paperAce body</button>
<button class="btn" id="ldfex-ico-2" type="button">Icosphere 2</button>
<button class="btn" id="ldfex-kgm" type="button">Kongorilla mask</button>
</div>
<h4>Load a wavefront example</h4><button class="btn btn-outline-light btn-sm mx-1 my-1" id="ldex-Knight" type="button">Chess knight</button> <button class="btn btn-outline-light btn-sm mx-1 my-1" id="ldex-ppce-body" type="button">paperAce Body</button> <button class="btn btn-outline-light btn-sm mx-1 my-1" id="ldex-ppce-frame" type="button">paperAce Frame</button>
<h4>Upload a wavefront</h4>
<p class="alert">
supported files : Wavefront (.obj). Triangulated faces are required. Edges are not alowed to be shared by more than 2 triangles
</p>
<p></p>
<input class="btn" id="fileinput" type="file">
</div>
</div>
</div><br>
<div class="col-sm-12">
<h3>Global settings</h3>
</div>
<div class="col-lg-6">
<h5>Object size (cm)</h5>X <span class="sizeX">0</span> , Y <span class="sizeY">0</span> , Z <span class="sizeZ">0</span>
<div class="input-group-btn">
<input id="user-scale-factor" placeholder="scaling factor" type="number"> <button class="btn btn-primary" id="apply-scale" type="button">apply</button>
</div><br>
</div>
<div class="col-lg-6">
<h3>How to proceed</h3>
<h4>There's only one way to do it all:</h4>
<ul class=".ui.list">
<li class=".ui.item">Create a pattern.</li>
<li class=".ui.item">Extend a pattern.</li>
<li class=".ui.item">Merge patterns.</li>
<li class=".ui.item">Splitting patterns.</li>
</ul>
<h4>Hit successively two joined triangles.</h4>
<p>When two joined triangles are struck successively, the edge they share is called frozen. if it already is, it will be unfrozen.</p>
<p><strong>internal work :</strong></p>
<ul class=".ui.list">
<li class=".ui.item">
<p><em>global (user step)</em></p>
<p>Frozen edges are the main components of patterns. They connect the triangles you want to assemble to create one. From what Papier does its work, it first calculates the coordinates of each triangles in order to move them in a same plane. then he assembles the patterns, looking for frozen edges connected by triangles. Edges that are adjacent to triangles belonging to a pattern but that are not frozen can now be considered as pattern borders. From these data, it is now possible to represent the borders of flattened patterns in the form of a chain of ordered nodes.</p>
</li>
<li class=".ui.item">
<p><em>Step by step internal work</em> :</p>
<p><em>Before processing did after an edge freeze attempt, the rebuilding of every pattern, a copy of patterns is done. to restore app state if freeze attempt fails.</em></p>
<ul class=".ui.list">
<li class=".ui.item">
<p><strong>Flatten triangles</strong></p>
<p>Flatten the triangles. The reason Papier exists! This single step could be sufficient to perform 3D printing from a desktop printer. This step also complicates things a little, code side. A "Wavefront", like most meshes, first describe the vertices of a 3d model, then the triangles are described using these vertices. But to be properly flattened, triangles must now store their own vertex coordinates. meaning is that a mesh summit could be representated by several flatened triangles summits. These vertices will then store the identifier (actually the index) of the vertex of the mesh to which they correspond.</p>
</li>
<li class=".ui.item">
<p><strong>Flatten triangles</strong></p>
</li>
</ul>
</li>
</ul>
</div>
<div class="col-sm-12">
<br>
<h3>About Papier</h3>
<p>Papier is a webapp to perform 3d print from desktop printer. It is a rewritting of my old <a href="https://www.youtube.com/watch?v=Rcpjqd3NSTE" title="eMesh">eMesh</a> desktop application (SDL, openGL2, C++)</p>
<p><em>touch devices are not fully supported yet, they will be soon</em></p>
</div>
<div class="col-lg-6">
<h3>Goals :</h3>
<ul class=".ui.list">
<li class=".ui.item">Provide an enought advanced paper-crafting tool to be used as an alternative prototyping tool ( as <a href="https://plus.google.com/photos/118368888481050824788/album/6366533843773096817/6366533840814789570?authkey=CIr985KLmqXwTA" title="paperAce">paperAce</a> does ).
</li>
<li class=".ui.item">Be as simple as possible to use.</li>
</ul>
</div>
<div class="col-lg-6">
<h3>Non-goals :</h3>
<ul class=".ui.list">
<li class=".ui.item">texturing.</li>
<li class=".ui.item">mesh editing.</li>
</ul>
</div>
<div class="col-lg-12">
<h3>State</h3>
<p><em>FreakPOC</em> - <strong>[Reasonably Secure Proof Of Concept.]</strong> - Release Candidate</p>
<p>where reasonably means that, if only a few mesh requirements are met, the model can be safely flattened.</p>
</div>
<div class="col-lg-6">
<h3>Standards and technologies :</h3>
<ul class=".ui.list">
<li class=".ui.item">Javascript</li>
<li class=".ui.item">WebGL ( throught three.js )</li>
<li class=".ui.item">SVG</li>
<li class=".ui.item">HTML</li>
<li class=".ui.item">CSS</li>
</ul>
</div>
<div class="col-lg-6">
<h3>Third party code libraries :</h3>
<ul class=".ui.list">
<li class=".ui.item">Three.js</li>
<li class=".ui.item">Hammer.js ( comming soon to provide touch devices compatibility )</li>
<li class=".ui.item">jQuery</li>
</ul>
</div>
<div class="col-lg-12">
<h2 class=".ui.medium.headeeeer">Authors</h2>
<ul class=".ui.list">
<li class=".ui.item"><strong><i class="icon-s1p"></i>Thomas Saint Pierre</strong> - <em>Initial work | code engineering | <a class="text-info" href="https://github.com/s1perro" title="s1pierro"><i class="icon-github-circled"></i>s1pierro</a></em></li>
</ul>
<p>If you got interset in such kind of app and want more or if you want to contribute, feel free to contact me : s1pierro@protonmail.com</p>
</div>
<div class="col-sm-12">
<img alt="stamp" src="img/fiberfold.png" style="width: 7em; height: auto; float:left;">
<p id="topset" style="margin-left:8em;">
<span id="topset-title" style="font-size:2em;">Fiberfold</span><br>
Copyright (C) 2018 Saint Pierre Thomas<br>
Licenced under the termes of the <a href="LICENSE.md">GNU GPL v3</a><br>
</p><!--img style="width: 100%; height: auto" src="img/papier-banner.svg" alt="banner"-->
</div>
</div><!-- /.container -->
</div>
</div>
<i class="icon-spin1 text-primary" id="processing-indicator"></i>
<i class="icon-spin1 text-danger" id="processing-fail-indicator"></i>
<i class="icon-spin1 text-success" id="processing-success-indicator"></i>
<div hidden id="example">
# o IcoSphere 2
<!--#frz 14 16 28 29 98 99 114 115 118-->
v 49.979571797871394 -45.25278642087999 32.851601544637624
v 11.1860133858817 10.100426655287398 73.4700844876719
v -27.466269467755087 -52.76675880590935 45.675730404759335
v 2.728384156947463 -70.68002825384511 -24.937712505254492
v 60.04235140678334 -18.88360999331748 -40.783874908218635
v 65.26882297243768 31.041173602397954 20.03559626993909
v -60.04235140678334 18.88360999331748 40.783874908218635
v -65.26882297243768 -31.041173602397954 -20.03559626993909
v -11.1860133858817 -10.100426655287398 -73.4700844876719
v 27.466269467755087 52.76675880590935 -45.675730404759335
v -2.728384156947463 70.68002825384511 24.937712505254492
v -49.979571797871394 45.25278642087999 -32.851601544637624
v 13.233202061400462 -57.614294422310486 46.15706680581886
v 35.95227171324846 -20.6621591668697 62.494075092471455
v -9.569273029118804 -25.078594692302914 70.03207898219553
v 44.93884086365853 24.182328039171697 54.9610351569809
v 67.74112649245257 -8.353583322554911 31.086291378201402
v 30.980955333598963 -68.1435387520128 4.651686865929761
v -14.540486671105334 -72.56028238004755 12.189310948124245
v 64.6690915999231 -37.69842919526645 -4.662231498498716
v 36.89557020709542 -52.644352359441925 -38.63015268987564
v 73.65598303293311 7.146038525027743 -12.195507779565563
v 4.971242880105802 47.48178159788786 57.84260863200925
v 36.76022522152354 59.79040683401598 26.43469888468629
v -51.43637646955322 -19.916053765686353 50.819779398229215
v -28.71717024612431 17.03647744829395 67.15715045069919
v -36.76022522152354 -59.79040683401598 -26.43469888468629
v -54.50861240058876 -49.26132055839146 15.07095744983522
v 28.71717024612431 -17.03647744829395 -67.15715045069919
v -4.971242880105802 -47.48178159788786 -57.84260863200925
v 54.50861240058876 49.26132055839146 -15.07095744983522
v 51.43637646955322 19.916053765686353 -50.819779398229215
v -36.89557020709542 52.644352359441925 38.63015268987564
v -73.65598303293311 -7.146038525027743 12.195507779565563
v -44.93884086365853 -24.182328039171697 -54.9610351569809
v 9.569273029118804 25.078594692302914 -70.03207898219553
v 14.540486671105334 72.56028238004755 -12.189310948124245
v -64.6690915999231 37.69842919526645 4.662231498498716
v -30.980955333598963 68.1435387520128 -4.651686865929761
v -67.74112649245257 8.353583322554911 -31.086291378201402
v -35.95227171324846 20.6621591668697 -62.494075092471455
v -13.233202061400462 57.614294422310486 -46.15706680581886
f 1 14 13
f 2 14 16
f 1 13 18
f 1 18 20
f 1 20 17
f 2 16 23
f 3 15 25
f 4 19 27
f 5 21 29
f 6 22 31
f 2 23 26
f 3 25 28
f 4 27 30
f 5 29 32
f 6 31 24
f 7 33 38
f 8 34 40
f 9 35 41
f 10 36 42
f 11 37 39
f 39 42 12
f 39 37 42
f 37 10 42
f 42 41 12
f 42 36 41
f 36 9 41
f 41 40 12
f 41 35 40
f 35 8 40
f 40 38 12
f 40 34 38
f 34 7 38
f 38 39 12
f 38 33 39
f 33 11 39
f 24 37 11
f 24 31 37
f 31 10 37
f 32 36 10
f 32 29 36
f 29 9 36
f 30 35 9
f 30 27 35
f 27 8 35
f 28 34 8
f 28 25 34
f 25 7 34
f 26 33 7
f 26 23 33
f 23 11 33
f 31 32 10
f 31 22 32
f 22 5 32
f 29 30 9
f 29 21 30
f 21 4 30
f 27 28 8
f 27 19 28
f 19 3 28
f 25 26 7
f 25 15 26
f 15 2 26
f 23 24 11
f 23 16 24
f 16 6 24
f 17 22 6
f 17 20 22
f 20 5 22
f 20 21 5
f 20 18 21
f 18 4 21
f 18 19 4
f 18 13 19
f 13 3 19
f 16 17 6
f 16 14 17
f 14 1 17
f 13 15 3
f 13 14 15
f 14 2 15
</div>
<script src="js/three.js"></script>
<script src="js/DragControls.js"></script>
<script src="js/TrackballControls.js"></script>
<script src="js/stats.min.js"></script>
<script src="js/hammer.js"></script>
<script src="js/jquery.lettering.min.js"></script>
<script src="js/jquery.textillate.js"></script>
<script src="js/papier-console-utils.js"></script>
<script src="js/papier-matrix-utils.js"></script>
<script src="js/papier-wavefront-utils.js"></script>
<script src="js/papier-core.js"></script>
<script src="js/papier.js"></script>
<!--
this file is a part of Fiberfold
Author : Saint Pierre Thomas
If you got interest in such kind of app
feel free to contact me at spierro@protonmail.com
Licenced under the termes of the GNU GPL v3
-->
</body>
</html>