plane.fromNormal
The plane through a point with a given normal and a deterministic x axis.
Usage
Plane.fromNormal(origin: Point3, normal: Vector3): Plane | nullParameters
originPoint3The plane’s origin. Required. In model.
normalVector3The normal (z axis); any non-zero length. Required. In model.
Returns
A plane with unit axes and zAxis along normal; null when normal has no direction (zero length or not finite).
Guarantees
- the axes are orthonormal and right-handed (Vector3.dot of each pair ≈ 0, Vector3.length of each ≈ 1, Vector3.cross(xAxis, yAxis) ≈ zAxis)
- zAxis points along normal (Vector3.angleRad(zAxis, normal) ≈ 0)
- the same normal always gives the same axes (deep equality of two calls)
- The same result on every machine.
Use instead
plane.fromFrame: the x axis direction matters, e.g. where an arc starts
Example
Plane.fromNormal(Point3.origin, Vector3.of(0, 0, 2)).zAxis // → { x: 0, y: 0, z: 1 }
Plane.fromNormal(Point3.origin, Vector3.zero) // → null