Skip to content

测量

new Measure()

实例化

  • 返回:

    • 实例化Measure对象
  • 详情:

    实例化Measure对象,可以调用测量模块中的方法

  • 示例:

js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )

const measure = new kapi.Measure()
console.log(measure)

get2DLength()

测量二维的长度

  • 返回:

    • 二维长度测量结果的返回信息
  • 详情:

    测量二维的长度

  • 示例:

js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )

const measure = new kapi.Measure()
const length2D = await measure.get2DLength()
console.log(length2D)

get2DArea()

测量二维的面积

  • 返回:

    • 二维面积测量结果的返回信息
  • 详情:

    测量二维的面积

  • 示例:

js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )

const measure = new kapi.Measure()
const area2D = await measure.get2DArea()
console.log(area2D)

get3DLength()

测量三维的长度

  • 返回:

    • 三维长度测量结果的返回信息
  • 详情:

    测量三维的长度

  • 示例:

js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )

const measure = new kapi.Measure()
const length3D = await measure.get3DLength()
console.log(length3D)

get3DArea()

测量三维的面积

  • 返回:

    • 三维面积测量结果的返回信息
  • 详情:

    测量三维的面积

  • 示例:

js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )

const measure = new kapi.Measure()
const area3D = await measure.get3DArea()
console.log(area3D)

getHeight()

测量高度

  • 返回:

    • 高度测量结果的返回信息
  • 详情:

    测量高度

  • 示例:

js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )

const measure = new kapi.Measure()
const height = await measure.getHeight()
console.log(height)

clear()

清空测量结果

  • 返回:

    • 清空测量结果后的返回信息
  • 详情:

    清空测量结果

  • 示例:

js
import KAPI from '@ibrucekong/kapi'
const kapi = await KAPI.build('Your Auth Token')
const scene = new kapi.Scene('kapi-container', { server: 'Your Service URL' } )

const measure = new kapi.Measure()
const cls = await measure.clear()
console.log(cls)
测量 has loaded