Commit graph

6967 commits

Author SHA1 Message Date
Ghostkeeper
ae9f2b4ba9
Catch TopologicalError when calculating convex hull intersection
Apparently this can happen. I don't know what shapes this happens with though. I'm guessing it's got something to do with degenerate shapes.

Fixes Sentry issue CURA-DZ.
2020-03-26 14:15:38 +01:00
Ghostkeeper
0150f37937
Merge branch 'master' into xray_in_solid_view 2020-03-24 21:45:48 +01:00
Remco Burema
c20b2c6ee0
Merge pull request #7211 from Ultimaker/CURA-7150_proper_http_request_headers
CURA-7150_proper_http_request_headers
2020-03-24 11:25:07 +01:00
Ghostkeeper
566af8be2e
Don't crash when importing definition files as materials
Reproduction steps:
* In the Material Manager, click on 'Import material'.
* Change the file type in the file dialogue to 'All files'.
* Select any .def.json file, for example from Cura's own resources/definitions folder.

Previously this crashed the application. Now it shows the user an error message instead.

Fixes Sentry error CURA-D4.
2020-03-23 09:06:20 +01:00
fieldOfView
d00ec619f5 Remove unused imports 2020-03-22 18:58:16 +01:00
fieldOfView
138dbddb10 Restore the SettingDefinition relations without killing a puppy 2020-03-22 18:51:43 +01:00
fieldOfView
6e09e9821f Show support settings when support meshes are present in the scene 2020-03-22 18:23:32 +01:00
Ghostkeeper
c7e6553dbf
Disallow printers larger than 2km
To do this, I'm giving more power to the NumericTextFieldWithUnit QML element, to allow an arbitrary minimum and maximum. Enforcing this minimum and maximum is fairly simple with a JavaScript hook. This hook is necessary because the DoubleValidator allows intermediary values which defeats the purpose, essentially allowing any number as long as it has the correct number of digits.
Printers larger than 2km would start to give overflow errors in its X and Y coordinates. Z is okay up to about 9 billion kilometres in theory, since we don't need to do any squaring math on those coordinates afaik. In practice I'm doing this because at very high values the Arranger also gives errors because Numpy can't handle those extremely big arrays (since the arranger creates a 2mm grid).

Fixes Sentry issue CURA-CB.
2020-03-20 11:16:16 +01:00
Jaime van Kessel
a26de5ce79
Gracefully handle the sitation if the changelog was not found
CURA-4R
2020-03-18 11:17:23 +01:00
Nino van Hooff
04af203bb4 Revert "Ensure the default Trust violation handler is always called"
This debug change should never have been committed.

CURA-7016
2020-03-17 13:51:39 +01:00
Nino van Hooff
656c60452c
Merge pull request #7182 from Ultimaker/CURA-7016
[CURA-7016] Add actual public key instead of dummy.
2020-03-13 10:50:21 +01:00
Jaime van Kessel
2fc8c0e5b5
Fix variant from extruder not restoring correctly 2020-03-13 10:37:08 +01:00
Nino van Hooff
96ed85f9c0 Move UltimakerCloudAuthentication and UltimakerCloudScope
...to their own module
Fixes an import error where UltimakerCloudScope was used my both the
Toolbox and CuraDrive plugins

CURA-7150
2020-03-12 17:48:54 +01:00
Ghostkeeper
548c02772d
Gracefully fail if the profile can't be set currently
Discovered during work on CURA-7283.
2020-03-06 13:40:28 +01:00
Nino van Hooff
96c349e8bd Ensure the default Trust violation handler is always called
includes documentation improvements

CURA-7016
2020-03-03 15:58:05 +01:00
Jaime van Kessel
7c70ace8f0
Prevent crash when the start_idx could not be found
CURA-59
2020-02-28 17:06:57 +01:00
Jaime van Kessel
670a106957
Be a bit more gracefull when adding a machine failed
This seems to happen for people that manually add machines to cura
but mess something up when copying the files.

CURA-3X
2020-02-28 17:03:38 +01:00
Jaime van Kessel
27c6cb4c1e
Prevent max recursion for convex hull calculation
fixes CURA-3W
2020-02-28 16:31:28 +01:00
Jaime van Kessel
f4d1d5d936
Add a check that fixes wrong variants upon setting an active machine 2020-02-28 15:06:11 +01:00
Jaime van Kessel
0ccf457314
Split up an overly long call into shorter readable bits 2020-02-28 14:25:50 +01:00
Jaime van Kessel
e4930d3c3b
Add missing typing 2020-02-28 13:53:43 +01:00
Tim Kuipers
fc4c66b62a show xray errors in solid view 2020-02-27 16:41:13 +01:00
Ghostkeeper
a1438e91d0
Merge branch '4.5'
Conflicts:
	cura_app.py -> Due to moving some imports around.
2020-02-25 12:07:47 +01:00
Tim Kuipers
70a95e68d6
Merge pull request #7122 from Ultimaker/CURA-7223/remove_crashHandler
CURA-7223/Removed the user input from the CrashHandler as we are not using it f…
2020-02-24 22:22:37 +01:00
Jaime van Kessel
9c0e6f9338
Apply suggestions from code review
Codestyle!
2020-02-24 16:57:37 +01:00
Nino van Hooff
94e9753b6c Update cura/CrashHandler.py
Import Any and re-order if-statements for efficiency

