File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
viewer/src/components/display/dimensions Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ export class IfcDimensionLine {
215
215
}
216
216
217
217
private getTextContent ( ) {
218
- return `${ this . length / IfcDimensionLine . scale } ${ IfcDimensionLine . units } ` ;
218
+ return `${ this . length * IfcDimensionLine . scale } ${ IfcDimensionLine . units } ` ;
219
219
}
220
220
221
221
private newBoundingBox ( ) {
Original file line number Diff line number Diff line change @@ -197,6 +197,17 @@ export class IfcDimensions extends IfcComponent {
197
197
this . currentDimension = undefined ;
198
198
}
199
199
200
+ setDimensionUnit ( units : string ) {
201
+ if ( ! units ) return ;
202
+ if ( units === "mm" ) {
203
+ IfcDimensionLine . units = units ;
204
+ IfcDimensionLine . scale = 1000 ;
205
+ } else if ( units === "m" ) {
206
+ IfcDimensionLine . units = units ;
207
+ IfcDimensionLine . scale = 1 ;
208
+ }
209
+ }
210
+
200
211
private drawStart ( ) {
201
212
this . dragging = true ;
202
213
const intersects = this . context . castRayIfc ( ) ;
You can’t perform that action at this time.
0 commit comments