gemini-viewer-examples icon indicating copy to clipboard operation
gemini-viewer-examples copied to clipboard

Change Measurement Unit

Open iFieldSmart-Tech opened this issue 1 year ago • 1 comments

Hi, we tried a lot but not sure how we can change the unit of measurement from meters to feet and inches. Can somebody please help? Has anybody been able to successfully change the unit of measurement? Thank you.

iFieldSmart-Tech avatar Dec 06 '24 06:12 iFieldSmart-Tech

Setting a display unit is not implemented yet! With that said, what we see is always the unit from data. Currently, if we want to display feet, etc. one workaround is to change the matrix when load a model().

const modelCfg: ModelConfig = {
    modelId: "id_0",
    name: "sample",
    src: "http://www.abc.com/sample.dxf",
    matrix: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
}

Suppose the data is in meter, we need to change the matrix, so values scale to feet.

yanzexuan1 avatar Dec 09 '24 07:12 yanzexuan1