一键生成计轴时过滤已生成过计轴的区段

This commit is contained in:
joylink_zhaoerwei 2023-09-15 09:31:02 +08:00
parent c97af4fdd8
commit cd28b8e6f2

View File

@ -166,7 +166,12 @@ export class AxleCountingDraw extends GraphicDrawAssistant<
const sections = this.app.queryStore const sections = this.app.queryStore
.queryByType<Section>(Section.Type) .queryByType<Section>(Section.Type)
.filter((section) => { .filter((section) => {
return section.datas.sectionType == SectionType.Physical; return (
section.relationManage.getRelationsOfGraphicAndOtherType(
section,
AxleCounting.Type
).length < 2 && section.datas.sectionType == SectionType.Physical
);
}); });
sections.forEach((section) => { sections.forEach((section) => {