|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import { Intersection, Object3D, Raycaster, Vector3 } from "three";
|
|
|
|
|
import { begin, end } from "xaop";
|
|
|
|
|
import { app } from "../ApplicationServices/Application";
|
|
|
|
|
import { arrayLast } from "../Common/ArrayExt";
|
|
|
|
|
import { Sleep } from "../Common/Sleep";
|
|
|
|
|
import { FixedNotZero, GetEntity } from "../Common/Utils";
|
|
|
|
|
import { CommandHistoryRecord } from "../DatabaseServices/CommandHistoryRecord";
|
|
|
|
|
import { AlignedDimension } from "../DatabaseServices/Dimension/AlignedDimension";
|
|
|
|
@ -87,8 +87,9 @@ export class BoardMoveTool
|
|
|
|
|
app.Viewer.PreViewer.UpdateScreen();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private HitBoard(br: Board)
|
|
|
|
|
private async HitBoard(br: Board)
|
|
|
|
|
{
|
|
|
|
|
await Sleep(1);
|
|
|
|
|
let brOCS = br.OCS;
|
|
|
|
|
let brRot = brOCS.clone().setPosition(0, 0, 0);
|
|
|
|
|
let brOCSInv = br.OCSInv;
|
|
|
|
@ -96,10 +97,27 @@ export class BoardMoveTool
|
|
|
|
|
let brNormal2 = brNormal.clone().negate();
|
|
|
|
|
|
|
|
|
|
let brsObject: Object3D[] = [];
|
|
|
|
|
let start = performance.now();
|
|
|
|
|
let i = 0;
|
|
|
|
|
for (let obj of app.Viewer.Scene.children)
|
|
|
|
|
{
|
|
|
|
|
if (obj.visible)
|
|
|
|
|
{
|
|
|
|
|
i++;
|
|
|
|
|
if (i > 50)
|
|
|
|
|
{
|
|
|
|
|
let now = performance.now();
|
|
|
|
|
let r = now - start;
|
|
|
|
|
if (now - start > 15)
|
|
|
|
|
{
|
|
|
|
|
await Sleep(1);
|
|
|
|
|
start = now;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
i -= (16 - r) * 3;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let ent = GetEntity(obj);
|
|
|
|
|
if (ent instanceof Board && ent !== br)
|
|
|
|
|
{
|
|
|
|
|