Commit Graph

1031 Commits (bd98749195c230730212b5383a5d362c7fae3416)

Author SHA1 Message Date
Yuan Chang 91d3477314
Merge branch 'solvespace:master' into python 2021-12-02 09:18:36 +08: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
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
phkahler 0eab7f783b move perspective, lighting, and explode distance from configuration screen to view screen. 2021-08-29 13:54:38 -04:00
tomsci 8cfe1d4bd7
mac: Remove spurious view menu items (#1101)
Which are either not applicable for SolveSpace (the tabs ones) or are
already handled in the platform-independent code (the fullscreen item).
2021-08-28 22:09:48 +02:00
tomsci e1b0784b31
mac: Support for pan, zoom and rotate trackpad gestures (#1093)
* mac: Support for pan, zoom and rotate trackpad gestures

Currently SolveSpace is nearly unusable on a mac if you only have a
buttonless trackpad and not a mouse, because there's no way to pan
(ie right-click-drag) or rotate (ie middle-click-drag). You can zoom,
but only by using two-finger-drag up and down, which ends up getting
interpreted as a scrollwheel event.

This change makes the app behave much more like any other mac app, by
adding 2-finger-drag pan gesture support and pinch-gesture zooming, and
3D rotate using shift-2-finger-drag.

I've also added support for the rotate two-finger trackpad gesture,
which rotates directly around the screen Z axis (rather than in all 3
dimensions) which is actually something I've found myself wanting to do
with the mouse but afaik there's no equivalent way of achieving that.

While I was there, I fixed a bugette in convertMouseEvent which was
incorrectly translating the NSEvent coordinates, and then fixing up the
fact that the sign of the y-coordinate was wrong as a result. Using the
convertPoint API correctly means that fixup is not required because
convertPoint handles it for you.

* Don't do trackpad gestures on anything except the toplevel window

* mac: Fix non-functional scrollbar on text window

Which has not worked quite right since the last major refactor.

* Don't pass right-button drags to the toolbar

This improves the behaviour of trackpad pan/rotate on mac which uses
simulated right-button events.

* Don't pass cmd/ctrl modifier through on trackpad pan/rotate MouseEvents
2021-08-27 01:58:33 +02:00
tomsci 31a709e2c8
mac: Support external quit requests (#1099)
By no longer always returning NSTerminateCancel in
applicationShouldTerminate.

And implement applicationWillTerminate to ensure the cleanup code in
SolveSpaceUI::Exit() is always called.
2021-08-26 14:03:28 +02:00
Tom Sutcliffe 7e823df94a Correct which group is forced to mesh when linking an STL file
By making IsForcedToMesh() always return true for STL link groups,
rather than trying to set forceToMesh=true during the import phase.

STL link groups are now always shown as "model already forced to
triangle mesh" in the details screen, but also (unlike when the model
is forced to mesh by a parent group) show the '∆' icon in the group
list.
2021-08-24 13:09:19 -07:00
Tom Sutcliffe f71c527e23 Add a "∆" suffix to groups which have "force to triangle mesh" ticked. 2021-08-24 13:09:19 -07:00
Tom Sutcliffe b87987922f Darken disabled gray to 50% and document it. 2021-08-21 20:19:30 -04:00
Tom Sutcliffe 4db3e90b81 Show suppressed groups in gray in the text window 2021-08-21 20:19:30 -04:00
Tom Sutcliffe 5edb2eebf6 Add "Show Exploded View" menu option
Where each entity in the active workplane sketch is projected a
different amount normal to the workplane, to allow inspection and
easier selection of entities that entirely overlap each other and are
thus otherwise difficult to see or select.

The distance between the exploded "layers" can be controlled in the
configuration page. Negative distances mean the layers are projected in
the opposite direction, relative to the workplane normal.
2021-08-17 17:48:25 +03:00
Tom Sutcliffe e86eb65985 Update feet and inches format to match architectural convention 2021-08-15 18:18:41 -04:00
Tom Sutcliffe 959cf5ba75 Fix MmToString calls that should have editable=true set 2021-08-15 18:18:41 -04:00
Tom Sutcliffe 41e3668f89 Make feet and inches show fractions of an inch, rounded to nearest 1/64
Taking care to round appropriately so you don't end up with things like
35.999 coming out as 2' 12" and similar.
2021-08-15 18:18:41 -04:00
Tom Sutcliffe 2fb6119de8 Add option for displaying dimensions in feet and inches 2021-08-15 18:18:41 -04:00
Tom Sutcliffe c19bd8cc99 Remove unused variable 2021-08-14 20:34:26 -04:00
Tom Sutcliffe b65a0be3d6 Fix/silence mac build warnings
As per Xcode 12.4 you can at least do a warning-free incremental build
with these changes. There are still plenty of warnings in a full build
(mostly from thirdparty components) but with these changes you can at
least develop on mac and see if/when you've added any new warnings when
doing incremental builds.
2021-08-14 20:34:26 -04:00
Tom Sutcliffe 56719415de Don't reset showFaces every time a group is activated
Instead store the state separately for drawing and non-drawing group
types, and set showFaces to one of those, whenever a group is activated.
2021-08-08 13:24:47 -04:00
phkahler 06a1f8031d Add optional helix pitch constraint. 2021-07-31 13:15:19 -04:00
phkahler f6bb0a2d35 Add an ALL filter for linking files that includes slvs, emn, and stl 2021-07-28 21:15:33 -04:00
phkahler 2afd6103d9 Add STL linking with bounding box and edge verticies. Experimental. 2021-07-28 20:36:20 -04:00
luz paz 37da0f3341 Fix various typos
Found via `codespell -q 3 -S ./res/locales,./extlib -L asign,ba,hsi,mata,tothe`
2021-07-06 10:37:58 -04:00
Eric Chan 37de364257 Addition of ArcLength Ratio and ArcLength Difference constraints to Constraints list 2021-06-28 11:31:53 -04:00
Maxipaille 4308dc136b Fix "Sketch in New Workplane" point & normal to set correct orientation of workplane
Temporary disable other ways because of wrong implementation
2021-06-27 13:17:09 -04:00
Olivier JANIN 3ccf7845f5 Improve "Sketch in New Workplane" by adding two way of construction
- point and normal
- point and face
2021-06-27 13:17:09 -04:00
phkahler b5fb1dd429 Show IDF keepout regions as construction entities. 2021-05-17 14:55:38 -04:00
phkahler e74e202465 fix a compiler warning on GTK builds 2021-05-12 20:02:21 -04:00
ruevs 3e01afa3ae Remove all unused methods from IdList and its iterator
Fix gcc warning -Wreorder-ctor
 https://stackoverflow.com/questions/1828037/whats-the-point-of-g-wreorder
2021-05-12 19:50:23 -04:00
ruevs 034d9213f1 IdList: Remove Unused IndexOf, First, Last and NextAfter Methods 2021-05-12 19:50:23 -04:00
Přemysl Eric Janouch 9dd67c7ba0 Use Range-based for Loops Instead of NextAfter for all IdList Objects
Based on commit '3b395bb5a7' by pjanx

Resolves a performance regression of iteration being O(n * log n)
rather than O(n).
2021-05-12 19:50:23 -04:00
ruevs 7674be791e IdList: Optimize IdList by Using an Index and Add a Proper Iterator
- Use `std::vector<T> elemstore` to store elements. Avoids manual memory management.
- Add and index (`std::vector<int> elemidx`) that avoids moving large objects
  when adding elements.
- Add a free element list (`std::vector<int> freelist`) that speeds up element removal by
  avoiding rearranging the element storage. It also avoids reallocations when adding
  elements later.
- Add a proper iterator. It will be used to remove NextAfter - which is a performance bottleneck.
2021-05-12 19:50:23 -04:00
ruevs 7e08b02de1 Allow comments to be associated with point entities
If a single point is selected when a "Constrain | Comment" (`;`) is added
then the comment is associated with the point and its position becomes
relative to the point. In this way the comment will move with the point.

If nothing is selected or more than a single point is selected then
the behaviour is as before and the comment is "floating".

Closes #1032
2021-05-12 19:22:46 -04:00
robnee e15ccdd477 Update property browser display live when dragging
Keep items in selected state while dragging so that property browser
will track them until the left mouse button is released.  Also, trigger
a property browser update on mouse move while dragging to make the
display "live"
2021-05-02 19:51:00 -04:00
robnee 709dc31f78 Fix lookup of stipple pattern before config is available
Fix a bug with the lookup of stipple pattern for default styles when the
config settings are not yet available (install/upgrade/first run). This
caused hidden lines to display as continuous rather than dashed.
2021-04-28 15:59:21 +03:00
Ryan Pavlik 8a4d84e85e Add comment about asan warnings. 2021-04-21 12:13:26 -04:00
Tom Sutcliffe e2bf722fec Copy path to avoid it being invalidated by OkayToStartNewFile() 2021-04-04 11:52:19 -04:00
Koen Schmeets 8105699d5e Add apple arm64 support 2021-04-04 11:40:10 -04:00
robnee 3ed151bf90 Skip image rendering in CLI rather than hard abort 2021-04-03 22:58:05 +03:00
robnee cc52eb237d Allow right click to end sketching of all entities 2021-04-03 12:53:04 -04:00
robnee 2e88c5e0da Clamp lighting value on export to fix flat colors
Also, this fixes the Printf format for the ambient lighting entry on the
configuration screen.  This was causing string behavior when attempting
to edit the ambient lighting value on Windows.  Oddly this didn't seem
to affect Linux.
2021-04-02 18:13:31 -04:00
dustinhartlyn 6b94af0765
minor fix open/save dialogue on windows (#983)
* minor fix open/save dialogue on windows 

On windows 10 the open/save dialogue box has an minor error, and I believe I fixed it. 

When "Open" is selected from the menu, the title of the dialogue box says "SolveSpace - Save File" and the entered file name is "united". My fix correctly titles the dialoged box, and leaves the address bar blank when a file is being opened because "united" is only needed as a default name when a file being saved. 

I found that class FileDialogImplWin32 from guiwin.cpp contains two if statements for "isSaveDialog". This is redundant. I removed the first where the title was originally set, but not working. I then set the title in the second if statement and moved the 'if isEmpty'' to this section.

* Update guiwin.cpp

replaced tabs with spaces
2021-04-01 09:24:04 -04:00
Přemysl Eric Janouch 5c3ce9bfc2 GTK: make spacenavd work through its socket, too
E.g. for when you have more than one user logged in, in which case
spacenavd works only for the first of those X11 displays.

We try to do it the old way first, so there should be no regressions.

Also fixes storing non-booleans in bool variables.
2021-03-30 10:22:05 -04:00
robnee 1628097037 Save stipple settings for default styles to config 2021-03-29 14:43:29 -04:00
Přemysl Eric Janouch 5e42275b1a Fix pathologically slow translate groups on Linux
Major performance improvement on GCC with libstdc++.
2021-03-27 12:03:01 -04:00
robnee d511ce4acc Trigger redraw on load factory default styles 2021-03-27 12:00:22 -04:00
robnee 53f5e4e7e5 export style for construction entities for edges 2021-03-25 21:29:41 -04:00