CURA-7245
2020-02-24 16:26:32 +01:00
Nino van Hooff
2cd6149ef0
Update cura/CrashHandler.py
Add typing to pruneSensitiveData

Co-Authored-By: Jaime van Kessel <nallath@gmail.com>
2020-02-24 16:14:12 +01:00
Nino van Hooff
62dfadecdf Prune all sensitive data before sending it to Sentry
CURA-7245
2020-02-24 15:27:17 +01:00
Jaime van Kessel
238dd733ea
Merge branch '4.5' of github.com:Ultimaker/Cura 2020-02-17 17:01:38 +01:00
Ghostkeeper
e52dc56a64
Prevent crashing on PermissionError when importing http.server (#7095)
* Fix PermissionError when importing http.server

Instead of crashing, now it'll just not start the server. This means that you won't be able to receive the response from the log-in so you won't be able to log in. The browser gives an error that it can't find the page on localhost. But at least it doesn't crash.

Fixes crash CURA-3Q.

* Log an error when the HTTP server can't be started

Contributes to crash CURA-3Q.

* Indicate that types are optional

Attempt to fix the typing issue with MyPy. I can't run this locally so the CI server will have to tell me if this fixed it.

Contributes to Sentry issue CURA-3Q.
2020-02-17 17:01:11 +01:00
Dimitriovski
a4a076ea5c
Removed the user input from the CrashHandler as we are not using it for sending that data to Sentry
CURA-7223
2020-02-17 12:02:52 +01:00
Jaime van Kessel
769fc8fd37
Fix crashing when material could not be found
See CURA-3M in sentry. It most commonly happens with the anycubic,
since it had some weird stuff with it suddenly supporting materials.

This change will make it so that no crash happens. Old profiles will still have
an empty material. This isn't really an issue, since the interface will mark this
as an error (prompting users to switch).
2020-02-17 10:57:24 +01:00
Ghostkeeper
d9ddb438f8
Merge branch '4.5' 2020-02-10 11:36:07 +01:00
Ghostkeeper
6f707f3149
Bump SDK version number of Cura 4.5 to 7.1
We've added new things to our API. This allows plug-in developers to use them.

Contributes to issue CURA-7205.
2020-02-10 10:45:07 +01:00
Lipu Fei
b03f666bf5 WIP: Make it work with Python 3.7 packaing 2020-02-07 23:14:47 +01:00
Jaime van Kessel
9e94875733
Merge branch 'feature_value_from_container_function' of https://github.com/fieldOfView/Cura 2020-02-04 16:47:45 +01:00
Jaime van Kessel
0520f9a4bc
Ensure that setActiveExtruderCount correctly emits the extruderEnablechanged signal 2020-02-04 16:46:35 +01:00
konskarm
35903e7dd3
Merge pull request #6988 from Ultimaker/CURA-7071
CURA-7071/Added option to redirect to Web MP from Cura MP
2020-02-04 11:02:30 +01:00
Ghostkeeper
66e2ca6aa5
Merge branch 'CURA-7099_sync_sideloaded_plugins' 2020-02-03 16:12:56 +01:00
Jaime van Kessel
5e70d2c122
Merge branch 'WH_unzip_backups_security' of github.com:Ultimaker/Cura 2020-01-31 16:32:53 +01:00
Remco Burema
a03a2885b6
Check if main config file is in backup zip.
Prevent unpacking of possibly spoofed backups (as a last line of defence if other security has failed).
Zips with partially known content are a lot harder to spoof.
Thanks WhiteHats :-)
2020-01-31 16:26:30 +01:00
Jaime van Kessel
c167481e60
Add missing ignore 2020-01-31 16:24:46 +01:00
Jaime van Kessel
1269de744f
Use state in AuthorizationService
It's a paranoid safety precaution, but beter safe than sorry.
Reported by WhiteHats; F-1.1.1
2020-01-31 16:11:59 +01:00
Jaime van Kessel
ca25ec3dbc
Increase size of the verificationCode
It's mostly a theoretical problem, but 16 could theoretically be brute
forced. Bumping it up to 32 won't break anything, but it does make it
exteremely unlikely that it gets broken
2020-01-31 15:00:03 +01:00
fieldOfView
5f67331bac Fix "typo" caused by cleanup before push 2020-01-30 18:23:25 +01:00
Jaime van Kessel
e79b3beed1
Remove unused URL
CURA-7071
2020-01-30 09:42:23 +01:00
Nino van Hooff
8c250cfbbc Process review comments
CURA-7099
2020-01-29 11:28:29 +01:00
fieldOfView
5a4661db98 Add valueFromContainer() and extruderValueFromContainer() functions 2020-01-28 16:36:06 +01:00
Nino van Hooff
d4eb463f2d Always subscribe to packages after installing them
Now that we subscribe for all situations where a package is installed,
it makes sense to watch package installs and create a 1:1 relation that
way. Prevents code duplication.

CURA-7099
2020-01-28 13:08:57 +01:00
Ghostkeeper
ad2b8f140e
Make Marketplace link configurable from the build system
This way you could set it to marketplace-staging if you like.

Contributes to issue CURA-7071.
2020-01-28 11:52:46 +01:00