|
|
|
@ -19,6 +19,7 @@ import { PromptStatus } from "../../../Editor/PromptResult";
|
|
|
|
|
import { ParsePlaceEntitys } from "../../../Editor/TranstrolControl/ParsePlaceEntitys";
|
|
|
|
|
import { ParsePlacePos, ParsePlacePosWithTemplate, ParsePlacePosWithTemplate2 } from "../../../Editor/TranstrolControl/ParsePlacePos";
|
|
|
|
|
import { userConfig } from "../../../Editor/UserConfig";
|
|
|
|
|
import { CoordinateSystem } from "../../../Geometry/CoordinateSystem";
|
|
|
|
|
import { ZeroVec, equaln, equalv3 } from "../../../Geometry/GeUtils";
|
|
|
|
|
import { DownPanelStore } from "../../Store/DownPanelStore";
|
|
|
|
|
import { IGetRoomInfo } from "./GetRoomCabName";
|
|
|
|
@ -164,8 +165,9 @@ export async function InsertTemplateByBasePoint(template: TemplateRecord, roomIn
|
|
|
|
|
let ptRes = await app.Editor.GetPoint({
|
|
|
|
|
Msg: "点取位置",
|
|
|
|
|
KeyWordList: [
|
|
|
|
|
{ key: "S", msg: "插入空间" },
|
|
|
|
|
// { key: "S", msg: "插入空间" },
|
|
|
|
|
{ key: "B", msg: "基点" },
|
|
|
|
|
{ key: "T", msg: "UCS坐标系" },
|
|
|
|
|
...keys
|
|
|
|
|
],
|
|
|
|
|
AllowNone: true,
|
|
|
|
@ -189,6 +191,13 @@ export async function InsertTemplateByBasePoint(template: TemplateRecord, roomIn
|
|
|
|
|
baseP.applyMatrix4(parse.PlaceEntity.OCSInv);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (ptRes.StringResult === "T")//UCS
|
|
|
|
|
{
|
|
|
|
|
let mtx = app.Editor.UCSMatrix;
|
|
|
|
|
let cs = new CoordinateSystem().CopyForm(mtx);
|
|
|
|
|
mtx.makeBasis(cs.XAxis, cs.ZAxis.clone().negate(), cs.YAxis);
|
|
|
|
|
parse.PlaceEntity.ApplyMatrix(parse.PlaceEntity.OCSInv.premultiply(mtx));
|
|
|
|
|
}
|
|
|
|
|
else if (ptRes.StringResult === "1" || ptRes.StringResult === "2" || ptRes.StringResult === "3")
|
|
|
|
|
{
|
|
|
|
|
parseType = parseInt(ptRes.StringResult) - 1;
|
|
|
|
|