Use integer positions for fixed items too

Pynest2d requires it. It seems the SIP version we're using is lenient for this, but newer SIP versions are not.

Fixes #10801.
This commit is contained in:
Ghostkeeper 2021-11-18 11:44:09 +01:00
parent e0e227404f
commit d6f8984cf0
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -91,7 +91,7 @@ def findNodePlacement(nodes_to_arrange: List["SceneNode"], build_volume: "BuildV
if hull_polygon is not None and hull_polygon.getPoints() is not None and len(hull_polygon.getPoints()) > 2: # numpy array has to be explicitly checked against None if hull_polygon is not None and hull_polygon.getPoints() is not None and len(hull_polygon.getPoints()) > 2: # numpy array has to be explicitly checked against None
for point in hull_polygon.getPoints(): for point in hull_polygon.getPoints():
converted_points.append(Point(point[0] * factor, point[1] * factor)) converted_points.append(Point(int(point[0] * factor), int(point[1] * factor)))
item = Item(converted_points) item = Item(converted_points)
item.markAsFixedInBin(0) item.markAsFixedInBin(0)
node_items.append(item) node_items.append(item)