|
|
|
@ -13,7 +13,7 @@ import { PromptStatus } from "../../Editor/PromptResult";
|
|
|
|
|
import { ComparePointFnGenerate } from "../../Geometry/GeUtils";
|
|
|
|
|
import { AppToaster } from "../../UI/Components/Toaster";
|
|
|
|
|
import { FuzzyFactory } from "../../csg/core/FuzzyFactory";
|
|
|
|
|
import { IsDoor } from "../HideSelect/HideSelectUtils";
|
|
|
|
|
import { IsDoor, IsDrawer } from "../HideSelect/HideSelectUtils";
|
|
|
|
|
|
|
|
|
|
export class ParseHandle implements Command
|
|
|
|
|
{
|
|
|
|
@ -21,9 +21,14 @@ export class ParseHandle implements Command
|
|
|
|
|
{
|
|
|
|
|
Log("注意:绘制的拉手五金名称必须包含\"拉手\"");
|
|
|
|
|
let res = await app.Editor.GetSelection({
|
|
|
|
|
Msg: "请选择需要分析拉手的门板:",
|
|
|
|
|
Msg: "请选择需要分析拉手的门板(抽屉):",
|
|
|
|
|
Filter: {
|
|
|
|
|
filterFunction: (o, e) => { return e && IsDoor(e); }
|
|
|
|
|
filterFunction: (o, e) =>
|
|
|
|
|
{
|
|
|
|
|
const isDoor = e && IsDoor(e);
|
|
|
|
|
const isDrawer = e && IsDrawer(e) && (e as Board).RelativeHandle?.length > 0;
|
|
|
|
|
return isDoor || isDrawer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (res.Status === PromptStatus.OK)
|
|
|
|
@ -74,7 +79,7 @@ export class ParseHandle implements Command
|
|
|
|
|
if (succeedCount)
|
|
|
|
|
{
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
message: `成功分析${succeedCount}个门板的拉手位置!(已经写入到板件备注!)`,
|
|
|
|
|
message: `成功分析${succeedCount}个门板(抽屉)的拉手位置!(已经写入到板件备注!)`,
|
|
|
|
|
timeout: 10000,
|
|
|
|
|
intent: Intent.SUCCESS,
|
|
|
|
|
});
|
|
|
|
@ -83,7 +88,7 @@ export class ParseHandle implements Command
|
|
|
|
|
if (emptyCount)
|
|
|
|
|
{
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
message: `有${emptyCount}个门板没有拉手!`,
|
|
|
|
|
message: `有${emptyCount}个门板(抽屉)没有拉手!`,
|
|
|
|
|
timeout: 10000,
|
|
|
|
|
intent: Intent.WARNING,
|
|
|
|
|
});
|
|
|
|
|