!1945 修复:一键布局代码错误

pull/1948/MERGE
林三 2 years ago committed by ChenX
parent d2d07eb0b2
commit dbaa95267d

@ -558,16 +558,14 @@ export class OneKeyLayout implements Command
return vpInfos;
};
private checkBoxOnY(firstBox: Box3Ext, box: Box3Ext, boxBoardMap: Map<Box3Ext, (Board | CompositeEntity | SweepSolid)[]>)
private checkBoxOnY(firstBox: Box3Ext, box: Box3Ext, boxBoardMap: Map<Box3Ext, Entity[]>)
{
if (firstBox.min.x > box.max.x || firstBox.max.x < box.min.x)
return false;
else
{
(boxBoardMap.get(box) as Entity[]).forEach((br) =>
{
(boxBoardMap.get(firstBox) as Entity[]).push(br);
});
for (let br of boxBoardMap.get(box))
boxBoardMap.get(firstBox).push(br);
firstBox.union(box);
boxBoardMap.delete(box);
return true;

Loading…
Cancel
Save