Commit Graph

1737 Commits (f4ad82055e00c02d9ece2cab4730a1104de2e423)

Author SHA1 Message Date
EvilSpirit 2ccf5954d4 Allow creating n-dimensional arrays with translate and rotate groups.
Before this commit, a translate group based on another translate
group would always use the "union" boolean operation, which does not
work at all if one wants an array with a difference operation, and
results in degraded performance if one wants an array with
an assemble operation.
2016-10-12 22:02:38 +00:00
EvilSpirit 6658b1fa2b Allow combining extrude, lathe, translate and rotate group as assemblies.
This significantly improves performance e.g. in case of a sketch
containing a multitude of wooden panels, as the meshes can be
merely transformed instead of being joined.
2016-10-12 22:02:38 +00:00
whitequark 5462fc6b3c 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 23:42:41 +04:00
whitequark 90f10ccfa6 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 23:24:17 +04:00
whitequark b5f5e05336 OS X: don't remap OK in message boxes to Escape.
The platform convention is to use Return.
2016-10-12 18:56:31 +00:00
whitequark b0363802d8 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 18:56:31 +00:00
whitequark 291e16e549 Fix a few compiler warnings. 2016-10-12 14:36:52 +00:00
EvilSpirit 363f5c1ab8 Fix BitmapFont to not lose texture updates.
Texture could also be updated by GetWidth(), which calls GetGlyph()
internally, and then the next LocateGlyph() call would return false.
2016-10-11 23:45:19 +00:00
whitequark af226b2437 Fix rendering of reference axes in bottom left corner. 2016-10-11 23:32:21 +00:00
EvilSpirit 9f97e9aad4 Allow selecting unit (px/mm) in Canvas::Stroke.
By directly specifying the desired end result to the renderer, we
can avoid regeneration of geometry.
2016-10-11 23:32:21 +00:00
whitequark a5c7fc6ad9 Disable closed contour check in the test harness.
The check was actually half-broken from the beginning and
until df83ee4; the thick red line was rendered properly but
the error text was rendered with width 0, which by chance worked
on some GL implementations. That commit has fixed the underlying
bug but left the text line width at 0 to avoid test breakage.

This commit fixes the bug, turns off the check completely, and
updates the tests to account for breakage.
2016-10-11 23:32:12 +00:00
EvilSpirit df83ee4c8f Factor out Style::Stroke. 2016-10-11 23:32:05 +00:00
Evil-Spirit 1108a6f37d Use Canvas::Stroke, not Canvas::Fill, for drawing a point.
Our points are more like fat lines than actual quads, in that they
are scale-invariant.
2016-10-11 23:32:05 +00:00
whitequark e80a3a0a71 Fix a buffer overrun in ssprintf. 2016-10-11 23:32:05 +00:00
Drew Gates ffa104602c Fix spelling error. 2016-10-11 16:47:23 +00:00
EvilSpirit f4e85127d6 Wavefront OBJ: export mesh color as well. 2016-10-11 14:54:19 +00:00
whitequark aa958504af 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:56:41 +00:00
whitequark b10e621fce Rephrase error messages that say "select a workplane".
This is confusing, as merely selecting one (and not activating it)
is not enough to satisfy any of the conditions leading to these
errors.
2016-10-11 13:46:05 +00:00
EvilSpirit 456c987218 Use transparent white fill color for drawing pixmaps, not black.
Textures can interact with selected color. This commit makes it
a no-op.
2016-10-11 10:53:57 +00:00
whitequark e9725bd350 Update CHANGELOG. 2016-10-10 23:43:09 +00:00
whitequark 9febc572a3 Travis: install libstdc++ 5.
The existing libstdc++ on Travis is 4.8, which has broken <regex>
and that breaks our test harness.
2016-10-10 22:48:02 +00:00
whitequark 93da88369f 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-10 22:07:32 +00:00
whitequark 66ed417d45 Fix a handle leak in TtfFontList::PlotString. 2016-10-10 21:16:22 +00:00
whitequark 476860acbb 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:34:11 +00:00
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