Commit Graph

1452 Commits (4f034441c25b01cdef9dc9dd50628cb3157f5efd)

Author SHA1 Message Date
whitequark 90e9fc76e4 CONTRIBUTING: add a section on translations. 2017-05-05 08:05:57 +00:00
whitequark 280d5b902f TTF: avoid crashes on fonts without U+0041 LATIN CAPITAL LETTER A.
Since font sizes in SolveSpace are specified in terms of cap height,
we need U+0041 to determine cap height. Some fonts lack it; in
that case, we assume that cap height is the same as the size we've
requested. This avoids a crash, at the cost of completely wrong
(although consistent) metrics; I do not really know of a better way.
2017-04-26 23:07:54 +00:00
whitequark 5078907957 I18n: regenerate. 2017-04-21 23:13:20 +00:00
EvilSpirit ab7cdea375 I18n: add a ru_RU translation. 2017-04-21 23:09:34 +00:00
whitequark 5408f73b96 Fix a crash creating a group from a non-reference workplane. 2017-04-21 23:08:08 +00:00
whitequark fe622a1839 Add a test for workplane request. 2017-04-21 23:03:50 +00:00
whitequark 85b4b25278 Fix a crash changing g->meshCombine when g->type!=EXTRUDE. 2017-04-16 02:12:31 +00:00
whitequark 1480f890bd Add a check omitted in e5259d7a. 2017-04-16 00:35:44 +00:00
whitequark e5259d7a3e Swap arc endpoints when pasting transformed with negative scale. 2017-04-12 04:51:23 +00:00
whitequark 5d67b42842 CMake: don't have multiple rules generating same targets.
There was a copy rule that copied the locale from the source
to the binary directory, and also a regeneration rule that used
the locale in the binary directory as a temporary file.
Rename the target for the latter.
2017-04-08 18:37:02 +00:00
whitequark 287bd98a3f Fix copying and pasting image requests. 2017-04-08 17:17:38 +00:00
EvilSpirit 99f6ea34f1 Add an option to display areas of closed contours.
This is useful e.g. for architectural work.
2017-04-08 16:43:06 +00:00
whitequark c0b6eaa935 Fix automatic marking of constraints as reference.
To reproduce:
  * New sketch;
  * Create two redundant constraints, with second being automatically
    marked as reference;
  * Switch one of these to non-reference;
  * Allow redundant constraints;
  * All new constraints with labels created as reference, even
    if that specific degree of freedom is not constrained yet.
2017-04-08 14:42:35 +00:00
whitequark 43dc16262a Rewrite equation for pt-on-circle to avoid negative diameter. 2017-04-08 14:38:07 +00:00
EvilSpirit 8fd11f4886 Fix forcing NURBS to mesh in a step group when the flag is inherited.
Before this commit, if the source group of a step rotate/translate
group is forced to triangle mesh, the UI would show that the step
rotate/translate group is also forced to triangle mesh, but the group
would in fact contain NURBS surfaces.
2017-04-06 07:40:47 +00:00
whitequark ecb6550b5c Change mentions of OpenGL 2 to OpenGL 3.
We ended up in a confusing state where OpenGL 2 (like in "gl2")
actually refers to OpenGL ES 2, which roughly corresponds to
OpenGL 3. Rectify that.
2017-04-06 07:20:50 +00:00
whitequark 7eb6574f90 Rename TextWindow::CHAR_WIDTH to CHAR_WIDTH_.
glibc defines a CHAR_WIDTH macro in limits.h since about 6.3.*.
This is apparently added as a part of ISO TS 18661-1:2014, which
I cannot read because it is not publicly available, and which covers
some sort of floating-point extensions. This is one of those changes
that should never have been done yet here we are.
2017-04-06 06:54:07 +00:00
whitequark b0ea9d8eb4 Allow suppressing solid model of extrude and lathe groups. 2017-04-05 18:49:18 +00:00
whitequark 6337bbbcd6 Fix a missing semicolon. 2017-03-22 19:13:00 +00:00
EvilSpirit aaa9c6df7a Fix a texture memory leak. 2017-03-22 19:12:25 +00:00
whitequark 827f54f2c4 GTK: ensure the editor always uses contrasting colors.
On some configurations, it seems that the default GTK theme
has a transparent background, which makes black text on black
(GL) background illegible.
2017-03-19 18:43:27 +00:00
whitequark 911c67b2d8 Fix benchmark harness after e2e74762. 2017-03-17 15:24:32 +00:00
whitequark acc25ecd57 Fix toolbar height after 5744d1d5. 2017-03-13 01:14:59 +00:00
whitequark ca2aad7fea Remove the "style → background image" feature. 2017-03-13 01:12:58 +00:00
EvilSpirit 5744d1d599 Implement an image request. 2017-03-12 00:13:56 +00:00
whitequark e2e74762f4 Rework path and file operations to be more robust.
This commit updates a *lot* of rather questionable path handling
logic to be robust. Specifically:
  * All path operations go through Platform::Path.
  * All ad-hoc path handling functions are removed, together with
    PATH_SEP. This removes code that was in platform-independent
    parts, but had platform-dependent behavior.
  * Group::linkFileRel is removed; only an absolute path is stored
    in Group::linkFile. However, only Group::linkFileRel is saved,
    with the relative path calculated on the fly, from the filename
    passed into SaveToFile. This eliminates dependence on global
    state, and makes it unnecessary to have separare code paths
    for saved and not yet saved files.
  * In a departure from previous practice, functions with
    platform-independent code but platform-dependent behavior
    are all grouped under platform/. This makes it easy to grep
    for functions with platform-dependent behavior.
  * Similarly, new (GUI-independent) code for all platforms is added
    in the same platform.cpp file, guarded with #ifs. It turns out
    that implementations for different platforms had a lot of shared
    code that tended to go out of sync.
