|
|
@ -4,7 +4,7 @@ import { app } from "../ApplicationServices/Application";
|
|
|
|
import { Entity } from "../DatabaseServices/Entity/Entity";
|
|
|
|
import { Entity } from "../DatabaseServices/Entity/Entity";
|
|
|
|
import { Command } from "../Editor/CommandMachine";
|
|
|
|
import { Command } from "../Editor/CommandMachine";
|
|
|
|
import { PromptStatus } from "../Editor/PromptResult";
|
|
|
|
import { PromptStatus } from "../Editor/PromptResult";
|
|
|
|
import { comparePoint } from '../Geometry/GeUtils';
|
|
|
|
import { comparePoint, GetBox } from '../Geometry/GeUtils';
|
|
|
|
import { HotCMD } from '../Hot/HotCommand';
|
|
|
|
import { HotCMD } from '../Hot/HotCommand';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -49,7 +49,7 @@ export class Command_PackageMove implements Command
|
|
|
|
for (let i = 0; i < ents.length; i++)
|
|
|
|
for (let i = 0; i < ents.length; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let en = ents[i];
|
|
|
|
let en = ents[i];
|
|
|
|
en.TempData = { i, b: en.BoundingBox, u: false };
|
|
|
|
en.TempData = { i, b: GetBox(en.DrawObject), u: false };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let fb = new Flatbush(ents.length);
|
|
|
|
let fb = new Flatbush(ents.length);
|
|
|
@ -65,13 +65,10 @@ export class Command_PackageMove implements Command
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let arr = [ents.pop()];
|
|
|
|
let arr = [ents.pop()];
|
|
|
|
arr[0].TempData.u = true;
|
|
|
|
arr[0].TempData.u = true;
|
|
|
|
let b = new Box3;
|
|
|
|
let b = (arr[0].TempData.b as Box3).clone();
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < arr.length; i++)
|
|
|
|
for (let i = 0; i < arr.length; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let e = arr[i];
|
|
|
|
|
|
|
|
b.union(e.TempData.b);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let ids = fb.search(b.min.getComponent(i1) - i1d, b.min.getComponent(i2) - i2d, b.max.getComponent(i1) + i1d, b.max.getComponent(i2) + i2d, id => oents[id].TempData.u === false);
|
|
|
|
let ids = fb.search(b.min.getComponent(i1) - i1d, b.min.getComponent(i2) - i2d, b.max.getComponent(i1) + i1d, b.max.getComponent(i2) + i2d, id => oents[id].TempData.u === false);
|
|
|
|
|
|
|
|
|
|
|
|
for (let id of ids)
|
|
|
|
for (let id of ids)
|
|
|
|