forked from solvespace/solvespace-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.pl
More file actions
176 lines (136 loc) · 5.25 KB
/
examples.pl
File metadata and controls
176 lines (136 loc) · 5.25 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
#!/usr/bin/perl
use TEMPL;
TEMPL::Init();
$TEMPL::TITLE = 'SolveSpace - Examples';
$TEMPL::SHOW_VERSION = 1;
$sep = '<div class="vspace"></div>';
TEMPL::OutputWithHeader("EXAMPLES", <<EOT
<div class="forex" style="padding-left: 2em;">
<a href="dl/ex-stand.pdf">
<img border="0" src="pics/ex-stand.png">
</a>
</div>
<div class="forex">
<img src="pics/ex-stand-detail.jpg">
</div>
<p>A stand made from notched angle iron. Notice the way that parts for
the slanting front are constrained: point-on-plane constraints are used
to fix the orientation (and not just the position) of one part to the
correct angle. This means that a change in the angle of the other part
will propagate through to the assembly without user
intervention. Subsequent slanted parts are just constrained same-orientation
against the first slanted part, in the same way that parts at right angles
are typically constrained same-orientation against the coordinate (x, y, z)
axes. So once the first slanted part is placed, we can specify
the orientation of subsequent slanted parts with just a single constraint.</p>
<ul>
<li><b><a href="dl/ex-stand.zip">ex-stand.zip</a></b></li>
</ul>
$sep
<div class="forex">
<a href="dl/ex-collet.pdf">
<img border="0" src="pics/ex-collet.png">
</a>
</div>
<div class="forex">
<img src="pics/ex-collet.jpg">
</div>
<p>
A mostly-2d part cut from sheet: a collet to clamp a 1.000" round shaft.
The entire part is drawn in a single 2d sketch (except for the screw hole,
which is out-of-plane). This is not necessarily the best way to draw the
part; the part could instead have been drawn in multiple steps with Boolean
operations, for example. But 2d parts may be drawn this way, and then not
even extruded or otherwise modeled as solids. The sketch may be exported
directly.
</p>
<ul>
<li><b><a href="dl/ex-collet.slvs">ex-collet.slvs</a></b></li>
</ul>
$sep
<div class="forex">
<img src="pics/ball-mill-side.png">
</div>
<div class="forex">
<img src="pics/ball-mill-top.png">
</div>
<div class="forex">
<img src="pics/ball-mill-view-1.jpg">
</div>
<div class="forex">
<img src="pics/ball-mill-view-2.jpg">
</div>
<p>A belt-driven ball mill. The images above are a mixture of
parallel projections, as for the top and side views, and perspective
projections for the pictorials. All were generated directly from the
3d model.</p>
<p>This model makes use of lathed (solid of revolution) features for
the pulleys, and for the rounded end caps of the canister. It also uses
a variety of assembly constraints, including point-on-line constraints
(for example, to align the shafts to the bearings). Try lengthening
the orange and red canister, and then lengthening the rest of the machine
accordingly. This should require only changes to the dimensions, and the
model will regenerate with the parts assembled as desired.</p>
<p>Note the group where the belt is drawn (g013-belt). The belt
is drawn from lines and arcs constrained against the pulleys, and then
"stretched out" using equal-length constraints and measured using a
reference dimension.</p>
<ul>
<li><b><a href="dl/ex-ball-mill.zip">ex-ball-mill.zip</a></b></li>
</ul>
$sep
<div class="forex">
<img src="pics/ex-case.jpg">
</div>
<div class="forex">
<img src="pics/ex-case-outline.png">
</div>
<p>A case for a printed circuit board, made by stacking up four parts cut
from sheet. The outline of the case is drawn only once, in outline.slvs.
Each part that uses the outline (the top, the sides, a spacer sheet, and
the base) imports that outline and modifies it as required. To change that
outline, we can change it in a single location, and our changes will
propagate through to all the parts.</p>
<ul>
<li><b><a href="dl/ex-case.zip">ex-case.zip</a></b></li>
</ul>
$sep
<div class="forex">
<img src="pics/ex-peaucellier.png">
</div>
<p>Peaucellier's linkage. The rightmost point moves in an exact vertical
line. This is only a demonstration of the constraint solver, and a mathematical
curiosity. The linkage is too complex to be of practical value.
<ul>
<li><b><a href="dl/ex-peaucellier.slvs">ex-peaucellier.slvs</a></b></li>
</ul>
$sep
<div class="forex">
<img src="pics/ex-chebyshev.png">
</div>
<p>Chebyshev's linkage. The path traced by the midpoint of the short
link approximates a straight line; and with only four bars, the linkage
is practical.</p>
<ul>
<li><b><a href="dl/ex-chebyshev.slvs">ex-chebyshev.slvs</a></b></li>
</ul>
$sep
<div class="forex">
<img src="pics/ex-isometric.png">
</div>
<p>Geometric construction of an isometric view. We
know that in an isometric view, the three coordinate axes are projected
to the same length. So we draw our three coordinate axes, and then in a
new group create a workplane, and constrain our coordinate axes to have
equal projected length in that workplane. Since the coordinate axes cannot
move, the workplane is rotated to produce the required projection; select
the workplane's normal to read that projection out as a 3x3 rotation
matrix.</p>
<p>(To get an isometric projection in normal drawing, you would just
choose View → Nearest Iso View. This is a demonstration of the
constraint solver, not a practical way to generate an isometric view.)</p>
<ul>
<li><b><a href="dl/ex-isometric.slvs">ex-isometric.slvs</a></b></li>
</ul>
EOT
);