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.
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
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.
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.
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.
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.
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.
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.
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.
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