152 Commits

Author SHA1 Message Date
Jaime van Kessel
90fae7ddb4
Fix crash when duplicating a model when in one at a time mode
CURA-9647
2022-09-16 13:28:40 +02:00
digitalfrost
bb0870008e CuraSceneController.py : Fix problem with log message and use f-string
- Correct log message (we want to log the "selected" build plate)
- Use f-string and debug method for Logger instead of "Old Style" string formatting.
2022-08-24 20:22:20 +02:00
Jelle Spijker
4abdd675f6
Merge branch 'master' into qt6_beyond_the_splash 2022-04-08 10:26:12 +02:00
Ghostkeeper
855eaec81c
Scale convex hull only by X/Y shrinkage, and handle 0% gracefully
Only the X/Y shrinkage influences the convex hull collision area. Not the Z, nor the parent setting.

Also, don't scale the collision area to 0. This value is not allowed by the setting system, so it'd indicate an error when slicing, but before slicing the convex hull gets calculated which results in degenerate polygons. Don't do that. Instead, we'll just let it pretend the scale factor is 1.

Contributes to issue CURA-9091.
2022-04-07 14:17:56 +02:00
p.kuiper
0a8ef5162e Removed the rather hacky implementation of the shrinkage factor averaging. Issues with dual extrusion were the second extruder is not used should solved in a different way.
Relates to PP-77
2022-04-06 13:28:55 +02:00
p.kuiper
733447a2dd Removed the settings: "material_shrinkage_percentage" and update code that was using this parameter.
material_shrinkage_percentage_xy and material_shrinkage_percentage_z cannot depend on material_shrinkage_percentage otherwise their resolve function will not execute properly.
I noticed that the shrinkage factors do not get the correct value if a wrong nozzle is chosen for a material. However, in that case the slicer will also not slice, so in practice this is not an issue

Relates to PP-77
2022-04-01 13:00:41 +02:00
Jaime van Kessel
96444dbc09 Use correct keyboard enums 2022-03-31 13:54:24 +02:00
Remco Burema
abe7c1bf7f
Search/replace Qt5->Qt6.
part of upgrading Qt to v6.2: CURA-8591
2021-12-28 14:46:02 +01:00
Remco Burema
58a5323709
Merge pull request #9884 from Ultimaker/CURA-7873_fix_positioning_merged_meshes
Fix positioning of merged transformed meshes
2021-06-08 12:37:34 +02:00
Ghostkeeper
8e12d49160
Merge branch 'master' of github.com:Ultimaker/Cura 2021-05-27 15:21:38 +02:00
Ghostkeeper
7eba38b286
Check if child bounding box is None before checking if it's degenerate.
Contributes to issue CURA-7873.
2021-05-21 13:53:55 +02:00
Ghostkeeper
6eeb135672
Fix calculating AABBs if group nodes are involved
The position of the group node should in theory never be included.
We'll return that position only if there is no mesh data and all children have no AABB either. In that case we'll return a degenerate AABB so that handling code has something to work with. But then also make sure that those degenerate AABBs are ignored if we want to get the AABB of a parent node.

Contributes to issue CURA-7873.
2021-05-21 13:30:53 +02:00
Ghostkeeper
d4fa1cee45
Fix copying MIME type if scene nodes are copied
We're not doing this in the nicest way possible...

Contributes to issue CURA-8232.
2021-05-18 11:07:02 +02:00
Remco Burema
d3ec1d7d28
Cache wasn't valid due to a reference being stored, not a copy.
paer of CURA-7440
2020-10-09 13:39:53 +02:00
Ghostkeeper
765004cd68
Take node groups into account when computing the centre of the mesh group
These groups were not considered because they are not sliceable. Their children are sliceable, so I could just use a DepthFirstIterator. However their group computes the AABB correctly also, so taking the AABB of the group is more efficient.

Contributes to issue CURA-7118.
2020-09-08 17:54:09 +02:00
Ghostkeeper
d3e5f9ec93
Don't re-scale convex hulls for groups
The convex hulls for groups are already constructed from the convex hull of the convex hulls of all of their children. Since the children's convex hulls are already scaled, we don't want to scale it again for the group.

Contributes to issue CURA-7118.
2020-09-08 17:45:38 +02:00
Ghostkeeper
59bf1c10af
Account for the fact that global_stack may be empty
You should not have any models in your scene then though. But oh well. It also fixes the typing.

Contributes to issue CURA-7118.
2020-09-02 03:21:11 +02:00
Ghostkeeper
323be4deff
Fix updating the 2D convex hull
This comes at some performance cost, sadly. This is necessary because the convex hull of every node may change if the transformation of any other node changes, since that transformation may adjust the total bounding box of the mesh group.

Contributes to issue CURA-7118.
2020-09-02 03:09:41 +02:00
Ghostkeeper
f613a54b79
Compute centre of current mesh group
This is either the centre of the bounding box around all printable nodes in the scene, or the centre of the bounding box of the most-ancestral node that is not yet the scene root itself in one-at-a-time mode.

