mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Fix testing multiple arrange strategies
CURA-12169 Some items were still set from previous tryes, giving a final result that could have inconsistencies (e.g. objects over disallowed ares)
This commit is contained in:
parent
e19f5ee330
commit
01d03f7e21
1 changed files with 52 additions and 51 deletions
|
@ -57,6 +57,10 @@ class Nest2DArrange(Arranger):
|
||||||
if self._fixed_nodes is None:
|
if self._fixed_nodes is None:
|
||||||
self._fixed_nodes = []
|
self._fixed_nodes = []
|
||||||
|
|
||||||
|
strategies = [NfpConfig.Alignment.CENTER] * 3 + [NfpConfig.Alignment.BOTTOM_LEFT] * 3
|
||||||
|
found_solution_for_all = False
|
||||||
|
while not found_solution_for_all and len(strategies) > 0:
|
||||||
|
|
||||||
# Add all the items we want to arrange
|
# Add all the items we want to arrange
|
||||||
node_items = []
|
node_items = []
|
||||||
for node in self._nodes_to_arrange:
|
for node in self._nodes_to_arrange:
|
||||||
|
@ -108,9 +112,6 @@ class Nest2DArrange(Arranger):
|
||||||
item.markAsFixedInBin(0)
|
item.markAsFixedInBin(0)
|
||||||
node_items.append(item)
|
node_items.append(item)
|
||||||
|
|
||||||
strategies = [NfpConfig.Alignment.CENTER] * 3 + [NfpConfig.Alignment.BOTTOM_LEFT] * 3
|
|
||||||
found_solution_for_all = False
|
|
||||||
while not found_solution_for_all and len(strategies) > 0:
|
|
||||||
config = NfpConfig()
|
config = NfpConfig()
|
||||||
config.accuracy = 1.0
|
config.accuracy = 1.0
|
||||||
config.alignment = NfpConfig.Alignment.CENTER
|
config.alignment = NfpConfig.Alignment.CENTER
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue