Commit Graph

866 Commits

Author SHA1 Message Date
whitequark
7c1ca46076 Bump version to 2.3. 2016-12-24 02:09:48 +00:00
whitequark
9c30f7858f README: update Linux dependencies. 2016-12-13 09:58:10 +00:00
Elvira Khabirova
6802a12a52 Fix crash when trying to import not .dxf or .dwg files 2016-11-27 15:17:46 +00:00
whitequark
99d6f1f5b5 DXF: Fix export of wireframe as 3D DXF.
Before this commit, polylines got flattened but all other entities
got exported with the proper Z coordinate. After this commit, all
entities are exported with proper Z coordinate.

Also, instead of exporting LWPOLYLINE (2d only), POLYLINE (2d/3d)
is exported; as a bonus it is more compatible with 3rd party
software, since it is older.
2016-11-26 08:29:21 +00:00
whitequark
ece7630624 Fix detection of transparent meshes.
SSurface::TriangulateInto first populates the mesh with triangles
that have no color, and then paints them, which confused the code
that detects if a mesh is transparent into thinking that all of them
are; and that broke the "draw back faces in red" feature, since it
is disabled for transparent meshes.
2016-11-18 11:02:19 +00:00
whitequark
82746b6171 Fix a crash when adding a symmetric constraint on a line.
This is the same problem as in a2c97fc.
2016-11-16 02:19:09 +00:00
whitequark
74d8621f53 OS X: fix another out-of-bounds TW.META access.
See also e1d6dac.
2016-11-05 17:06:56 +00:00
whitequark
0b2fc34de1 Update CHANGELOG. 2016-11-02 10:22:17 +00:00
whitequark
25febd82ed TTF: use metrics of 'A' to determine cap height.
SolveSpace 2.0 used the height of 'A' (i.e. cap height) to determine
the reference height.
SolveSpace 2.1 completely broke that during transition to Freetype,
and used something more or less random, by using FT_Set_Char_Size
with units_per_EM.
SolveSpace 2.2 attempted to fix that, but also used something more
or less random, by using FT_Request_Size with "unit" values.

Turns out that Freetype actually doesn't have a concept of cap height
at all. It is possible to extract it from the TT_OS2 table that is
present in some TrueType fonts, but it is not present in Microsoft
fonts (the msttcorefonts ones), and for those Linux fonts in which
it is present it doesn't appear very reliable.

So instead, use the height of 'A' instead, like version 2.0 did.
This has the advantage that it is quite bulletproof, and also matches
exactly what the old files are measured against.

One downside is that fonts without an 'A' glyph would not render.
We can deal with that when it becomes a problem.
2016-11-02 09:00:44 +00:00
whitequark
d809d4122f TTF: actually use CID as GID when CID-to-GID mapping is absent. 2016-11-02 09:00:27 +00:00
whitequark
2e1c7a6701 TTF: only call FT_Request_Size once after loading. 2016-11-02 09:00:16 +00:00
whitequark
4fad67d721 OS X: don't crash in GetSaveFile() if default extension is invalid. 2016-10-25 09:59:52 +00:00
whitequark
a2c97fcd46 Fix a crash when adding a symmetric constraint on two points.
The crash was introduced in e2e91672; I have not noticed that some
of the code relies on past-the-size entities in GW.GS being empty.
2016-10-25 09:58:24 +00:00
whitequark
c4ad073d1b Bump version to 2.2. 2016-10-17 02:07:14 +00:00
whitequark
0f3879e37c Debian: remove in-tree packaging.
The package is now maintained by the Debian Science team at:
https://anonscm.debian.org/git/debian-science/packages/solvespace.git
2016-10-17 02:07:14 +00:00
EvilSpirit
05d9c0fab9 Try to re-solve groups that fail rank test.
Sometimes, after a large change in a sketch, constraints that are
geometrically fine may still cause the rank test to fail. One way
this can happen is VectorsParallel() pivoting wrong due to the big
move, converging anyways but ending up singular. It would then
re-pivot correctly on the new solution when you re-solve, making
this a transient error. This is visible when dragging the arm in
the jansen-asm.slvs example.

After this commit, if the rank test fails, equations are regenerated
the Jacobian is rewritten, and the rank test is retried, which
prevents these transient errors from interfering with dragging.

The problem described above was invisible before c011444, as rank
test was only performed before solving.
2016-10-14 00:40:06 +00:00
Evil-Spirit
bc43365eff Write params if system is solved as REDUNDANT_OKAY.
A system solved as REDUNDANT_OKAY is still solved correctly,
even if the UI would consider this an error, in case that
g->allowRedundant==false. So there's no reason to discard this
solution; we might find it useful if a system loses a degree of
freedom while dragging, or to avoid regeneration after redundant
constraints are allowed.

This commit also reverts commit 3ff236c, as that is not necessary
anymore.
2016-10-14 00:34:35 +00:00
whitequark
8a96ca894c OS X: map the backspace key to the "Delete" function.
Apple hardware does not have a discrete Delete key, so Backspace
is used for deleting stuff instead.
2016-10-12 19:43:09 +00:00
whitequark
dde6030533 OS X: set scroller knob style to light.
On newer OS X versions the scrollbar is overlaid on the window
contents, so a black know is invisible.
2016-10-12 19:25:07 +00:00
whitequark
b8abf698c9 OS X: don't remap OK in message boxes to Escape.
The platform convention is to use Return.
2016-10-12 19:08:25 +00:00
whitequark
f6eb079d41 OS X: revert "sort out window visibility and focus."
This reverts commit 1dba594949.

