Commit Graph

1843 Commits (bb7a6cbbbaa266c2b8103bd4c0037772b534ff3e)

Author SHA1 Message Date
ruevs bb7a6cbbba Revert "CMake: use git rev-parse to get GIT_COMMIT_HASH"
This reverts commit f1e47e6554.
Since unfortunately it breaks the addition of the git commit hash
to the version string when building from the VisualStudio IDE.
I presume this happens because `git` is not of the "path" of the
build environment. The version string ends up "3.0~" only.
2022-01-16 13:08:07 -05:00
herrgahr f1e47e6554 CMake: use git rev-parse to get GIT_COMMIT_HASH
The old approach of reading .git/HEAD does not work when using git
worktrees, where the folder layout looks roughly like:

solvespace.git/                      - bare clone (.git dir)
solvespace.git/work                  - example worktree containing master
solvespage.git/worktrees/work/       - .git dir of worktree
solvespage.git/worktrees/work/HEAD   - actual HEAD ref for master

First attempt was to just get GIT_ROOT from `git rev-parse --git-dir` but
that wasn't enough, since:

1. GIT_ROOT points to solvespage.git/worktrees/work/
2. GIT_ROOT/HEAD points to refs/heads/master
3. GIT_ROOT/refs/heads/master does not exist but the old implementation
   would want to use this to get the sha

so we need two invocations of git rev-parse

1. `git rev-parse --git-dir` to get GIT_DIR
    needed for setting GIT_DEPENDS
2. `git rev-parse HEAD` to get the sha of the worktree's HEAD
2022-01-11 09:56:55 -05:00
Ryan Pavlik 5efc148074 Add some gitignore stuff 2022-01-09 00:22:36 +02:00
ruevs 79a6463856 Make vectors/normals shown in the Property Browser into active links
This makes appropriate vectors/normals explorable/selectable and closes #165.

This is a clean implementation that follows the style of the UI code for
the text window. Previous unmerged attempts from the above issue are:
eb3db32059
782a5bbbe6
a77cedbfd8
41e55b3d79
2022-01-09 00:22:36 +02:00
ruevs 3eaa99cb25 Make all points shown in the Property Browser into active links
This makes all points explorable/selectable and fixes #165 partially.

