!2347 功能:抽屉支持解析拉手位置

pull/2350/head
黄诗津 1 year ago committed by ChenX
parent 241e843aab
commit 15cd59ef31

@ -652,6 +652,7 @@ export class DrawDrawrer implements Command
if (br.BoundingBox.intersectsBox(handleBox))
{
br.RelativeHardware.push(...hardwares);
br.RelativeHandle.push(...hardwares); //这里用新增的拉手去关联,因为不知道旧的是用来干什么的,就不删除了
ens.forEach(e => e instanceof HardwareCompositeEntity && e.RelevanceBoards.push(br.Id));
}
}

@ -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,
});

@ -906,7 +906,7 @@ export const CommandList: ICommand[] = [
defaultCustom: CommandNames.ParseHandle,
command: CommandNames.ParseHandle,
type: "板件编辑",
chName: "将拉手位置写入到门板备注",
chName: "将拉手位置写入到门板(抽屉)备注",
chDes: "报表可写出",
},
{

Loading…
Cancel
Save