Skip to content

Commit

Permalink
Merge pull request #30 from RyugaRyuzaki/develop
Browse files Browse the repository at this point in the history
add align level column
  • Loading branch information
RyugaRyuzaki authored Jun 14, 2024
2 parents ccb3a3a + fc1d435 commit a2d1b94
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/BimModel/src/DrawTool/src/Draw/DrawPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {BaseDraw} from "./BaseDraw";
import {IDrawType} from "@ModelingComponent/types";
import {LocationArc, LocationLine, LocationPoint} from "@BimModel/src/system";
import {
currentLevelSignal,
listLevelSignal,
modelingSignal,
modelStructureSignal,
tempElementSignal,
Expand Down Expand Up @@ -115,6 +117,7 @@ export class DrawPoint extends BaseDraw {
const currentElementIndex = Object.keys(
this.ProjectComponent.elements
).length;

switch (type) {
case "Structure Beam":
case "Structure Wall":
Expand All @@ -130,6 +133,15 @@ export class DrawPoint extends BaseDraw {
this.tempElement.attributes.Name = new IFC.IfcLabel(
`${type} ${currentElementIndex + 1}`
);
if (currentLevelSignal.value) {
const level =
listLevelSignal.value[currentLevelSignal.value.index + 1];
if (level) {
const height =
level.elevation - currentLevelSignal.value.elevation;
this.tempElement.height = height;
}
}
}
break;
default:
Expand Down

0 comments on commit a2d1b94

Please sign in to comment.