Commit Graph

1820 Commits (c0f075671bc5ca71e2813dc1861740f8ea03f7bd)

Author SHA1 Message Date
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
Koen Schmeets 5fbb1b8f53 Travis: remove old secrets from .travis.yml 2020-10-25 17:59:52 +01:00
Maximilian Federle 24720a0024 Revert "CMake: use sanitizer flags for internal targets only"
This reverts commit 68b1abf77f.

The warnings are valuable and shouldn't be cast aside.
As of 8f509f1, we special case macOS and don't set -fno-sanitize-recover
to allow CI to succeed.
In the future, this could be made stricter again by only suppressing
known bugs, which ideally should also be fixed or reported upstream.
2020-10-24 17:10:47 +02:00
Koen Schmeets da87a68093 Travis: try fixing deploy secret (sorry, has to happen on master) 2020-10-24 12:11:00 +02:00
Koen Schmeets 8f509f1452
Travis: CI improvements and fixing edge builds (#766)
- Fix release notes by using edge deploy provider, see: https://github.com/travis-ci/dpl/pull/1069
- Deploy only on master branch
- Move to arm64-graviton2
- Rename debian -> ubuntu
- Remove appveyor.yml
- Remove redundant deploy stage in build step names
- Get rid of bash code in files using sh, and explicitly use bash in sign-macos.sh script
- Add missing newline to build-windows.sh
- Build x86 for Windows
- Enable OpenMP in test builds
- Disable sanitizers on macOS test build
- Disallow failures on snap build
2020-10-24 11:08:40 +02:00
ruevs 7035071526 Performance optimization of the Vector class
Profiling with MSVC 2019 showed that many of the Vector methods are on
a critical path (not surprising). They are changed to be inline and
unnecessary temporaries are removed.

On the example below generate times decreased from 102s. to 64s.
At the same time the executable size shrank from 5569536	to 5150208 bytes
in release mode (with global optimizations).

This should not stop us from working on optimizing inner loops e.g. https://github.com/solvespace/solvespace/issues/759 .

[Test model](https://github.com/solvespace/solvespace/files/5414683/PrismConeNURBSNormalsTangents300.zip)
2020-10-23 20:08:43 -04:00
Maximilian Federle 68b1abf77f CMake: use sanitizer flags for internal targets only
Previously sanitizer flags were set unconditionally for
all code, including that of external libraries.
Set them only for targets in src/, tests/ and exposed/.

Unfortunately, the linker equivalent to add_compile_options,
add_link_options, is only available for CMake version >= 3.13.
So add the sanitizer flags manually to each target's linker options.
2020-10-23 19:39:36 +02:00
phkahler c674bc8fb9 Add OpenMP parallel for to SShell::CopyCurvesSplitAgainst 2020-10-23 12:53:54 -04:00
phkahler 0f1ece2b8e Resovle a huge performance regression introduced by commit ab10e38 while still fixing the NURBS issues resolved by that commit with only modest speed penalty. The performance is significantly improved by using bounding box tests on curves prior to doing complex intersection testing. 2020-10-23 12:52:27 -04:00
ruevs 0761339ec9 STEP Export: include colors and alpha
Make the color export work in KiCAD and Horison EDA which do not support
transparency.

Fixes: https://github.com/solvespace/solvespace/issues/452
https://github.com/solvespace/solvespace/pull/763
2020-10-22 09:59:35 +03:00
ruevs 400056cded CMake: Give ENABLE_LTO a default and a description so it shows up in cmake-gui 2020-10-21 19:32:11 -04:00
Maximilian Federle aa83681da7 snap: enable OpenMP and LTO 2020-10-21 19:04:34 -04:00
ruevs 32e695bfee STEP Export: include colors and alpha
The implementation may be sub-optimal, since the colour and alpha is
defined for each NURBS surface instead of on group level, but the STEP
export currently does not represent group structure at all and I am not
familiar with the format in order to change this.

Fixes: https://github.com/solvespace/solvespace/issues/452
2020-10-21 17:19:12 -04:00
Koen Schmeets b3cd92899e Travis: release macOS and Windows edge builds
- Fixes windows build type
- Revert `cleanup: false` back to `skip_cleanup: true`
- Waits 10 seconds to get notarize_uuid for macOS since it would sometimes fail
2020-10-21 16:20:34 -04:00
Maximilian Federle 8a2e77d035 CMake: fix LTO on Linux
LTO/IPO with non-Intel compilers on Linux requires policy CMP0069 to be set to NEW.
Set it explicitly until cmake_minimum_required is raised to >= 3.9

Also explicitly check whether the current environment actually supports IPO.
2020-10-20 19:47:22 -04:00
Koen Schmeets f3f33d3f26 Travis: optimize macOS deploy build
- Turns on the -DENABLE_LTO flag during deploy
- Turns off the -DENABLE_OPENMP flag during test
2020-10-20 12:38:05 -04:00
phkahler ab10e38d44 Add vertexes to curve intersection list in addition to surface intersections.
Sometimes a vertex can be used to split a curve where surface intersections can't. Those unsplit curves can cause boolean failures.
2020-10-20 12:37:18 -04:00
phkahler 6b5936b2f6 remove zh_CN.mo 2020-10-20 11:46:16 -04:00
ZHOU You 2be2e428d3 Chinese translation added. 2020-10-20 11:08:34 -04:00
Koen Schmeets 9d2641a5de Travis: update travis and macos build configs
- Fixing warnings in .travis.yml
- Enable building on all cores for macOS build
- Quote variables
2020-10-20 11:03:13 -04:00
Koen Schmeets 3af8127e8f macOS: add NSOpenGLPFADoubleBuffer to NSOpenGLPixelFormatAttribute 2020-10-20 10:59:58 -04:00
Koen Schmeets 8e7416f3fd
Travis: Build improvements and fixes (#751)
- Add OpenMP to macOS build
- Use as many cores as possible in CI
- Update travis osx image to xcode12.2
- Ignore .vscode folder
- In `.travis/sign-macos.sh`, only create keychain when `CI` variable is present
- Only run macOS deploy stage when a tag is pushed
2020-10-20 09:39:26 +02:00
phkahler b28499ea48 initial support (disabled) for keepout regions in IDF files. 2020-10-19 18:26:45 -04:00
phkahler b12bcc5889 Fix some IDF file curves. 2020-10-19 18:26:45 -04:00
Koen Schmeets 0548702043 macOS CI fixes 2020-10-19 09:36:52 -04:00
phkahler 408128a138 Avoid zero tangnet vectors on degenerate NURBS edges. Fixes #652 2020-10-18 14:54:00 -04:00
Koen Schmeets e42aa0fac4 Update .travis.yml for macOS build
Update .travis.yml for macOS build

Add executable permission on sign-macos.sh script
2020-10-18 12:05:56 -04:00
Koen Schmeets 91684fe6f4 Add macOS travis config, fix issue in CMakeLists.txt causing macOS build to break 2020-10-17 13:19:54 -04:00
Maximilian Federle 0288c0a98b Travis: add windows target
Mimic the appveyor cfg without the artifact deployment.
Also upgrade to Visual Studio 2017/v141 toolset.
2020-10-16 17:53:22 -04:00
ruevs 6558cb9ebe Fix crash in solvespace-cli
`window` is a `nullptr` with guinone.cpp - avoid dereferencing it.

Fixes: https://github.com/solvespace/solvespace/issues/567
2020-10-16 17:44:58 -04:00
ruevs 3ea8ebfaf5 Win32: Fix "File|Open...", "Save" and "Save As" when a command line argument is used.
`GetSaveFileNameA` `OPENFILENAMEA` does not like UNC ( "\\\\?\\C:\\..." ) file prefixes in `lpstrFile`.
Work around it by not `Expand`-ing parameters passed on the command line too early.

The only user visible change is that "File|Open Recent" will show items as they
were passed instead of expanded to full path for example:
"..\..\NURBSTests\Intersection2.slvs"

Fixes: https://github.com/solvespace/solvespace/issues/622
2020-10-16 17:44:27 -04:00
phkahler d72eba8039 Create intersection curves from existing ones.
When a plane coinsides with a seam we need to copy that trim curve. The existing curve belongs to the original shell surfaces and an intersection is otherwise not found. Fixes #540.
2020-10-10 02:02:34 -04:00
julien581 c514ddad54 Fix for https://github.com/solvespace/solvespace/issues/248 2020-10-03 15:27:14 -04:00
phkahler c021df33c0 Fix issue 684 as whitequark suggested via WM_KEYDOWN->WMCHAR change. 2020-10-01 13:55:40 -04:00
Johannes Rehnman 3ce8c29982 Allow DXF import of 3D arcs and circles
Extrusion direction (normal) of arcs and circles were not taken into
account when importing.

- Add method for calculating a quaternion from extrusion direction
  according to DXF arbitrary axis algorithm
- Add required workplanes for arcs not on XY origin plane
- Adjust addDimRadial and addDimDiametric to include normal when
  creating associated circle request
2020-10-01 12:59:43 -04:00
phkahler 6b7f114697 Updated changelog 2020-09-30 17:30:51 -04:00
phkahler 8cf9d68ecf IDF file Linking.
Can read PCB outlines and cutouts, as well as Pin and Mounting holes. A simple PPCB model sans components is added to the assembly.
2020-09-30 14:20:35 -04:00
phkahler 0a061b6f9e NFC: Performance. For step-and-repeat groups, create the copies first (in parallel) and then combine them using unions of equal size shells to reduce the total time spent on booleans. 2020-09-22 16:30:03 -04:00
Reini Urban 7c766c72f4 translate_solvespace updates
for all languages. See PR #705

my russian is not good enough to fix the remaining ru and uk strings.
german and french are now complete.
2020-09-22 15:45:00 -04:00
phkahler d49c8a1aef add debug message showing the name of a group whose linked file can't be found. 2020-09-22 15:28:17 -04:00
phkahler d575da8611 Add cmake option ENABLE_LTO for link time optimization on Release builds. 2020-09-21 17:26:10 -04:00