Turns out the old behavior was more appropriate for OS X.
2016-10-12 19:08:16 +00:00
whitequark
adca3cd253 GTK: use 3DConnexion button 0 instead of SI_APP_FIT_BUTTON.
The libspnav library doesn't even define SI_APP_FIT_BUTTON, which
appears to be Windows-specific functionality, perhaps a physical
button remapped with some logic. Just use 0 instead, since that
seems always safe.
2016-10-11 13:57:09 +00:00
whitequark
33c3fd5fce Update CHANGELOG. 2016-10-10 23:43:35 +00:00
EvilSpirit
f2007326b4 Don't draw edges and outlines while dragging an entity.
This is far too slow for realtime dragging, and results in assemblies
falling apart (e.g. jansen-asm from the examples).
2016-10-10 21:32:25 +00:00
whitequark
02b7e24812 Fix a handle leak in TtfFontList::PlotString. 2016-10-10 21:18:03 +00:00
whitequark
1a5047550d Normalize the string returned by Extension() to lowercase.
This would otherwise break code that branches on the extension,
such as that after 06a188cc.
2016-10-10 20:53:16 +00:00
whitequark
5e28b35f2b OS X: correctly parse output of otool -D.
In the past this relied on otool -XD not printing the name of
the library itself, only the install name, but that doesn't work
anymore as of 10.12.
2016-10-10 19:57:11 +00:00
whitequark
19e77e7866 Mark group dirty when clicking "allow redundant constraints" link.
Otherwise, the now-valid constraint will not become satisfied.
2016-10-10 17:45:56 +00:00
whitequark
e1d6dac87a OS X: fix out-of-bounds TW.META access.
For some reason OS X can post pointer events far outside the window
rect, so be defensive here.
2016-10-10 12:26:13 +00:00
whitequark
4c022f8d79 Win32: add proper Unicode support to message boxes.
Before this commit, for every non-ASCII character, a replacement
character was also printed.
2016-10-09 21:55:10 +00:00
whitequark
bbd106044b DXF: update to use Unicode-aware file open routines on Windows. 2016-10-09 20:56:02 +00:00
whitequark
359b13bd62 GTK: show files with uppercase extensions in file open dialog.
The Windows dialog does that automatically, but the GTK one doesn't.
So this is useful for Windows interop.
2016-10-09 16:19:33 +00:00
whitequark
513f55f7d4 Travis: update brew installation instructions.
The `brew upgrade` is no longer needed as Travis updated the
versions in their image.
2016-10-09 13:37:58 +00:00
whitequark
bbf8610c57 Make translate/rotate groups inherit the "suppress solid model" option. 2016-10-09 13:29:04 +00:00
whitequark
dc0eed8322 Get rid of the MAX_SELECTED restriction in GroupSelection(). 2016-08-13 05:22:09 +00:00
whitequark
ca150aeda1 Update CHANGELOG. 2016-08-13 05:21:34 +00:00
EvilSpirit
4d2c773ee6 DXF export: always declare layers before using them.
Before this commit, the #s001-active-grp layer was not declared,
and this broke some external software, such as Inkscape.
See https://bugs.launchpad.net/inkscape/+bug/1472429 for details.
2016-08-13 04:28:14 +00:00
EvilSpirit
0b997e4c17 Forcibly show the current group once we start a drawing operation 2016-08-13 03:43:44 +00:00
EvilSpirit
bfef091ac9 Do not clear selection during operations that don't need it.
Specifically, during "Align View onto Workplane" when we are locked
in workplane (in which case it always aligns onto that workplane).
2016-08-13 03:32:02 +00:00
whitequark
bcd43c7c24 Update libdxfrw. 2016-08-13 02:24:14 +00:00
whitequark
4fae03d105 Unbreak TTF metrics.
In 2.0, the distance between the points in the TTF request specified
cap height. In 2.1, that was accidentally changed to some arbitrary
value near cap height instead, due to a 72pt factor mess-up.
This commit restores the old behavior.
2016-08-01 12:31:34 +00:00
whitequark
c0f5a31401 When snapping constraints to grid, snap the reference point. 2016-07-19 15:14:51 +00:00
whitequark
5af252eaf1 Multiply constraint values by scale when pasting with transformation. 2016-07-19 12:14:28 +00:00
whitequark
61904280a3 GTK: make Space Navigator actually work.
Before this commit, no events would actually be received.
2016-07-19 08:27:11 +00:00
EvilSpirit
51f3d7e438 Fix the "Show degrees of freedom" command.
Before this commit, it never highlighted anything at all.
It was broken when chord tolerance calculation was overhauled.
2016-06-29 17:01:59 +00:00
whitequark
561b2797e8 Don't crash when changing the autosave interval. 2016-06-23 11:59:04 +00:00
whitequark
5525303946 Do not remove autosave after successfully opening file.
If SolveSpace crashes after the open, or hangs and is forcibly
killed, data would be lost. (I lost my data.) Instead, remove
autosave only in two cases: right after a successful save, or right
after a save is declined. This should be completely safe.
2016-06-23 11:59:01 +00:00
whitequark
7f6c774bf5 Update changelog for 2.2. 2016-06-23 11:58:54 +00:00
whitequark
fd255364b3 Show "Paste" context menu item even when only constraints are copied. 2016-06-23 11:58:29 +00:00
whitequark
478973eb3c OS X: fix typo in build system. 2016-06-20 13:42:40 +00:00