Skip to content

Function: frameFromGeom() ​

frameFromGeom(geom, pickWorld, confidence?): RefFrame | null

Defined in: packages/viewer-core/src/public/refframe/frame_math.ts:103

由参考几何 + 本次拾取点推出参考坐标系;退化(零向量 / 非有限数)返回 null。

pickWorld 之所以是必需参数:平面在 .fmbv 里不存 origin,面上一点只能由拾取点兼任 (设计稿 §4.1——曾考虑用面的包围盒中心,但斜平面的轴对齐包围盒中心根本不在面上, 实测偏离 0.866,与面本身尺寸同阶)。圆柱与直线也用它定「沿轴的哪一段」, 好让把手落在用户点的地方而不是轴的某个任意参考点上。

Parameters ​

geom ​

RefGeom

pickWorld ​

Vec3Tuple

confidence? ​

RefConfidence = "fitted"

Returns ​

RefFrame | null