修复:Array在布局状态下可用

pull/1482/head
ChenX 3 years ago
parent 3a22f4153d
commit 0ee1935027

@ -1,22 +1,23 @@
import { Box3, Matrix4, Vector3, MathUtils, Vector2 } from 'three'; import { Box3, MathUtils, Matrix4, Vector2, Vector3 } from 'three';
import { observable } from '../../node_modules/mobx'; import { observable } from '../../node_modules/mobx';
import { app } from '../ApplicationServices/Application'; import { app } from '../ApplicationServices/Application';
import { Draw } from '../Common/Append2CurSpace';
import { CheckObjectType, CheckoutValid } from '../Common/CheckoutVaildValue'; import { CheckObjectType, CheckoutValid } from '../Common/CheckoutVaildValue';
import { DataAdapter } from '../Common/DataAdapter'; import { DataAdapter } from '../Common/DataAdapter';
import { Singleton } from '../Common/Singleton'; import { Singleton } from '../Common/Singleton';
import { FixedNotZero } from '../Common/Utils';
import { Hole } from '../DatabaseServices/3DSolid/Hole';
import { Entity } from '../DatabaseServices/Entity/Entity'; import { Entity } from '../DatabaseServices/Entity/Entity';
import { Polyline } from '../DatabaseServices/Entity/Polyline'; import { Polyline } from '../DatabaseServices/Entity/Polyline';
import { Command } from '../Editor/CommandMachine'; import { Command } from '../Editor/CommandMachine';
import { JigUtils } from '../Editor/JigUtils'; import { JigUtils } from '../Editor/JigUtils';
import { PromptStatus } from '../Editor/PromptResult'; import { PromptStatus } from '../Editor/PromptResult';
import { SelectSet } from '../Editor/SelectSet'; import { SelectSet } from '../Editor/SelectSet';
import { MoveMatrix, rotatePoint, AsVector2 } from '../Geometry/GeUtils'; import { AsVector2, MoveMatrix, rotatePoint } from '../Geometry/GeUtils';
import { ArrayModal } from '../UI/Components/Modal/ArrayModal'; import { ArrayModal } from '../UI/Components/Modal/ArrayModal';
import { ModalPosition, ModalState } from '../UI/Components/Modal/ModalInterface'; import { ModalPosition, ModalState } from '../UI/Components/Modal/ModalInterface';
import { AppToaster } from '../UI/Components/Toaster'; import { AppToaster } from '../UI/Components/Toaster';
import { IBaseOption, IUiOption } from '../UI/Store/BoardInterface'; import { IBaseOption, IUiOption } from '../UI/Store/BoardInterface';
import { Hole } from '../DatabaseServices/3DSolid/Hole';
import { FixedNotZero } from '../Common/Utils';
export enum ArrayType export enum ArrayType
{ {
@ -387,7 +388,7 @@ function recArray(ss: SelectSet, rowNum: number, colNum: number, rowOffset: numb
{ {
let e = en.Clone(); let e = en.Clone();
e.ApplyMatrix(moveMat); e.ApplyMatrix(moveMat);
app.Database.ModelSpace.Append(e); Draw(e);
} }
} }
} }
@ -414,7 +415,7 @@ function CirArray(ss: SelectSet, ptRes: Vector3, itemTotal: number, betweenAngle
newEnt.ApplyMatrix(moveMatInv); newEnt.ApplyMatrix(moveMatInv);
newEnt.ApplyMatrix(roMat); newEnt.ApplyMatrix(roMat);
newEnt.ApplyMatrix(moveMat); newEnt.ApplyMatrix(moveMat);
app.Database.ModelSpace.Append(newEnt); Draw(newEnt);
} }
} }
} }

@ -0,0 +1,7 @@
import { app } from "../ApplicationServices/Application";
import { Entity } from "../DatabaseServices/Entity/Entity";
export function Draw(en: Entity)
{
app.LayoutTool.CurrentSpace.Append(en);
}
Loading…
Cancel
Save