-
Notifications
You must be signed in to change notification settings - Fork 10
/
ref.pl
2303 lines (1886 loc) · 91.8 KB
/
ref.pl
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
#!/usr/bin/perl
use TEMPL;
TEMPL::Init();
$TEMPL::TITLE = 'SolveSpace - Reference';
$TEMPL::SHOW_VERSION = 1;
TEMPL::OutputWithHeader("REFERENCE MANUAL", <<EOT
<p>This is a reference manual for SolveSpace. It is not intended as an
introduction to the program; for that, see the
<a href="tutorial.$TEMPL::PL">tutorials</a>.</p>
<h2><a id="General" href="#General" class="anchor"></a>
General Navigation</h2>
<div class="refind">
<p>
The user interface consists of two windows: a larger window that
contains mostly graphics, and a smaller window that contains mostly
text. The graphics window is used to draw the geometry, and to view
the 3d model. The Property Browser provides information about the model,
and may also be used to modify settings and numerical parameters.
</p>
<h3><a id="Graphics" href="#Graphics" class="anchor"></a>
Graphics Window and Model View</h3>
<p>
To pan the view, right-drag with the mouse.
<p>
To rotate the view, center-drag with the mouse. This turns the
part over, so that the surfaces that used to be hidden (because
they were facing backwards, away from the viewer) become visible.
<p>
To rotate the view within the plane of the monitor,
Ctrl+center-drag with the mouse.
<p>
It is also possible to pan by Shift+center-dragging, or to rotate
by Shift+right-dragging. If a 3Dconnexion six degree of freedom
controller (e.g., a SpaceNavigator) is connected, then this may
also be used to transform the view of the model.
<p>
To zoom in or out, rotate the scroll wheel. It is also possible
to zoom by using the View menu, or the associated keyboard
shortcuts (+ and -). Some features, including the planes, are
always drawn the same size on-screen, and are therefore not
affected by zooming.
<p>
Most commands are available in three different ways: from a menu,
from a keyboard shortcut, or from the toolbar. The toolbar is
displayed at the top left of the graphics window. To learn what
an icon means, hover the mouse over it. To show or hide the
toolbar, choose View → Show Toolbar.
<p>
To zoom to the extent of the part, choose View → Zoom To
Fit. This adjusts the zoom level so that the part fits exactly
on the screen, and then pans to center the part. The rotation
of the part is not affected.
<p>
If a workplane is active, then choose View → Align View to Workplane (or
press W) to align the view to the workplane. After doing this,
the plane of the screen is coincident with the workplane, and
the center of the workplane is at the center of the screen. The
zoom level is not affected.
<p>
In an orthogonal view, one of the coordinate (x, y, or z) axes is
horizontal, and another is vertical. To orient the view to the
nearest orthogonal view, choose View → Nearest Ortho View.
In an isometric view, all three coordinate axes are projected to the
same length, and one of the coordinate axes is vertical. To orient
the view to the nearest isometric view, choose View → Nearest
Iso View.
<p>
To pan the view so that a given point is at the exact center
of the screen, select that point and then choose View → Center
View at Point.
<p>
The x, y, and z coordinate axes are always drawn at the bottom
left of the graphics window, in red, green, and blue. These axes
are live: they can be highlighted and selected with the mouse, in
the same way as any other normals. (This means that the coordinate
axes are always conveniently available on-screen, which is useful
e.g. when constraining a line parallel to the x-axis.)
<h3><a id="Dimension" href="#Dimension" class="anchor"></a>
Dimension Entry and Units</h3>
<p>
Dimensions may be displayed in either millimeters or inches.
Millimeter dimensions are always displayed with two digits
after the decimal point (45.23), and inch dimensions are always
displayed with three (1.781).
<p>
Choose View → Dimensions in Inches/Millimeters to change the current
display units. This does not change the model; if the user
changes from inches to millimeters, then a dimension that was
entered as 1.0 is now displayed as 25.40.
<p>
All dimensions are entered in the current display units. In most
places where a dimension is expected, it's possible to enter an
arithmetic expression ("4*20 + 7") instead of a single number.
<p>
You can use <code>sqrt</code>, <code>square</code>, <code>sin</code>,
<code>cos</code>, <code>asin</code>, <code>acos</code>, <code>pi</code>,
<code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>,
<code>(</code>, <code>)</code> in the expressions. For example
"<code>7*pi/(3+cos(45))</code>". The trigonometric functions take
degrees.
<h3><a id="Text" href="#Text" class="anchor"></a>
Text Window</h3>
<p>
The Property Browser appears as a floating palette window. It may
be shown or hidden by pressing Tab, or by choosing View →
Show Text Window.
<p>
The Property Browser works like a web browser. Any underlined text is
a link. To activate a link, click it with the mouse. The links
may be used to navigate to other pages in the Property Browser. For
example, the "home" screen is a list of groups in the sketch:
<div class="forimg">
<img src="pics/ref-text-window.png">
</div>
<p>
To navigate to a group's page, click that group's name (e.g.,
"g002-sketch-in-plane"). The links may also trigger actions in
the sketch. For example, in the above screenshot, all of the
groups are shown. To hide a group, click the box in the
"shown" column.
<p>
As a convenience, the Property Browser will sometimes automatically
navigate to a page that is likely to be relevant. For example,
when a new group is created, the Property Browser displays that new
group's page. It's always possible to navigate to a different
page, by clicking the "home" link at the top left corner (or
pressing Esc), and following the links from there.
<p>
When sketch entities are selected (e.g., the user has clicked
on them with the mouse), information about those entities is
displayed in the Property Browser. If a single entity is selected,
then information about that entity is displayed. For example,
the window display's a circle's center and radius.
<p>
If multiple entities are selected, then the Property Browser can
sometimes display information about all of them. These cases
include:
<ul>
<li>two points: the distance between the points</li>
<li>a point and a plane face: the distance from the point to the
plane</li>
<li>two points, and a vector: the distance between the points,
projected along the vector</li>
<li>two plane faces: the angle between the plane faces</li>
</ul>
<h3><a id="ShowHide" href="#ShowHide" class="anchor"></a>
Show / Hide Entities</h3>
<p>
As the sketch becomes more complex, it may be useful to hide
unnecessary information. SolveSpace provides several different
ways to do this.
</p>
<p>
Along the top of the Property Browser, a row of icons appears. These icons
make it possible to hide and show different elements in the sketch:
</p>
<table class="showtab" cellspacing="0" cellpadding="0">
<td class="showleft"><p>workplanes from inactive groups</p></td>
<td class="showright"><p>
When a new "Sketch In New Workplane" group is created, an associated
workplane is created automatically. These workplanes are either
visible whenever that group is visible (item shown), or visible only
when that group is both visible and active (item hidden).
</p></td>
</tr><tr>
<td class="showleft"><p>normals</p></td>
<td class="showright"><p>
By default, normals are drawn as blue-grey arrows, in the direction of
the normal. These normals may be hovered and selected with the mouse, for
example in order to constrain them. This icon may be used to hide them.
</p></td>
</tr><tr>
<td class="showleft"><p>points</p></td>
<td class="showright"><p>
By default, points are drawn as green squares. These points may be
hovered and selected with the mouse, for example in order to constrain
them. This icon may be used to hide them. If points are hidden, then
they will still appear when the mouse hovers over them, and may still
be selected.
</p></td>
</tr><tr>
<td class="showleft"><p>constraints and dimensions</p></td>
<td class="showright"><p>
When a constraint is created, a graphical representation of that
constraint is displayed in purple. The constraints in a group are visible
only when that group is active. To hide them even then, use this icon.
</p></td>
</tr><tr>
<td class="showleft"><p>faces selectable with the mouse</p></td>
<td class="showright"><p>
Some surfaces on the 3d model may be selected. For example, the user
can select a plane face of the part, and constrain a point to lie on
that plane. If faces are shown, then the faces will appear highlighted
when the mouse hovers over them. The user can click the mouse to select
the face, as they would for any other entity.</p>
<p>As a convenience, faces are automatically hidden when a new sketch group
is created, and automatically shown when a new extrusion is created. If
this behavior is not what's desired, then the faces can be shown or
hidden manually with this icon.
</p></td>
</tr><tr>
<td class="showleft"><p>shaded view of solid model</p></td>
<td class="showright"><p>
The 3d part is displayed as an opaque solid, with lighting effects to
give the impression of depth. This icon may be used to hide that view.
</p></td>
</tr><tr>
<td class="showleft"><p>edges of solid model</p></td>
<td class="showright"><p>
Lines are drawn wherever two different surfaces of the solid model
meet. If edges are shown but shaded is hidden, then a wireframe
display results. The display of meshes may be noticeably slower when
edges are shown. The display of NURBS surfaces will not be noticeably
slower when edges are shown. The color of the edges may be set in the
line styles.
</p></td>
</tr><tr>
<td class="showleft"><p>triangle mesh of solid model</p></td>
<td class="showright"><p>
The 3d model of the part consists of many triangles; for example,
a rectangular face is represented by two triangles. Use this icon to
show the triangles on the model. This is a good way to see how fine or
coarse the mesh is before exporting it.
</p></td>
</tr><tr>
<td class="showleft"><p>hidden lines</p></td>
<td class="showright"><p>
With the part in a given orientation, some of the lines in the part will
be invisible, because they are buried inside the solid part. To show
those lines anyways, as if the part were transparent, use this icon. This
is useful when drawing a sketch that lies within the volume of the part.
</p></td>
</tr>
</table>
<p>
In addition to the above options, it is possible to hide and show
entire groups. If a group is hidden, then all of the entities
(line segments, circles, arcs, points, etc.) from that group
are hidden. The solid model is not affected; if a hidden group
contains a circle that is extruded to form a cylinder, then the
cylinder will remain visible.
<p>
To hide a group, go to the home screen in the Property Browser, by
pressing Esc or choosing the link at the top left. A list of
groups is displayed, along with their visibility. If a group
is visible, then the checkbox in the "shown" column is checked.
Click the checkbox; it now appears unchecked, and the group
is hidden.
The show / hide status of groups is saved in the part file. If
a part is linked into an assembly, then entities that were
visible in the part file will be visible in the assembly, and
entities that were hidden will be hidden.
<h3><a id="ActiveWorkplane" href="#ActiveWorkplane" class="anchor"></a>
Active Workplane</h3>
<p>
SolveSpace represents all geometry in 3d; it's possible to draw
line segments anywhere, not just in some plane.
<p>
This freedom is not always useful, so SolveSpace also makes
it possible to draw in a plane. If a workplane is active, then
all entities that are drawn will be forced to lie that plane.
The active workplane ("in plane:") is indicated in the top line of
the Property Browser, at the right.
<p>
When SolveSpace starts with a new empty file, a workplane parallel
to the XY plane is active. To deactivate the workplane, and draw
in 3d, choose Sketch → Anywhere In 3d.
<p>
To activate a workplane, select it, and then choose Sketch →
In Workplane. When a workplane is activated, the view is aligned
onto that workplane. (The workplane remains active until the
user chooses Sketch → Anywhere In 3d, or a different workplane
is activated. If the user rotates the view, so that the view
is no longer aligned onto the workplane, then the workplane
remains active.)
<p>
In a "Sketch in New Workplane" group, the group's associated
workplane may be activated by choosing Sketch → In Workplane;
there is no need to select it first.
<h3><a id="ActiveGroup" href="#ActiveGroup" class="anchor"></a>
Active Group</h3>
<p>
When a new line, circle, or other curve is created, it will be created
in the active group. Geometry from the active group is drawn in
white; geometry from earlier groups is drawn in brown. Later groups
are hidden.
<p>
In the Property Browser's home screen (press Escape, or choose the link
in the top left corner), the active group's line in the list of
groups has a selected radio button in the "active" column. All
other groups (except g001-#references, which cannot be activated)
have an unselected radio button in that column. To activate an
inactive group, click its radio button.
<p>
In order to reduce distraction when sketching in 2D, solid models from
inactive groups are "dimmed" (by rendering them using the
#def-dim-solid style) so that they blend into the background. To
disable this uncheck View → Darken Inactive Solids. By modifying
the #def-dim-solid style any color may be assigned to geometry from
inactive groups instead of just "dimming" them. A brighter color may
even be assigned to this style to make geometry from inactive groups
stand out more clearly instead if desired.
</div>
<h2><a id="Sketch" href="#Sketch" class="anchor"></a>
Sketch Entities</h2>
<div class="refind">
<h3><a id="Construction" href="#Construction" class="anchor"></a>
Construction Geometry</h3>
<p>
In normal operation, the user draws line and curves in a
sketch. Those curves describe the geometry to be manufactured;
ultimately, the endmill or the laser or some other tool will
cut along those curves.
<p>
In some cases, it is useful to draw a line that should not
appear on the final part. For example, the user may wish to draw
a center line for a symmetric part; but that center line is only
a guide, and should not actually get exported with the CAM data.
These lines are called construction lines.
<p>
To mark an entity as construction-only, choose Sketch → Toggle
Construction. A construction entity will behave just like any other
entity, except that it is drawn in green, and does not contribute to
the geometry for export by default (or to the section that will be
extruded or lathed or swept). You may also toggle construction
geometry while sketching a new entity by using the 'g' keyboard
shortcut.
<h3><a id="Datum" href="#Datum" class="anchor"></a>
Datum Point</h3>
<p>
This entity is defined by a single point.
<p>
If a workplane is active when the datum point is created,
then that datum point will always lie in the workplane. If no
workplane is active, then the datum point will be free in 3d.
(This is the same behaviour as for all points, including e.g. the
endpoints of a line segment.)
<p>
Datum points are typically used as construction geometry. The user
might place datum points in order to simplify the dimensioning
of line segments or other entities.
<h3><a id="Workplane" href="#Workplane" class="anchor"></a>
Workplane</h3>
<p>
This entity is specified by a point and a normal. The point
defines its origin, and the normal defines its orientation.
<p>
A workplane makes it possible to draw a section in 2d. If a
workplane is active, then any entities that are drawn must lie
in that workplane.
<p>
It's almost never necessary to create workplanes explicitly.
Instead, create a new Sketch in New Workplane group.
<h3><a id="Line" href="#Line" class="anchor"></a>
Line Segment</h3>
<p>
This entity is specified by its two endpoints. If a workplane is
active, then the two endpoints will always lie in that workplane.
<p>
To create the line segment, choose Sketch → Line Segment, and
then left-click one endpoint of the line. Then release the mouse
button; the other endpoint is now being dragged.
<p>
To create another line segment, that shares an endpoint with
the line segment that was just created, left-click again. This
is a fast way to draw closed polygons.
<p>
To stop drawing line segments, press Escape, or right- or
center-click the mouse. SolveSpace will also stop drawing new
line segments if an automatic constraint is inserted. (For
example, draw a closed polygon by left-clicking repeatedly, and
then hovering over the starting point before left-clicking the
last time. The endpoint of the polyline will be constrained to
lie on the starting point, and since a constraint was inserted,
SolveSpace will stop drawing.)
<h3><a id="Rectangle" href="#Rectangle" class="anchor"></a>
Rectangle</h3>
<p>
This entity consists of two vertical line segments, and two
horizontal line segments, arranged to form a closed curve.
Initially, the rectangle is specified with the mouse by two
diagonally opposite corners. The line segments (and points)
in the rectangle may be constrained in the same way as ordinary
line segments.
<p>
It would be possible to draw the same figure by hand, by drawing
four line segments and inserting the appropriate constraints. The
rectangle command is a faster way to draw the exact same thing.
<p>
A workplane must be active when the rectangle is drawn, since
the workplane defines the meaning of "horizontal" and "vertical".
<h3><a id="Circle" href="#Circle" class="anchor"></a>
Circle</h3>
<p>
This entity is specified by its center point, by its diameter,
and by its normal.
<p>
To create the circle, choose Sketch → Circle, and then left-click
the center. Then release the mouse button; the diameter of
the circle is now being dragged. Left-click again to place
the diameter.
<p>
If a workplane is active, then the center point must lie in
that workplane, and the circle's normal is parallel to the
workplane's normal (which means that the circle lies in the
plane of the workplane).
<p>
If no workplane is active, then the center point is free in space,
and the normal may be dragged (or constrained) to determine the
circle's orientation.
<h3><a id="Arc" href="#Arc" class="anchor"></a>
Arc of a Circle</h3>
<p>
This entity is specified by its center point, the two endpoints,
and its normal.
<p>
To create the arc, choose Sketch → Arc of a Circle, and then
left-click one of its endpoints. Then release the mouse button;
the other endpoint is now being dragged. The center is also being
dragged, in such a way as to form an exact semi-circle.
<p>
Left-click again to place the other endpoint, and then drag the
center to the desired position. The arc is drawn counter-clockwise
from the first point to the second.
<p>
The arc must be drawn in a workplane; it cannot be drawn in
free space.
<h3><a id="TangentArc" href="#TangentArc" class="anchor"></a>
Tangent Arc at Point</h3>
<p>
To round off a sharp corner (for example, between two lines),
we often wish to create an arc at the corner, that is tangent to
both of the lines. This will create a smooth appearance where
the line and arc join. It would be possible to draw these arcs
by hand, using Sketch → Arc of a Circle and Constrain →
Tangent, but it's easier to create them automatically.
<p>
To do so, first select a point where two line segments or circles
join. Then choose Sketch → Tangent Arc at Point; the arc
will be created, and automatically constrained tangent to the two
adjoining curves.
<p>
The initial line segments will become construction lines, and two new
lines will be created, that join up to the arc. The arc's diameter
may then be constrained in the usual way, with Distance / Diameter
or Equal Length / Radius constraints.
<p>
By default, the radius of the tangent arc is chosen automatically.
To change that, choose Sketch → Tangent Arc at Point with nothing
selected. A screen will appear in the Property Browser, where the radius
may be specified. It is also possible to specify whether the original
lines and curves should be kept, but changed to construction lines
(which may be useful if you want to place constraints on them),
or whether they should be deleted.
<h3><a id="Bezier" href="#Bezier" class="anchor"></a>
Bezier Cubic Spline</h3>
<p>
This entity is specified by at least two on-curve points, and
an off-curve control point at each end (so two off-curve points
total). If only two on-curve points are present, then this is a
Bezier cubic section, and the four points are exactly the Bezier
control points.
<p>
If more on-curve points are present, then it is a second derivative
continuous (C2) interpolating spline, composed of multiple Bezier
cubic segments. This is a useful type of curve, because it has a smooth
appearance everywhere, even where the sections join.
<p>
To create the Bezier cubic spline, choose Sketch → Bezier
Cubic Spline. Then left-click one endpoint of the cubic segment.
Release the mouse button; the other endpoint of the cubic segment
is now being dragged. To add more on-curve points, left click with
the mouse. To finish the curve, right-click, or press Esc.
<p>
The two control points are intially placed on the straight line
between the endpoints; this means that the cubic originally
appears as a straight line. Drag the control points to produce
the desired curve.
<p>
To create a closed curve (technically, a "periodic spline"), start
by creating the curve as usual, left-clicking to create additional
on-curve points. Then hover the mouse over the first point in the
curve, and left-click. The curve will be converted to a periodic
spline, which will be C2 continuous everywhere, including at that
first point.
<h3><a id="TextTT" href="#TextTT" class="anchor"></a>
Text in a TrueType Font</h3>
<p>
This entity is defined by four points, at each corner of the text. The
distance between the points determines the height and width of the
text; the angle of the line between them determines the orientation of
the text, and their position determines the text's position.
<p>
To create the text, choose Sketch → Text in TrueType Font. Then
left-click the top left point of the text. The bottom right point
of the text is now being dragged; left-click again to place it.
<p>
To change the font, select the text entity. A list of installed
fonts appears in the Property Browser; click the font name to select
it. To change the displayed text, select the text entity and
click the [change] link in the Property Browser.
<h3><a id="Image" href="#Image" class="anchor"></a>
Image</h3>
<p>
This entity may be used to place a bitmap reference image in a sketch.
The entity is defined by four control points that may be used to
position, constrain and orient the image similar to those for TrueType
Text entities. Image entities are typically used as a reference for
sketching or tracing other entities and removed later. As such, Image
entities are not exportable.
<h3><a id="Splitting" href="#Splitting" class="anchor"></a>
Splitting and Trimming Entities</h3>
<p>
In some cases, it is desirable to draw by creating overlapping
figures, and then removing the extra lines. For example, in this
case, a circle and a rectangle are drawn; the two short lines and
the short arc are then deleted, to form a single closed shape.
<div class="forimg">
<img src="pics/ref-split.png">
</div>
<p>
In order to trim the extra lines, it is necessary to split the
entities where they intersect. SolveSpace can split lines, circles,
arcs, and Bezier curves against each other.
To do so, select the two
entities to be split, and then choose Sketch → Split Curves
at Intersection. This deletes each original entity, and replaces it
with two new entities that share an endpoint at the intersection.
The excess lines may then be deleted as usual.
<p>
Because the original entities are deleted, any constraints on the
original entities are deleted as well. This means that the sketch
may no longer be constrained as desired after splitting. If an
entity is marked as construction before splitting, then it will
not be deleted, so the constraints will persist.
</div>
<h2><a id="Constraints" href="#Constraints" class="anchor"></a>
Constraints</h2>
<div class="refind">
<h3><a id="GeneralConstraints" href="#GeneralConstraints" class="anchor"></a>
General</h3>
<p>
To create a constraint, first select the geometry to be
constrained. For example, when constraining the distance between
two points, first select those two points. Then choose the
appropriate constraint from the Constrain menu.
<p>
Depending on what is selected, the same menu item may generate
different constraints. For example, the Distance / Diameter menu
item will generate a diameter constraint if a circle is selected,
but a length constraint if a line segment is selected. If the
selected items do not correspond to an available constraint,
then SolveSpace will display an error message, and a list of
available constraints.
<p>
Most constraints are available in both 3d and projected versions.
If a workplane is active, then the constraint applies on the
projection of the geometry into that workplane. If no workplane
is active, then the constraint applies to the actual geometry
in free space.
<p>
For example, consider the line shown below:
<div class="forimg">
<img src="pics/ref-projd-constraint.png">
</div>
<p>
The line's length is constrained in two different ways. The upper
constraint, for 50 mm, applies to its actual length. The lower
constraint, for 40 mm, applies to the length of its projection
into the XY plane. (The XY plane is highlighted in yellow.) The
dotted purple lines are drawn to indicate the locations of the
line segment's projected endpoints.
<p>
In normal operation, the user activates a workplane (or a
workplane is activated automatically, for example by creating a
"Sketch in New Workplane" group). The user then draws an entity,
for example a line. Since a workplane is active, the line is
created in that workplane. The user then constrains that line,
for example by specifying its length. Since the workplane is
still active, the constraint actually applies to the projection
of the line segment into the workplane.
<p>
In this case, the projected distance is equivalent to the
3d distance. If the line segment lies in the workplane, then
the projection of that line segment into the workplane is just
that line segment. This means that when drawing in a workplane,
most of this can be ignored.
<p>
It's possible to use projected constraints in more complex ways,
though. For example, the user might create a line segment in
workplane A, and constrain its projection into workplane B.
<p>
Constraints are drawn in purple on the sketch. If a constraint
has a label associated with it (e.g. a distance or an angle), then
that label may be repositioned by dragging it with the mouse. To
modify the dimension, double-click the label; a text box will
appear on the screen, where the new value can be entered. Press
enter to commit the change, or Esc to cancel.
<h3><a id="Automatic" href="#Automatic" class="anchor"></a>
Automatic Constraints</h3>
<p>
There is an option in the configuration screen labled "enable
automatic line constraints". If this option is checked and a line
being drawn is nearly horizontal, a horizontal contraint will
appear over the middle of the line and will be applied when the
second point of the line is clicked in place. Similarly when a
nearly vertical line is being drawn a "V" constraint will appear
automatically. If the line is not close enough to horizontal or
vertical, no constraint will be added. Holding Ctrl while sketching
will also disable this feature.
<p>
If an automatic constraint is redundant or would result in the
sketch being over-constrained, it will not be created even if
it is shown during line placement. Similarly if a distance or
diameter constraint is added that would over-constrain the
sketch, it will be created as a reference (REF).
<p>
Another option in the configuration screen is "edit newly added
dimensions". With this option enabled, when a new Distance, Lenght
Ratio, or Length Difference constraint is added the input box will
automatically appear so a specific value can be entered. With the
option off the user would have to create the constraint and then
double-click on it to edit the value, which is almost always what
we want to do.
<h3><a id="Failure" href="#Failure" class="anchor"></a>
Failure to Solve</h3>
<p>
In some cases, the solver will fail. This is usually because the
specified constraints are inconsistent or redundant. For example,
a triangle with internal angles of 30, 50, and 90 degrees is
inconsistent--the angles don't sum to 180, so the triangle could
never be assembled. This is an error.
<p>
A triangle with internal angles constrained to 30, 50, and 100
degrees is also an error. This is not inconsistent, because the
angles do sum to 180 degrees; but it's redundant, because only
two of those angles need to be specified.
<p>
If the sketch is inconsistent or redundant, then the background
of the graphics window is drawn in red (instead of the usual
black), and an error is displayed in the Property Browser:
<div class="forimg">
<img src="pics/ref-inconsistent.png">
</div>
<p>
As a convenience, SolveSpace calculates a list of constraints
that could be removed to make the sketch consistent again. To
see which constraints those are, hover the mouse over the links
in the Property Browser; the constraint will appear highlighted in
the graphics window. By deleting one or more of the constraints
in that list, the user can make the sketch consistent again.
<p>
A different type of error occurs when the solver fails to
converge. This may be a defect in the solver, or it may occur
because impossible geometry was specified (for example, a
triangle with side lengths 3, 4, and 10; 3 + 4 = 7 < 10). In
that case, a similar error message is displayed, but without a
list of constraints to remove to fix things. The problem can be
resolved by removing or editing the constraints, or by choosing
Edit → Undo.
<h3><a id="Reference" href="#Reference" class="anchor"></a>
Reference Dimensions</h3>
<p>
By default, the dimension drives the geometry. If a line segment
is constrained to have a length of 20.00 mm, then the line
segment is modified until that length is accurate.
<p>
A reference dimension is the reverse: the geometry drives the
dimension. If a line segment has a reference dimension on its
length, then it's still possible to freely change that length,
and the dimension displays whatever that length happens to be. A
reference dimension does not constrain the geometry.
<p>
To convert a dimension into a reference dimension, choose
Constrain → Toggle Reference Dimension. A reference dimension
is drawn with "REF" appended to the displayed length or angle.
Double-clicking a reference dimension does nothing; the
dimension is specified by the geometry, not the user, so it is
not meaningful to type in a new value for the reference dimension.
<h3><a id="Specific" href="#Specific" class="anchor"></a>
Specific Constraints</h3>
<p>
To get help on a specific constraint, choose its menu item without
first selecting any entities. An error message will be displayed,
listing all of the possibilities.
<p>
In general, the order in which the entities are selected doesn't
matter. For example, if the user is constraining point-line
distance, then they might select the point and then the line, or
the line and then the point, and the result would be identical.
Some exceptions exist, and are noted below.
<h3><a id="Distance" href="#Distance" class="anchor"></a>
Distance / Diameter</h3>
<p>
This constraint sets the diameter of an arc or a circle, or the
length of a line segment, or the distance between a point and
some other entity.
<p>
When constraining the distance between a point and a plane, or
a point and a plane face, or a point and a line in a workplane,
the distance is signed. The distance may be positive or negative,
depending on whether the point is above or below the plane. The
distance is always shown positive on the sketch; to flip to the
other side, enter a negative value.
<h3><a id="Angle" href="#Angle" class="anchor"></a>
Angle</h3>
<p>
This constraint sets the angle between two vectors. A vector
is anything with a direction; in SolveSpace, line segments and
normals are both vectors. (So the constraint could apply to
two line segments, or to a line segment and a normal, or to two
normals.) The angle constraint is available in both projected
and 3d versions.
<p>
The angle must always lie between 0 and 180 degrees. Larger or
smaller angles may be entered, but they will be taken modulo
180 degrees. The sign of the angle is ignored.
<p>
When two lines intersect, four angles are formed. These angles
form two equal pairs. For example, the pictured lines interesect
at 30 degrees and 150 degrees. These two angles (30 and 150) are
known as supplementary angles, and they always sum to 180 degrees.
<div class="forimg">
<img src="pics/ref-line-cross-angles.png">
</div>
<p>
(Notice that in the sketch, three of the angle constraints are
reference dimensions. Given any one of the angles, we could
calculate the other three; so a sketch that specified more than
one of those angles would be overconstrained, and fail to solve.)
<p>
When a new angle constraint is created, SolveSpace chooses
arbitrarily which supplementary angle to constrain. An arc is
drawn on the sketch, to indicate which angle was chosen. As the
constraint label is dragged, the arc will follow.
<p>
If the wrong supplementary angle is constrained, then select the
constraint and choose Constrain → Other Supplementary Angle. A
constraint of 30 degrees on one supplementary angle is exactly
equivalent to a constraint of 150 degrees on the other.
<h3><a id="Horizontal" href="#Horizontal" class="anchor"></a>
Horizontal / Vertical</h3>
<p>
This constraint forces a line segment to be horizontal or
vertical. It may also be applied to two points, in which case
it applies to the line segment connecting those points.
<p>
A workplane must be active, because the meaning of "horizontal"
or "vertical" is defined by the workplane.
<p>
It's good to use horizontal and vertical constraints whenever
possible. These constraints are very simple to solve, and will
not lead to convergence problems. Whenever possible, define
the workplanes so that lines are horizontal and vertical within
those workplanes.
<h3><a id="On" href="#On" class="anchor"></a>
On Point / Curve / Plane</h3>
<p>
This constraint forces two points to be coincident, or a point
to lie on a curve, or a point to lie on a plane.
<p>
The point-coincident constraint is available in both 3d and
projected versions. The 3d point-coincident constraint restricts
three degrees of freedom; the projected version restricts only
two. If two points are drawn in a workplane, and then constrained
coincident in 3d, then an error will result--they are already
coincident in one dimension (the dimension normal to the plane),
so the third constraint equation is redundant.
<p>
When a point is constrained to lie on a circle (or an arc of
a circle), the actual constraint forces the point to lie on
the cylindrical surface through that circle. If the point and
the circle are already coplanar (e.g., if they are both drawn
in the same workplane), then the point will lie on the curve,
but otherwise it will not.
<h3><a id="Equal" href="#Equal" class="anchor"></a>
Equal Length / Radius / Angle</h3>
<p>
This constraint forces two lengths, angles, or radiuses to
be equal.
<p>
The equal-angle constraint requires four vectors as input:
the two equal angles are the angle between each pair of inputs.
For example, select line segments A, B, C, and D. The constraint
forces the angle between lines A and B to be equal to the angle
between lines C and D. If the wrong supplementary angle is chosen,
then choose Constrain → Other Supplementary Angle, as for the
angle constraint.
<p>
If a line and an arc of a circle are selected, then the length of
the line is forced equal to the length (not the radius) of the
arc.
<h3><a id="LengthRatio" href="#LengthRatio" class="anchor"></a>
Length Ratio</h3>
<p>
This constraint sets the ratio between the lengths of two line
segments. For example, if line A and line B have length ratio
2:1, then the constraint is satisfied if A is 50 mm long and B
is 25 mm long.
<p>
The order in which the lines are selected matters; if line A is
selected before line B, then the ratio is length of A:length of B.
<h3><a id="LengthDifference" href="#LengthDifference" class="anchor"></a>
Length Difference</h3>
<p>
This constraint sets the difference between the lengths of two line
segments. For example, if line A and line B have length difference
5 mm, then the constraint is satisfied if A is 50 mm long and B
is 55 mm long or 45mm long.
<p>
Note that a negative difference can be entered when editing the