Skip to content

Commit c6feb42

Browse files
committed
Fix rg solution bin type id
1 parent d495fb2 commit c6feb42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rectangleguillotine/solution.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,14 @@ void Solution::append(
276276
bin.copies = copies;
277277
bin.first_cut_orientation = bin_old.first_cut_orientation;
278278
for (SolutionNode node: bin_old.nodes) {
279-
if (node.item_type_id >= 0)
279+
if (node.t == -4) {
280+
} else if (node.f == -1) {
281+
node.item_type_id = bin_type_id;
282+
} else if (node.item_type_id >= 0) {
280283
node.item_type_id = (item_type_ids.empty())?
281284
node.item_type_id:
282285
item_type_ids[node.item_type_id];
286+
}
283287
bin.nodes.push_back(node);
284288
}
285289
bins_.push_back(bin);

0 commit comments

Comments
 (0)