2017-03-11 18:58:53 +00:00
whitequark 335c217114 Collect together and rigorously test all our ad-hoc path functions. 2017-03-11 16:24:12 +00:00
whitequark 60f85f5a39 Win32: fix invalid accelerator labels. 2017-03-11 16:24:12 +00:00
whitequark 7e2b1b1d8d Add a test for the link group. 2017-03-10 21:19:02 +00:00
whitequark 15f349049c Make CLI usage text more readable. 2017-03-10 21:05:52 +00:00
whitequark 27b59f601e Fix type conversion warnings. 2017-03-10 21:05:52 +00:00
whitequark dbf66639aa Replace ad-hoc implementations of Basename with calls to it. 2017-03-08 19:25:45 +00:00
whitequark f2f37aeed8 Remove dead code. 2017-03-08 18:08:20 +00:00
whitequark 9ab37c2ebf README: update zlib package version. 2017-03-07 11:54:15 +00:00
whitequark 61fe8badf2 GTK: take scale factor into account when positioning entry. 2017-03-04 00:09:05 +00:00
whitequark 8e27a5e34b GTK: take margin and border size into account when positioning entry. 2017-03-04 00:09:05 +00:00
EvilSpirit 91574254fe Improve handling of corner cases related to assembled loop normals.
Extrustion top and bottom faces require a normal to be present.

Before this commit, the normal is always taken from the assembled
loop; if the loop could not be assembled (i.e. the loop is broken
or not coplanar) the normal will be (0,0,0), which breaks the sketch.
Also, loops are not generated when generating the sketch
to determine its bounding box.

This may result in spuriously broken sketches when e.g. undoing
a change that has broken a loop.

After this commit, loops are generated when generating for bounding
box, and if the loop could not be assembled, then the workplane
normal is used. This still results in failures when there is
no workplane, but those cases should be quite pathological.
2017-02-17 05:01:19 +00:00
whitequark dea573e156 Highlight normals and circle radii that have a degree of freedom. 2017-02-17 04:14:36 +00:00
EvilSpirit 3bcc376224 Same orientation constraint doesn't exist in a workplane.
Before this commit, a same orientation constraint created with
a workplane selected would only remove 2 of 3 DOFs. After
this commit, it properly removes all 3 DOFs.
2017-02-17 03:05:43 +00:00
EvilSpirit 6bc2ed9771 Remove nonexistent degrees of freedom from lathe groups.
Before this commit, lathe groups had three DOFs, which of course
could not actually move. After this commit, lathe groups have
zero DOFs, as expected.

This bug was introduced in commit 6dced80.
2017-02-17 03:01:45 +00:00
EvilSpirit 3c36d8f887 Pin comments with custom styles to front layer, like regular ones.
This is the 2.x behavior that was accidentally broken in the canvas
rewrite.
2017-02-17 02:53:20 +00:00
EvilSpirit 312184505c Fix undefined behavior in solvespace-cli. 2017-02-17 02:52:19 +00:00
whitequark 41794dbadb Fix a crash in expression parser.
Found by lineprinter0@gmail.com through fuzzing.
2017-02-17 02:50:00 +00:00
whitequark e6ed36f739 Add solvespace-debugtool, to expose some internals via CLI. 2017-02-12 14:21:58 +00:00
whitequark f29d9d7a34 GTK: run DoLater after the next main loop iteration.
Before this commit, DoLater would be run as an idle callback,
which (depending on system performance) could either result in
a half-regenerated sketch being displayed, with only the dragged
entity updated, or no regeneration whatsoever during the drag.

After this commit, the GTK behavior matches macOS and Win32 ones.
2017-02-08 14:27:02 +00:00
whitequark 1871efa02b Commit missing parts of d77f617. 2017-02-06 16:01:10 +00:00
whitequark 2e15f60ef6 Win32: implement support for full-screen graphics window. 2017-02-06 15:12:26 +00:00
whitequark d77f617dc4 Remove the "show menu bar" option.
Hiding the menu bar was only supported on macOS, and it is inherently
troublesome to port because keyboard accelerators on Win32 and GTK
are inherently dependent on the menu bar being visible.

On top of that, it's not clear how to bring it back if it's hidden
by accident.
2017-02-06 15:11:58 +00:00
whitequark 6cf5409cd7 Update testsuite after ced4244. 2017-02-06 14:50:21 +00:00
whitequark cd26256675 Travis: run tests again.
Tests used to be included in `make all`, but not since 8d0e226.
2017-02-06 14:49:13 +00:00