Commit Graph

1910 Commits (5c899617b4da7f60a638079d629198b2b75442ba)

Author SHA1 Message Date
Koen Schmeets f343bbc4f4 Fix marquee selection when the view is rotated away from the working plane 2020-12-21 23:00:51 +02:00
Koen Schmeets 4275fb1202 Fix snap to grid not working in some situations 2020-12-20 13:34:28 -05:00
phkahler cac3aae0c7 remove the CLA and commercial licensing text. 2020-12-13 16:40:49 -05:00
Koen Schmeets 2939abf5f8 Improve zooming with trackpad and scrollwheel
On macOS actual scroll delta is used for the zoom amount.
On Windows WHEEL_DELTA is used to allow smooth scrolling if supported.
Shift+Scroll is added for 10x finer zooming.
2020-12-11 07:26:02 -05:00
Koen Schmeets 681a50db26 Run Test CI for pull requests 2020-12-10 13:09:16 +01:00
phkahler 640a1b913a Use good default filenames on Linux/GTK 2020-12-10 05:15:18 -05:00
наб e59186a413 Suggest sensible defaults in file dialogs
Went through first the diff of the referenced commit,
then all instances of "Create(Open|Save)FileDialog";
added SuggestFilename() calls where a default exists

This has been previously removed in
6b5db58971
Closes #538
2020-12-09 20:42:13 -05:00
наб a8b8a347c1 Make Path::SetExtension("") not include a dot 2020-12-09 20:42:13 -05:00
Koen Schmeets f5086b62cc Analyze | Stop Tracing (Ctrl+Shift+S) saves CSV only if a point is being traced
This avoids confusion with "Ctrl+Shift+S" being used as "Save As..." shortcut
on some platforms.
2020-12-09 18:57:31 +02:00
Maximilian Federle 5fa23189d9
CI: Replace Travis with GitHub Actions (#824)
Travis's move away from providing unlimited build time to OSS and its
inferior developer experience are the reason for this change.

The workflows are simple and straightforward, and the build scripts
are mostly 1:1 the same we used on Travis. This avoids vendor lock-in
as much as possible in case we need to move somewhere else in the future.

We introduce two workflows:
1. CD (cd.yml)
  Runs on: Commits to master, GitHub releases.
  Does: Run tests, build release assets, update GitHub edge release  or
  release to developer created GitHub release. Builds & uploads snaps to
  the Snap Store.
2. Test (test.yml)
  Runs on: Every commit except those on master and v* tagged ones.
  I.e. PRs and other branches.
  Does: Run tests only.

Creating a release is now an explicit operation. On the Travis workflow,
pushing a tag that begins with "v" will lead to the automatic creation of
an associated GitHub release.
On GHA, creating a GitHub release by hand will trigger the CD-workflow
to build & upload the release assets.

Other differences to Travis:
- Windows builds on Visual Studio 16 2019 instead of Visual Studio 15 2017.
- Snap builds run in docker containers, not directly on the build host.
- Snap arm64 builds on amd64 via QEMU user emulation.
  This is slower than what Travis gave us and should be changed when/if
  GHA offers ARM64 build runners.
- GHA retains build artifacts for 90 days by default.

Required secrets:
- MACOS_CERTIFICATE_PASSWORD
- MACOS_CERTIFICATE_P12
- MACOS_APPSTORE_APP_PASSWORD
- MACOS_APPSTORE_USERNAME
- MACOS_DEVELOPER_ID
- SNAPSTORE_LOGIN

Discussion: https://github.com/solvespace/solvespace/issues/807
PR: https://github.com/solvespace/solvespace/pull/824

Fixes #807
2020-12-08 18:19:33 +01:00
Koen Schmeets b316a8863b Use EXACT for checking theta 2020-11-30 08:50:06 -05:00
Koen Schmeets 6b91ab5778 Better rotating 2020-11-30 08:50:06 -05:00
Koen Schmeets aa78043fa2 Swap vertical and horizontal constraints when rotating 90/270 degrees 2020-11-30 08:50:06 -05:00
ruevs 9390ab02d5 Set the default font for text objects correctly.
The default font is BitstreamVeraSans-Roman-builtin.ttf since 94b26ddfac,
but on Win32 it needs to be `res://fonts/...` URI to work.

Fixes: https://github.com/solvespace/solvespace/issues/821
2020-11-27 18:24:49 +02:00
ruevs a2b5d0d45c Win32: Remove sscheck on IsWindowVisible and ShowWindow
The return value of these functions is not an error code and according to
the Win32 API documentation they can not affect `GetLastError`.

Calling sscheck on them normally does not fail since it does
SetLastError(0) before running the checked expression and only then
GetLastError(). However in issue 817 a user discovered that when running
"DisplayFusion" software GetLastError does return an error and SolveSpace
closes.

So while not a strict bug-fix this is a "correctness improvement" for
SolveSpace and works around a possible bug in DisplayFusion.

Similarly the return value of Reg*** functions is now compared to
ERROR_SUCCESS which is zero. Before the sschecks were strictly wrong but
did not cause problems for the same reason as above.
2020-11-25 16:43:39 -05:00
phkahler 22dea59077 "Edit newly added dimensions" is now turned on by default. issue826 2020-11-25 11:55:08 +02:00
ruevs 5d173694e7 Win32: Remove sscheck on SetScrollInfo - it returns the scrollbar position
...which can be zero.

Fixes: https://github.com/solvespace/solvespace/issues/817
2020-11-24 18:18:48 -05:00
ruevs bb5994ed70 UI: Display "err" in the property browser only if "check sketch for closed contour"
... is enabled.
"err" was first introduced in c2c26e95ad to indicate sketches that may cause
problems in the subsequent 3D groups. But is makes sense not to display the
error if the "check sketch for closed contour" option is turned off. The user
obviously does not want to be warned.

Based on a suggestion in https://github.com/solvespace/solvespace/issues/819
2020-11-24 18:18:11 -05:00
Koen Schmeets f2850246fa Move z-index of construction segments behind normal segments 2020-11-23 18:32:59 -05:00
ruevs 8dcb2db6e6 Changelog: Describe the "err" indicator in the property browser. 2020-11-23 12:24:50 +02:00
Reini Urban fac093a8b3 Translations: update de_DE
for the solvespace.cpp changes.
Run make -C src translate_solvespace for updated line numbers for the rest.
2020-11-23 11:25:37 +02:00
phkahler d0d5df1bb8 Update contour_area test image to match the change in displayed units. 2020-11-22 18:33:36 -05:00
phkahler 08f37deadd Make better choices of SI units by considering order. 2020-11-22 18:33:36 -05:00
ruevs 5137da295a Win32: Mouse wheel zooming always remains properly centered
On scroll wheel events convert the mouse coordinates from screen to client
area so that scroll wheel zooming remains centered irrespective of the
window position.

Fixes https://github.com/solvespace/solvespace/issues/806
2020-11-22 18:32:14 -05:00
ruevs bdd2be6041 Translations: Add solvespace.cpp to the translations...
...since it currently contains many relevant strings.
2020-11-22 17:34:14 -05:00
ruevs 942bf3f354 Remove Q3DO export.
It was added in 3a3a2755b as a potential way to export colorful meshes
to Horizon EDA but ended up being supported only by SolveSpace. Since no
software can consume the exported q3do files the feature is superfluous.

See https://github.com/solvespace/solvespace/issues/795 for details.
2020-11-21 13:02:39 -05:00
Maximilian Federle 427a29abb2 Travis: build snaps in LXD containers
With arm64-graviton2 now providing full VM virtualization, LXD containers
can be used to build snaps on all architectures.

This is beneficial for us as having snapcraft manage the whole build
environment is likely to yield better/more consistent results than
running the builds on the Travis images directly.
2020-11-19 19:26:36 +01:00
ruevs bcb8cd2c03 Fix unsequenced modification and access warnings.
Found by clang 11. They are a potential problem.

[ 21%] Building CXX object src/CMakeFiles/solvespace-core.dir/exportstep.cpp.obj
.\src\exportstep.cpp:293:61: warning: unsequenced modification and access to 'id'      [-Wunsequenced]
        fprintf(f, "#%d=FILL_AREA_STYLE_COLOUR('',#%d);\n", ++id, id - 1);
                                                            ^     ~~
.\src\exportstep.cpp:294:56: warning: unsequenced modification and access to 'id'      [-Wunsequenced]
        fprintf(f, "#%d=FILL_AREA_STYLE('',(#%d));\n", ++id, id - 1);
                                                       ^     ~~
.\src\exportstep.cpp:295:59: warning: unsequenced modification and access to 'id'      [-Wunsequenced]
        fprintf(f, "#%d=SURFACE_STYLE_FILL_AREA(#%d);\n", ++id, id - 1);
                                                          ^     ~~
.\src\exportstep.cpp:297:98: warning: unsequenced modification and access to 'id'      [-Wunsequenced]
        fprintf(f, "#%d=SURFACE_STYLE_RENDERING_WITH_PROPERTIES(.NORMAL_SHADING.,#%d,(#%d));\n", ++id, id - 5, id - 1);
                                                                                                 ^     ~~
.\src\exportstep.cpp:298:64: warning: unsequenced modification and access to 'id'      [-Wunsequenced]
        fprintf(f, "#%d=SURFACE_SIDE_STYLE('',(#%d, #%d));\n", ++id, id - 3, id - 1);
                                                               ^     ~~
.\src\exportstep.cpp:300:62: warning: unsequenced modification and access to 'id'      [-Wunsequenced]
        fprintf(f, "#%d=SURFACE_STYLE_USAGE(.BOTH.,#%d);\n", ++id, id - 1);
                                                             ^     ~~
.\src\exportstep.cpp:301:67: warning: unsequenced modification and access to 'id'      [-Wunsequenced]
        fprintf(f, "#%d=PRESENTATION_STYLE_ASSIGNMENT((#%d));\n", ++id, id - 1);
                                                                  ^     ~~
.\src\exportstep.cpp:302:56: warning: unsequenced modification and access to 'id'      [-Wunsequenced]
        fprintf(f, "#%d=STYLED_ITEM('',(#%d),#%d);\n", ++id, id - 1, advFaceId);
                                                       ^     ~~
8 warnings generated.
2020-11-18 17:07:56 +02:00
Maximilian Federle 898fb6f4f5 Travis: deploy tagged & master commits to GitHub
Our implicit deploy conditions were previously only met by untagged commits
on master. As the stage conditions filter everything except branch = master
and tagged commits, we can just use all_branches: true to also deploy tagged
builds.

Also clean up the snap deploy sections.
2020-11-18 15:52:33 +01:00
Maximilian Federle 1b2d47cd86 Travis: deploy tagged commits & edge tagging fixes
With the recent Travis changes, we prevented the deploy
stage from running for tagged commits as branch=tag
for tagged commits. Fix this by also running deploy for
tagged commits.

Furthermore, clean up .travis.yml by pulling the edge
tagging logic into a separate script.
A logic change is introduced to prevent git tag --force being
run on set tags as this would turn annotated tags into
lightweight tags.
2020-11-18 11:13:52 +01:00
phkahler 5a3f45ed2a ran make translate_solvespace. cleaned out some obsolete strings in en_US.po 2020-11-17 22:31:56 -05:00
phkahler 142252ddf8 Add z distance checking to entity picking. Fixes issue 521 2020-11-17 18:58:18 -05:00
Jason Lenz 6c2b967790 Use recent flatbuffers commit to solve compiling issue on OpenBSD 2020-11-14 14:00:15 -05:00
Koen Schmeets d0876d5f43 Update README.md (by @nii236) 2020-11-07 21:57:15 +01:00
phkahler 5945d556a6 Add end marker to text window and increase max rows. 2020-11-07 21:57:15 +01:00
Koen Schmeets 953c472897 Travis: add clean edge script 2020-11-07 20:23:49 +01:00
phkahler 6ff8db93e8 Use zOrder for selections within the same group 2020-10-31 11:58:14 -04:00
Maximilian Federle d973405c8c adjust logo size 2020-10-29 15:32:57 -04:00
Maximilian Federle 078fb99cfa add logo in heading 2020-10-29 15:32:57 -04:00
Maximilian Federle ef7e2c7ec2 README: Add Travis & Snap Store badges 2020-10-29 15:32:57 -04:00
phkahler 8a3e5b4d56 Don't do numeric surface intersections if an exact curve has been copied. We don't want 2 overlapping but different sets of PWLs. 2020-10-29 14:02:57 -04:00
phkahler eadeac44f0 use VERY_NEGATIVE and VERY_POSITIVE instead of numeric values which is some cases were 1e-10 instead of -1e10 2020-10-28 13:37:54 -04:00
phkahler 6c4b075eef Increase MAX_UNDO to 100 2020-10-28 13:37:54 -04:00
ruevs 7e99ba0096 UI: Fix the Property Browser window scrollbar
- Scrolling with the scrollbar now works properly.

- Do not scroll with the mouse wheel while an edit field is active in
  the property browser.

Fixes: https://github.com/solvespace/solvespace/issues/782
2020-10-28 13:37:30 -04:00
Koen Schmeets 3694c9b3ee Travis: sign libomp.dylib 2020-10-26 03:38:32 +01:00
Koen Schmeets 73bbbdef83 Travis: include libomp in macOS .app 2020-10-26 02:26:54 +01:00
ruevs 88b26aabdb Update the year in the About dialog 2020-10-25 19:16:34 -04:00
ruevs 7292c32e6f Performance: inline the Bernstein functions
This is another small profiling driven optimization.
Moving the initialization of `const double *c` as part of the definition
also helps with the generated assembler.
2020-10-25 19:16:22 -04:00
Koen Schmeets 5388e10649 Travis: use force to overwrite tag 2020-10-25 22:30:57 +01:00
Koen Schmeets 57f8b37270 Travis: skip build if tag is edge, staple to the .dmg 2020-10-25 19:50:14 +01:00