This is a clean implementation that follows the style of the UI code for
the text window. Previous unmerged attempts from the above issue are:
eb3db32059
782a5bbbe6
a77cedbfd8
41e55b3d79
2022-01-09 00:22:36 +02:00
Ryan Pavlik 3d482f0d52 Fix which outer size we use.
Should be the same right now, but this is clearer.
2022-01-06 19:55:35 -05:00
ruevs 9ba7ab5544 Hide edit boxes before closing the property browser.
When the text window/property browser is closed while and edit box
is active its window remained open. This is incorrect and probably
causes a hang on Linux described in #1168. So hide the edit control
when closing.
2022-01-06 18:47:54 -05:00
ruevs 3136493a6a Load 16bit PNG images correctly by re-scaling to 8bit
Fixes #1110
2022-01-06 15:19:06 +02:00
ruevs 892477ee43 Update the year in the About dialog 2022-01-04 12:32:50 +02:00
ruevs cc4307a2a9 Win32: Update the year in the Windows version resource 2022-01-04 12:32:50 +02:00
luzpaz ae4337f066
Fix various typos (#1178)
Found via `codespell -q 3 -S ./res/locales,./extlib -L asign,ba,hsi,mata,pinter,tothe,wser`

Co-authored-by: Maximilian Federle <max.federle@gmail.com>
2022-01-04 12:28:19 +02:00
Maximilian Federle 39ca23f38e
snap: add g++ as build package (#1175)
It got dropped in 34efb6de77 by mistake.
2022-01-02 20:50:02 +01:00
Maximilian Federle 34efb6de77
CMake Fixes + Snap port to core20 (#1174)
* CMake: use PROJECT_VERSION instead of solvespace_*_VERSION

In 006539b, solvespace_MAJOR_VERSION etc. were removed.
However, these variables were still referenced in some places.
Solution: Use PROJECT_VERSION instead.

* CMake: re-add link directories for solvespace target

006539b removed the call to link_directories for gtkmm, jsonc & fontconfig.
This leads to linking errors if those libraries are in "non-standard"
paths.
Fix this by introducing a target specific target_link_directories call.

Fixes #1173

* snap: port to core20 & adapt to CMake changes

Moving to core20 was long overdue anyway, and
the recent CMake changes necessitated some fixes.
Also switch to LZO compression for (way) better cold start
performance.
2022-01-02 20:04:57 +01:00
Koen Schmeets b71c728262 Try to fix snap release by adding libcairo2-dev dependency 2022-01-02 13:56:14 +01:00
Koen Schmeets 8f049c5a14 Fix build by removing unused var (and accepting new apple terms and conditions) 2022-01-02 01:56:03 +01:00
phkahler 74d7db879e
Update README.md 2022-01-01 15:18:27 -05:00
phkahler 5315a69a1e Increase MAX_UNKNOWNS in the solver from 1024 to 2048 2021-12-31 15:16:52 -05:00
Ryan Pavlik 18dc8ee12c Small simplifications 2021-12-31 14:40:47 -05:00
Ryan Pavlik 8ab70c2c8d Fix formatting 2021-12-31 14:40:47 -05:00
Ryan Pavlik 6edeb66e3d Don't hold the sparse matrices in a pointer at all. 2021-12-31 14:40:47 -05:00
Ryan Pavlik 42f5d3ab0d Banish an unneeded use of our custom containers. 2021-12-31 14:40:47 -05:00
Koen Schmeets 2521dcadc4 Fix loop type 2021-12-31 14:40:47 -05:00
Ryan Pavlik 605b48e6c0 Use unique_ptr in main system jacobian. 2021-12-31 14:40:47 -05:00
EvilSpirit c0f075671b Eigen library integration into solver.
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
Co-authored-by: Koen Schmeets <hello@koenschmeets.nl>
2021-12-31 14:40:47 -05:00
Koen Schmeets 4ad5d42a24 Add missing eigen submodule in some scripts 2021-12-31 14:40:47 -05:00
Koen Schmeets c66e6cbacc Add eigen extlib to install command 2021-12-31 14:40:47 -05:00
Ryan Pavlik dca5ce607d Add Eigen to build. 2021-12-31 14:40:47 -05:00
Ryan Pavlik ac91809a96 Add Eigen submodule at 3.4.0 tag 2021-12-31 14:40:47 -05:00
EvilSpirit e528fabbe4 Add an early out in writing jacobian.
Split from previous large 'Eigen library integration' commit.
2021-12-30 13:59:58 -05:00
EvilSpirit aec46b608e Add a method to Expr.
(Split out from earlier "Eigen library integration" commit)
2021-12-30 13:59:58 -05:00
EvilSpirit 3ba40230dd Some optimization
1. We are making FoldConstants first, so we are copying less amount of data in DeepCopyWithParamsAsPointers.
2. Since we already perform DeepCopyWithParamsAsPointers, PartialWrt already produces params as pointers
2021-12-30 13:59:58 -05:00
EvilSpirit 2f31673708 Decrease WriteJacobian complexity 2021-12-30 13:59:58 -05:00
EvilSpirit 4d58f95b43 Suppress dof calculation flag 2021-12-30 13:59:58 -05:00
EvilSpirit 7f86a78472 Dof calculation when redundant is allowed. 2021-12-30 13:59:58 -05:00
EvilSpirit 708a08f04b SolveBySubstitution of linear complexity. 2021-12-30 13:59:58 -05:00
Ryan Pavlik 974175dfbc Fix CMake warnings 2021-12-30 13:59:58 -05:00
Ryan Pavlik 006539b945 Clean up/simplify build 2021-12-30 13:59:58 -05:00
Ryan Pavlik a1e18b83cb Normalize namespaces: includes all at global/root namespace.
Should improve the quality of suggestions, etc. we get from tooling.
2021-12-24 11:29:57 -05:00
Ryan Pavlik 6d40eface2 importidf: Fix uninitialized variable 2021-12-24 11:29:57 -05:00
Ryan Pavlik 71c6492d6d readme: Clean up, fix nearly all markdownlint complaints 2021-12-22 15:06:14 -05:00
Ryan Pavlik b86e0dec84 readme: remove outdated build instructions 2021-12-22 15:06:14 -05:00
ruevs e07b082eb8 Fix hang when trying to display characters missing from the embedded font
When SolveSpace tries to display an Unicode code point (e.g. U+EA00 )
that does not exist in the embedded vector font (unifont.hex.gz) it hangs
in an endless loop in
`const BitmapFont::Glyph &BitmapFont::GetGlyph(char32_t codepoint)`.

The reason is that the binary search through the text file unifont-8.0.01.hex
that does the "lazy loading" of glyphs does not end.

Here is a short excerpt from the file:

```
D7FE:00007FFE63866DF66DEE6DDE63DE7FFE7FFE61866FBE638E6FBE6F867FFE0000
D7FF:00007FFE63866DF66DEE6DDE63DE7FFE7FFE61866FBE638E6FBE6FBE7FFE0000
F900:0080108810881FF8100800007FFE00000FF008100FF00810042002447FFE0000
F901:00047FFE008010841FFE10841FFC10841FFC10840880050003000CC0703E0000
```

When searching for `0xEA00` after some iterations of the while loop
2450010bbf/src/resource.cpp (L567)
both `first` and `last` end up pointing to F900. After that on each
consecutive iteration of the loop `last` ends up pointing to the LF (0x0A)
just before F900
2450010bbf/src/resource.cpp (L585)
and then `mid` ends up back on F900 here
2450010bbf/src/resource.cpp (L570)
and this will repeat enlessly.

The solution is to do
```
                    first++;
```
here
2450010bbf/src/resource.cpp (L591),
which will make `first==last` and change whe while loop contition to `while(first < last) {` thiw will
allow the while loop to exit.

Tested with
- 0xEA00 - non existent, not found in 16 iterations.
- 0xF900 - exists but takes exactly 16 iterations of the binary search to finish
- 0x0000 - found in 16 iterations
- 0xFFFD - the replacement Unicode code point for non-existing glyphs. Also the end of the font.
- 0xFFFFF - a codepoint beyond the end, not found and does not cause an exception

The lazy parsing of the vector front was introduced here.
645c2d90ac

Fixes #1150
2021-12-21 09:49:08 -05:00
ruevs 2450010bbf
Update REAMDE.md - point IRC to Libera chat.
... change Solvespace.com URL to https.
2021-12-12 20:12:20 +02:00
Tom Sutcliffe 91db627a81 mac: Don't interpret single-touch scroll events as pan gestures
To handle the Magic Mouse, whose single-finger touch gestures should be
interpreted as scrollwheel events rather than pan gestures.
2021-12-10 10:25:13 -05:00
phkahler 85f6ec4144 fix STL linking issue. Model was disappearing after the link group. 2021-11-20 19:48:17 -05:00
ruevs df3ef2ab0e GUI: Flexible vertical space above the toolbar
If the main window is not high enough allow the default 32 pixel padding
between the menu bar and the toolbar to shrink down to zero.

This allows the main window height to be a minimum of 688 pixels (on
Windows 10) so it is possible to capture 720P video tutorials.

Fixes #1130
2021-11-04 20:08:54 -04:00
Maximilian Federle eb17248bd5 CI: Replace edge releases with links to artifacts
Re-creating the edge release for every push
to master creates many superfluous release notifications.

Stop creating those releases and provide users with direct
links to the workflow artifacts instead via the
nightly.link GitHub app (https://github.com/apps/nightly-link).

Fixes #1103
2021-10-29 16:47:38 -04:00
Simon Wells 2a722c16b8 add gdk.h for GDK_WINDOWING_ defines 2021-10-23 20:59:52 -04:00
Simon Wells 267c002975 modify the spaceware code to also work on wayland
use the recommended compile-time and run-time checks for x11 and wayland
2021-10-23 20:59:52 -04:00
MX_Master a45e84a2ff + safe height gcode parameter 2021-10-23 20:01:29 -04:00