mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 21:57:23 +08:00
Merge pull request #8510 from Ultimaker/CURA-7754_add_disallowed_areas
Mark disallowed areas as disallowed areas
This commit is contained in:
commit
9f929298d7
@ -68,7 +68,7 @@ def findNodePlacement(nodes_to_arrange: List["SceneNode"], build_volume: "BuildV
|
|||||||
converted_points.append(Point(point[0] * factor, point[1] * factor))
|
converted_points.append(Point(point[0] * factor, point[1] * factor))
|
||||||
|
|
||||||
disallowed_area = Item(converted_points)
|
disallowed_area = Item(converted_points)
|
||||||
disallowed_area.markAsFixedInBin(0)
|
disallowed_area.markAsDisallowedAreaInBin(0)
|
||||||
node_items.append(disallowed_area)
|
node_items.append(disallowed_area)
|
||||||
num_disallowed_areas_added += 1
|
num_disallowed_areas_added += 1
|
||||||
|
|
||||||
@ -88,9 +88,8 @@ def findNodePlacement(nodes_to_arrange: List["SceneNode"], build_volume: "BuildV
|
|||||||
|
|
||||||
num_bins = nest(node_items, build_plate_bounding_box, 10000, config)
|
num_bins = nest(node_items, build_plate_bounding_box, 10000, config)
|
||||||
|
|
||||||
# Strip the disallowed areas from the results again
|
# Strip the fixed items (previously placed) and the disallowed areas from the results again.
|
||||||
if num_disallowed_areas_added != 0:
|
node_items = list(filter(lambda item: not item.isFixed(), node_items))
|
||||||
node_items = node_items[:-num_disallowed_areas_added]
|
|
||||||
|
|
||||||
found_solution_for_all = num_bins == 1
|
found_solution_for_all = num_bins == 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user