|
|
|
@ -91,7 +91,7 @@ export class Command_DrawHole implements Command
|
|
|
|
|
if (!helper._Walls.length)
|
|
|
|
|
{
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
message: "没有墙可以放置窗户!",
|
|
|
|
|
message: `没有墙可以放置${this._HoleIType === IHoleType.Door ? "门洞" : "窗户"}!`,
|
|
|
|
|
timeout: 5000,
|
|
|
|
|
intent: Intent.WARNING,
|
|
|
|
|
});
|
|
|
|
@ -221,6 +221,7 @@ export class Command_DrawHole implements Command
|
|
|
|
|
let pRes = await app.Editor.GetPoint({
|
|
|
|
|
Callback: UpdateHole,
|
|
|
|
|
Raycast: true,
|
|
|
|
|
Msg: `请输入放置的位置<H:${hole.Height}, L:${this.holeLength}, D:${this.offGround}>:`,
|
|
|
|
|
KeyWordList: [{ key: "H", msg: "高度" }, { key: "L", msg: "长度" }, { key: "D", msg: "离地" }],
|
|
|
|
|
RaycastPreExecFunc: () =>
|
|
|
|
|
{
|
|
|
|
@ -260,8 +261,7 @@ export class Command_DrawHole implements Command
|
|
|
|
|
else if (pRes.StringResult === "L")
|
|
|
|
|
{
|
|
|
|
|
let LRes = await app.Editor.GetDistance({ Msg: "请输入洞长度:", Default: this.holeLength });
|
|
|
|
|
if (LRes.Status === PromptStatus.Cancel) return;
|
|
|
|
|
else if (LRes.Status === PromptStatus.OK)
|
|
|
|
|
if (LRes.Status === PromptStatus.OK)
|
|
|
|
|
{
|
|
|
|
|
if (LRes.Distance > 0)
|
|
|
|
|
this.holeLength = LRes.Distance;
|
|
|
|
@ -473,7 +473,7 @@ export class Command_DrawHole implements Command
|
|
|
|
|
Callback: UpdateHole,
|
|
|
|
|
Raycast: true,
|
|
|
|
|
KeyWordList: [{ key: "H", msg: "高度" }, { key: "D", msg: "离地" }],
|
|
|
|
|
Msg: "请选择一个点,用来放置L型窗户",
|
|
|
|
|
Msg: `请选择一个点,用来放置L型窗户<H:${hole.Height}, D:${this.offGround}>:`,
|
|
|
|
|
RaycastPreExecFunc: () =>
|
|
|
|
|
{
|
|
|
|
|
//TODO:PERF 已知问题,圆弧墙的功能消耗了8ms
|
|
|
|
@ -716,7 +716,7 @@ export class Command_DrawHole implements Command
|
|
|
|
|
Callback: UpdateHole,
|
|
|
|
|
Raycast: true,
|
|
|
|
|
KeyWordList: [{ key: "H", msg: "高度" }, { key: "D", msg: "离地" }],
|
|
|
|
|
Msg: "请选择一个点,用来放置U型窗户",
|
|
|
|
|
Msg: `请选择一个点,用来放置U型窗户<H:${hole.Height}, D:${this.offGround}>:`,
|
|
|
|
|
RaycastPreExecFunc: () =>
|
|
|
|
|
{
|
|
|
|
|
//TODO:PERF 已知问题,圆弧墙的功能消耗了8ms
|
|
|
|
@ -776,8 +776,7 @@ export class Command_DrawHole implements Command
|
|
|
|
|
GetHoleHeight = async (hole: RoomHolePolyline) =>
|
|
|
|
|
{
|
|
|
|
|
let hRes = await app.Editor.GetDistance({ Msg: "请输入洞高度:", Default: hole.Height });
|
|
|
|
|
if (hRes.Status === PromptStatus.Cancel) return;
|
|
|
|
|
else if (hRes.Status === PromptStatus.OK)
|
|
|
|
|
if (hRes.Status === PromptStatus.OK)
|
|
|
|
|
{
|
|
|
|
|
if (hRes.Distance > 0)
|
|
|
|
|
this.holeHeight = hRes.Distance;
|
|
|
|
@ -788,8 +787,7 @@ export class Command_DrawHole implements Command
|
|
|
|
|
GetHoleoffGround = async () =>
|
|
|
|
|
{
|
|
|
|
|
let DRes = await app.Editor.GetDistance({ Msg: "请输入离地距离:", Default: this.offGround });
|
|
|
|
|
if (DRes.Status === PromptStatus.Cancel) return;
|
|
|
|
|
else if (DRes.Status === PromptStatus.OK)
|
|
|
|
|
if (DRes.Status === PromptStatus.OK)
|
|
|
|
|
{
|
|
|
|
|
if (DRes.Distance >= 0)
|
|
|
|
|
this.offGround = DRes.Distance;
|
|
|
|
|