Contributes to issue CURA-7118.
2020-09-02 02:43:43 +02:00
Ghostkeeper
bc0ac0f2a0
Only scale convex hull if there is a non-1 scaling factor
This will save some processing power for the very common case where there is no scaling factor.

Contributes to issue CURA-7118.
2020-09-02 02:10:19 +02:00
Ghostkeeper
a6707217c7
Get scale factor from global stack
This is the one that's actually used by CuraEngine. If I get it per-object, the material profile overrides it.

Contributes to issue CURA-7118.
2020-09-02 02:08:18 +02:00
Ghostkeeper
af03bc8f24
Adjust collision area based on shrinkage compensation ratio
So now if the model is grown due to shrinkage compensation, its collision area will also grow. This prevents objects adjacent to each other from hitting each other.

Contributes to issue CURA-7118.
2020-09-02 00:51:58 +02:00
Jaime van Kessel
ccd9a17be4
Remove normals for ConvexHullNode
They are rendered flat, so no need to store the normals

CURA-7106
2020-06-30 13:22:45 +02:00
Jaime van Kessel
03e66beafd
Re-use some render batches
This prevents us from having to re-create them everytime

CURA-7106
2020-06-23 17:12:47 +02:00
Jaime van Kessel
b0ed47daf1
Don't copy transformations if it's not needed
CURA=7106
2020-06-23 16:24:34 +02:00
Jaime van Kessel
d897299b31
Simplify recomputeConvexHull code
CURA-7106
2020-06-23 12:55:13 +02:00
Jaime van Kessel
1900b0841a
Use cheaper convexhull function when not using raft
CURA-7106
2020-06-23 12:03:15 +02:00
Jaime van Kessel
f00e3f7363
Remove useless code
CURA-7106
2020-06-23 09:21:24 +02:00
Jaime van Kessel
570efc8310
Remove unneeded checks in convex hull node
CURA-7106
2020-06-22 17:18:22 +02:00
Ghostkeeper
f8a88642c2
Don't crash when failing to create Toolbox.qml dialogue
Basically we should never be raising the master Exception class, really.
The enclosing class has error handling in case this returns None already, so this fix is easy.

Contributes to Sentry issue CURA-Y5.
2020-06-18 14:53:18 +02:00
fieldOfView
c34162a2ba Merge branch 'master' into feature_support_meshes_present
# Conflicts:
#	cura/Scene/CuraSceneController.py
#	cura/Scene/CuraSceneNode.py
2020-06-04 10:27:11 +02:00
Ghostkeeper
0e4830e6ef
Don't use deprecated extruders property
Done during Turbo Testing and Tooling.
2020-05-29 18:10:59 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Nino van Hooff
58ffc9dcae Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	cura/API/__init__.py
#	cura/Settings/CuraContainerRegistry.py
#	cura/Settings/ExtruderManager.py
#	plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
#	plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py
#	plugins/UM3NetworkPrinting/src/Cloud/ToolPathUploader.py
#	plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py
2020-05-28 17:31:24 +02:00
Nino van Hooff
c2c96faf5f Convert remaining doxygen to rst 2020-05-28 17:13:44 +02:00
Ghostkeeper
edf7fdad75
Check first if we have valid vertex data
The convex hull calculation may fail. If it does, we want to just tomit the convex hull shadow, rather than crash.

Fixes Sentry issue CURA-ST.
2020-05-25 17:20:39 +02: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
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
e74f049142
Fix bunch of issues found by pylint 2020-01-10 16:37:46 +01:00
Jaime van Kessel
81b33b8649
Add some missing typing 2020-01-10 14:58:53 +01:00
Jaime van Kessel
5da77472e7
Add some timers to sceneChanged 2020-01-03 10:17:54 +01:00
Jaime van Kessel
1b80ec8fff
Fix incorrect casing
Minor issue and I didn't want to send it back to todo *again* because of it.

CURA-6522
2019-12-10 13:14:54 +01:00
Nino van Hooff
f4c68f4e71 Fix two mypy warnings
CURA-6522
2019-12-06 11:47:07 +01:00
Nino van Hooff
2d8a415a69 Use the printing area (hull + adhesion for one-at-a-time) instead of
convex hull for build volume collision detection. The convex hull is
not suitable for this purpose because for one-at-a-time it includes the
machine head polygon, which should be allowed to travel outside the
build volume

CURA-6522
2019-12-06 11:08:55 +01:00
Nino van Hooff
fc060f7724 Do not show any object shadows in all_at_once mode.
Also DRYed up the one_at_a_time check

CURA-6522
2019-12-04 15:33:31 +01:00
Jaime van Kessel
50d72692d8
Merge branch 'master' of github.com:Ultimaker/Cura into CURA-6522_one_at_a_time_overlapping_build_area 2019-11-20 16:48:00 +01:00
Nino van Hooff
558ed4b1e8 Change shadows on buildplate for one-at-a-time printing
Inner: adhesion area
Outer: full head

In my opinion this allows the user to more easily see whether this
object can be printed after another object.
2019-11-12 12:56:07 +01:00
Lipu Fei
896b73f8b3 Fix typing 2019-11-11 08:57:34 +01:00