Commit Graph

1793 Commits (fb5e731e6eac00464f42a554e64623e854f73065)

Author SHA1 Message Date
phkahler b55dac7620
Don't create extra copies of entities in Revolve and Helix groups.
Might break some older files with those groups that depend on these
extra entities.

Fixes #549.
2020-04-21 01:24:33 +00:00
Ryan Pavlik e51fdf6fba Use handles instead of pointers in GenerateAll(). NFC. 2020-04-20 18:37:03 +00:00
Maximilian Federle f5415b3fe6 snap: Upgrade from gnome-3-28 extension to gnome-3-34
Using gnome-3-34 gives us a newer stack in general
and also provides us with a sdk build-snap, so we don't need
to specify as many build-packages and stage-packages.

This makes the snap slimmer and delegates the responsibility
for security updates to the gnome platform snap for even more
packages.
2020-04-17 09:17:53 +00:00
Maximilian Federle 13b461d750 snap: Use symlink instead of bind-mount for layout
As per https://snapcraft.io/docs/snap-layouts,
bind-mounts significantly increase the startup time of the snap.
Use symlink instead for better performance.
2020-04-16 18:56:13 +00:00
Tim 72635df56e
Add menu options for line styles / view / configuration.
This is to make them a bit easier to find, since the natural place
to look for config options is somewhere like File->Preferences or
Edit->Settings.
2020-04-01 21:25:18 +00:00
Tim 647171017a
Fix more segfaults in mouse.cpp lambdas (#574)
This changes all the lambdas to have explicit captures, since the use of
implicit captures has led to some memory errors, especially segfaults in
the right-click menu.

I'm not 100% sure that the code is correct anyway - it really needs auditing
to ensure all referenced values are still valid when the menu item is clicked
(e.g. can you change stuff with keyboard shortcuts while the context menu is
visible?), but it should at least be *more* correct!
2020-03-29 01:46:34 +00:00
Tim 485fd012b4
Fix segfault in Remove Spline Point context menu
This was incorrectly capturing `r` by reference and using it after it left
its scope. Changed to  capture by value, and also explicitly capture `this`
in case we were accidentally capturing any other scope variables by reference.

Fixes #571
2020-03-28 15:28:12 +00:00
phkahler f7b6f6930e
Nurbs (#473)
* Limit u,v range between 0 and 1 in Newton. Fixes issue #471
* Change the math for projecting a point onto a plane to work better with non-orthogonal U,V derivatives in several places. Fixes #472.
2020-03-27 15:40:58 -04:00
phkahler 83b0402c84
Added developer instructions for creating new entity transformations in the solver. (#491) 2020-03-27 15:08:35 -04:00
nabijaczleweli 645353cbdc Force SSE2 floats for i686 targets
Both GCC and Clang use x87 instructions by default on 32-bit x86
targets, but the loss of precision resulting from that has yielded
crashing tests (see referenced issue), and it can be safely assumed
there are very few CPUs that both don't support SSE2 and are expected to
run SolveSpace

This commit also removes a now-redundant check for 32-bit Windows
against TARGET, which doesn't seem to be actually set by CMake at all

Ref: #565
2020-03-24 17:31:21 +00:00
nabijaczleweli aeaece53e1 Accept both slashes in test harness on Win32
This fixes tests when __FILE__ produces output separated with / instead
of \, like on my Windows+MSYS2+GCC config

Fixes #563
2020-03-23 01:07:40 +00:00
nabijaczleweli e355a095c4 Force vendor zlib, png, and FreeType on Win32, too
This has lead to linker problems if the environment does have standard
versions of zlib/png (like from MSYS2), see discussion in referenced
issue

Closes #559
2020-03-15 03:03:24 +00:00
nabijaczleweli 7e33d2daec Update ANGLE to 8776e911bf71f68518ddd1995ce09d80db8c1216 2020-03-15 03:03:24 +00:00
Roc a6c34bb44d
Fix a crash when trying to show an error with bad separator.
For example, a single dot or colon at the end of the error string.
2020-03-12 23:03:26 +00:00
nabijaczleweli 6017ecdacc Fix two trivial implicit double to int conversion warnings. NFC 2020-03-08 16:33:55 +00:00
nabijaczleweli c29624f4a1 Update flatbuffers, fixing build on Clang trunk
flatbuffers hard-code general -Werror, which led to builds failing on
clang 11.0.0-++20200307120047+01c48d7d11e-1~exp1~20200307110643.632
with a plethora of
 ../extlib/flatbuffers/include/flatbuffers/flatbuffers.h:1720:25:
 error: definition of implicit copy constructor for
 'TableKeyComparator<reflection::Object>' is deprecated because it has
  a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
2020-03-08 16:33:38 +00:00
ruevs fcb2757d5d Win32: Drastically reduce stack usage at startup. NFC?
See:
https://github.com/solvespace/solvespace/issues/92#issuecomment-567831112

The problem was first introduced here:
dabd57847e

and later "fixed" here:
f324477dd0
by setting the stack size to /STACK:33554432

Solvespace now starts up even with /STACK:554432

According to this:
https://en.cppreference.com/w/cpp/language/value_initialization
```
"2) if T is a class type with a default constructor that is neither user-provided nor deleted (that is, it may be a class with an implicitly-defined or defaulted default constructor), the object is zero-initialized and then it is default-initialized if it has a non-trivial default constructor; "
```
So removing the `{}` should leave both the `System` and `TextWindow` class instances properly initialized.
2020-02-24 08:41:45 +00:00
KmolYuan 6f7c26460b Fix deployment. 2020-02-22 16:11:05 +08:00
KmolYuan 40c1541df5 Merge from master. 2020-02-22 15:11:39 +08:00
Yuan 101a08e1cb
Merge pull request #4 from solvespace/master
Merge from remote.
2020-02-22 15:07:12 +08:00
KmolYuan ede91f4955 Move docstring to sources instead of stubs. 2020-02-22 15:02:20 +08:00
ruevs 8ef3cacc33 Fix a bug with 3Dconnexion: SpaceMouse
A warning found with /W4 by MSVC 2019 (Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28314)
is an actual bug. How does the SpaceMouse (I do not have one) work at all when the global `hSpaceWareDriverClass` is NULL?!

.\src\platform\guiwin.cpp(1392,34): warning C4459: declaration of 'hSpaceWareDriverClass' hides global declaration
.\src\platform\guiwin.cpp(1389,13): message : see declaration of 'SolveSpace::Platform::hSpaceWareDriverClass'
2020-02-20 14:03:31 +00:00
ruevs f6a774d7bf Fix some trivial warnings found by MSVC. NFC.
Found with /W4 by MSVC 2019 (Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28314)

A bunch of implicit casts 'double' to 'float' and one 'int64_t' to 'unsigned'.

.\src\platform\guiwin.cpp(1237): warning C4701: potentially uninitialized local variable 'cursorName' used
.\src\platform\guiwin.cpp(1237): warning C4703: potentially uninitialized local pointer variable 'cursorName' used

.\src\solvespace.cpp(805,30): warning C4456: declaration of 'gs' hides previous local declaration
.\src\solvespace.cpp(715,17): message : see declaration of 'gs'

.\src\solvespace.cpp(849,47): warning C4456: declaration of 'e' hides previous local declaration
.\src\solvespace.cpp(847,29): message : see declaration of 'e'

.\src\render\render.h(288,51): warning C4458: declaration of 'camera' hides class member
.\src\render\render.h(271,17): message : see declaration of 'SolveSpace::SurfaceRenderer::camera'

.\src\render\render.h(289,57): warning C4458: declaration of 'lighting' hides class member
.\src\render\render.h(272,17): message : see declaration of 'SolveSpace::SurfaceRenderer::lighting'
2020-02-20 14:03:31 +00:00
Maximilian Federle bae84b27e4 snap: Fix missing extension for cli
solvespace-cli needs the gnome-3-28 extension to find its libraries.
2020-02-14 10:01:51 +00:00
Maximilian Federle 1cd727d9dc snap: Remove superfluous files from package
Remove all files from snap that are already included in the base snap
or in any connected content snaps.

The main advantage is the massively reduced snap size:
From ~70 MB down to ~6 MB.
2020-02-14 10:01:51 +00:00
Maximilian Federle dcc80de730 snap: Add missing sudo in Travis deploy step
Running the build step with sudo necessitates running the deploy step with sudo too.
Otherwise, we face permission problems.
2020-02-08 16:50:55 +00:00
Maximilian Federle 65ab59503a snap: Build snaps on Travis without remote-build & drop i386 + armhf
Snapcraft's remote-build does not fit the requirements of CI,
so replace it with builds running directly on Travis:

1. Builds on Travis can run independently, whereas remote-build
competes for the same resource (Launchpad) and will potentially
block if multiple commits require building in succession.
2. Snapcrafts CLI for remote-build is not designed to be easily
scriptable.
3. Travis recently introduced building on arm64, so builds for
arm64 are now very fast and don't require emulation.

We do not build for armhf and i386 any more because they are
of little relevance on the desktop.
2020-02-08 16:15:09 +00:00
Koen Schmeets 3ed1719de2
Fix immediate editing of reference constraints.
Before this commit, if immediate editing of constraints was enabled,
then when adding a reference constraint, an editor was incorrectly
opened.
2020-02-05 05:34:33 +00:00
KmolYuan fe29a202ce Bump version. 2020-02-02 21:45:20 +08:00
KmolYuan 05634f4f7b Move docstring into stubs. 2020-02-02 21:44:32 +08:00
KmolYuan 5c0e66baaf Bump version. 2020-01-29 12:40:48 +08:00
KmolYuan 6cb9ff92a4 Typing patch. 2020-01-29 11:40:41 +08:00
Maximilian Federle 72bc71cc9d README: add snap as an installation option. 2020-01-23 17:05:13 +00:00
Maximilian Federle 2dcd81d7e7 snap: Release snaps to store via script instead of snap provider
dpl-snap only supports pushing one snap at a time.
Instead of many repetitive deploy statements,
we use our own script to loop over the snaps to be released.
2020-01-23 01:47:10 +00:00
Maximilian Federle d5351c48e3 snap: build snaps on Travis via remote-build.
We invoke builds on Launchpad in stage "deploy" and release it into
the edge channel of the Snap Store.

The deploy stage is blocked on fails of the test stage, so we don't
release snaps with failing tests.
2020-01-21 23:38:55 +00:00
ruevs 16c5fa6889 Fix eight trivial "implicit conversion 'double' to 'int'" warnings. NFC. 2019-12-17 19:35:44 +00:00
whitequark 64c0f62b92 Win32: mark all remaining functions as Unicode. NFC.
Some were missing the *W suffix.
2019-12-06 15:21:51 +00:00
whitequark 69baf52432 Linux: fix Z-order in scalable icon. 2019-12-04 13:57:10 +00:00
whitequark 0b786e6e2b CMake: review minimum required CMake version.
It turns out that using cmake_policy(VERSION) is effectively same as
using cmake_minimum_required(VERSION) because it is a hard error
if the CMake running the script is too old. As such, replace 22525e65
with two changes:
  * Set the minimum required version to 3.7.2 (Debian stretch),
    which also configures policies.
  * If CMake is at least as new as 3.11.0, then set the policies
    according to that version.
This should actually have the intended behavior.
2019-12-02 18:51:58 +00:00
KmolYuan 9d573178c0 Solve Homebrew error. 2019-11-28 00:07:40 +08:00
Koen Schmeets 0472b9ea60 macOS: fix tooltips not closing on Catalina. 2019-11-27 12:51:27 +00:00
KmolYuan 5ebb37028b Merge from master. 2019-11-27 14:09:27 +08:00
Yuan cfd630f4ac
Merge pull request #3 from solvespace/master
Merge from origin master.
2019-11-27 13:56:01 +08:00
Koen Schmeets dcdfdec564 Add an option to edit dimension immediately after adding. 2019-11-26 22:34:53 +00:00
Koen Schmeets 58f23aa061 macOS: force show property browser when opening preferences from menu. 2019-11-26 20:31:14 +00:00
Koen Schmeets 552fe354aa Fix commit 07992cecaa. 2019-11-26 14:34:30 +00:00
whitequark 0501f0c99e Don't call GL functions in OpenGl3Renderer::GetIdent.
GetIdent is called from an UI event callback, at which point there
might well not be an active GL context. Before this commit, that
would return a NULL pointer and result in a crash.
2019-11-26 11:23:37 +00:00
whitequark 22525e6515 CMake: update policy to 3.11.
In particular this enables linking with GLVND on Linux by default.
2019-11-26 11:23:37 +00:00
whitequark 07992cecaa Remove unused offscreen GL renderer.
This was used for Gtk 2 and old macOS, but all of those use direct
rendering now.
2019-11-26 11:23:37 +00:00
Maximilian Federle a60d4df179 Refactor Travis config
- Fix invalid osx_image xcode8.2
- Drop depreceated sudo keyword
- Run debian build on bionic image & re-enable building with ui
- Split build into separate jobs & stages for better separation of concerns
2019-11-26 07:58:20 +00:00