whitequark
2371068d01
Don't regenerate the entire sketch in AddRequest().
...
This is unnecessary and leads to huge slowdowns on large sketches.
E.g. this speeds up import of a certain large DXF from ~60s to ~3s.
2016-10-10 20:33:02 +00:00
whitequark
0e66eafe5a
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 23:31:15 +04:00
whitequark
3ff236c494
Mark group dirty when clicking "allow redundant constraints" link.
...
Otherwise, the now-valid constraint will not become satisfied.
2016-10-10 17:44:01 +00:00
whitequark
9bcba4b92c
Fix incorrect rendering of XYZ axes in the bottom left corner.
2016-10-10 13:31:29 +00:00
whitequark
a8e723381c
Replace convenience #defines with const auto references.
...
These are nicer as they are scoped, and so it's clear where they
can be used.
2016-10-10 12:34:10 +00:00
whitequark
f5a37ae2fd
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:25:10 +00:00
whitequark
4537444db5
Travis: add a few more retries to OS X build script.
...
Their infra seems to be deteriorating with time, or something.
Every other build fails lately.
2016-10-09 22:32:58 +00:00
whitequark
21a4305ee1
Add "Zoom to Fit" to context menu.
2016-10-09 22:26:36 +00:00
whitequark
2f64f18095
Add "Select All" to context menu for no selection.
2016-10-09 22:26:25 +00:00
whitequark
2f4c6a6b0e
Add "Toggle Construction" to context menu.
2016-10-09 22:13:01 +00:00
whitequark
da2d035200
Remove exact numeric values from ContextCommand.
...
They carry no meaning, except for FIRST_STYLE.
2016-10-09 22:08:22 +00:00
whitequark
c43a1988ae
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:54:21 +00:00
whitequark
fbd89a7e30
Update 819c4c5
for Wine compatibility.
...
For some reason glGetString(GL_VERSION) can return NULL at least
once even after we've started rendering.
2016-10-09 21:27:30 +00:00
whitequark
819c4c5742
GL1: work around lack of NPOT textures in Windows OpenGL renderer.
...
OpenGL 1.1 permits implementations to reject non-power-of-2 sized
textures. In practice this only affects the default Windows OpenGL
implementation, i.e. with no vendor drivers installed. This is still
important in case the application runs in a VM.
2016-10-09 20:24:49 +00:00
whitequark
7787923d05
MinGW: unbreak the test harness.
...
_set_abort_behavior() is an MSVCRT function, not a Win32 one,
and it is not available in MinGW builds.
2016-10-09 20:03:50 +00:00
whitequark
d12bf047b4
Update 58db06d8
to not even try to use std::fstream with Unicode paths.
...
Unfortunately there is no portable way to open an Unicode path with
std::fstream. On *nix, it is enough to call the const char*
constructor. On MSVC, it is enough to call a nonstandard
const wchar_t* constructor. However, on MinGW, there is no way at all
to construct an std::fstream with a wide path, not even using
undocumented APIs. (There used to be a const wchar_t* overload added
back in libstdc++ 4.7, but it got removed for a reason that I was not
able to find out.)
2016-10-09 20:00:02 +00:00
whitequark
fb87431ba5
Fix a numeric conversion warning.
2016-10-09 15:26:05 +00:00
whitequark
58db06d845
DXF: update to use Unicode-aware file open routines on Windows.
2016-10-09 15:19:36 +00:00
whitequark
fd54e5ac27
Make translate/rotate groups inherit the "suppress solid model" option.
2016-10-09 13:27:43 +00:00
whitequark
06a188cc62
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 12:39:48 +00:00
whitequark
cd5b5b2d7c
Travis: update brew installation instructions.
...
The `brew upgrade` is no longer needed as Travis updated the
versions in their image.
2016-10-09 11:09:21 +00:00
whitequark
e7edc39b34
Alias the "=" key to "+" key.
2016-10-09 10:57:25 +00:00
whitequark
ffd9c6241a
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-08-28 16:50:36 +00:00
whitequark
b9d375652c
Recognize .ngc as a valid G-Code export extension.
2016-08-25 02:57:29 +00:00
whitequark
a1e18ae4a6
GlOffscreen: create color/depth renderbuffers separately.
...
This fixes a strange problem where GTK 2 (but not GTK 3) with NVidia
drivers would not have a depth buffer, but only during exporting
PNGs, despite the fact that normal rendering path and PNG rendering
path come through the same offscreen rendering code.
2016-08-21 19:58:45 +00:00
whitequark
991909d794
Show pt-ln distance projected onto workplane when one is active.
...
This avoids a pitfall where a point and a line are selected that are
not in the current workplane, but since the view is parallel to
the workplane, that's not visible, and incorrect measurement results.
2016-08-14 01:49:33 +00:00
whitequark
f998293760
Allow displaying outlines without any other edges.
...
As usual, what's displayed is what's exported.
2016-08-14 01:00:10 +00:00
whitequark
4c30c09792
Correctly draw vector text for constraints free in 3d.
2016-08-13 10:51:14 +00:00
whitequark
efd358d734
Unbreak PNG export.
...
Before this commit, on Win32 the toolbar was visible, and
the framebuffer was flipped, whereas on other platforms just a black
image was exported.
2016-08-13 09:55:37 +00:00
whitequark
6e860fb148
Make "Show/hide hidden lines" a tri-state button instead.
...
The states are:
* Draw all lines (on top of shaded mesh).
* Draw occluded (by shaded mesh) lines as stippled.
* Do not draw occluded (by shaded mesh) lines.
As usual, the export output follows the screen output.
2016-08-13 09:44:08 +00:00
whitequark
8ce2922902
Refactor text window buttons to allow for more custom behavior.
2016-08-13 07:30:17 +00:00
whitequark
e2e9167210
Get rid of the MAX_SELECTED restriction in GroupSelection().
2016-08-13 05:20:43 +00:00
whitequark
0bf6167e16
Update CHANGELOG.
2016-08-13 05:08:34 +00:00
EvilSpirit
e381c70842
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:27:41 +00:00
whitequark
35a20ae260
GTK: fix an uninitialized variable.
2016-08-13 03:39:59 +00:00
EvilSpirit
065a0a8b00
Forcibly show the current group once we start a drawing operation.
2016-08-13 03:37:27 +00:00
EvilSpirit
b2ab15c2e1
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:30:27 +00:00
whitequark
cf9c3310fc
Update libdxfrw.
2016-08-13 02:19:31 +00:00
whitequark
8bf55b3c62
Fix multiple memory leaks found with LeakSanitizer.
2016-08-07 19:33:42 +00:00
whitequark
fbe2705ebe
CMake: disable unsigned overflow sanitizer check.
...
This seems too aggressive for us; it breaks the hash function and
I would prefer to not add tool-specific exclusions in the code.
2016-08-07 19:27:58 +00:00
whitequark
415a6d36ff
Travis: build with clang, so that we can use its sanitizers.
...
This also disables coverage, because llvm-cov 3.9 on Travis is
incompatible with genhtml 1.10. Sigh.
2016-08-07 19:22:04 +00:00
whitequark
068ed2816a
CMake: fix typo.
2016-08-07 17:33:27 +00:00
whitequark
f8b6c33290
CMake: use pkg-config directories in test/.
...
This is required for successful linking on FreeBSD.
2016-08-07 17:33:27 +00:00
whitequark
e462387fca
Add tests to cover 95.3% of constrainteq.cpp branches.
2016-08-07 17:33:27 +00:00
whitequark
4b4944264b
Align constraint lines to pixel grid.
...
This ensures that constraints always look crisp, no matter the camera
position.
2016-08-07 17:33:27 +00:00
whitequark
ba1cd83d9e
README: clarify Windows instructions.
2016-08-07 17:19:47 +00:00
whitequark
f2633e4a57
Also consider constraints when zooming to fit.
...
Before this commit, when working on convex sketches, zooming to fit
was guaranteed to clip most or even all constraints, making it quite
useless.
2016-08-01 14:03:16 +00:00
whitequark
8e7d2eaa84
Implement "view → set to full scale" text window command.
2016-08-01 14:03:16 +00:00
whitequark
ff23a4a471
Implement Analyze → Measure Perimeter.
2016-08-01 14:02:39 +00:00
whitequark
9a1ceaa5c8
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:00 +00:00