PlaneLike
PlaneLike = [
number,number,number,number] |Plane| [Point3Like,Vector3Like]
Any value that can be interpreted as a plane.
Many API methods accept a PlaneLike so you can pass
whichever representation is most convenient:
[a, b, c, d]— the four coefficients of the plane equationax + by + cz + d = 0[point, normal]— a point on the plane and its normal vector (each as aPoint3Like/Vector3Like)- A
Planeinstance directly
Example
Section titled “Example”let { Plane } = SketchUpApi;
// From coefficients (ground plane, z = 0)let p1 = Plane.fromPlaneLike([0, 0, 1, 0]);console.log(p1.normal.toArray());// => [0, 0, 1]
// From point + normallet p2 = Plane.fromPlaneLike( [[0, 0, 5], [0, 0, 1]]);console.log(p2.d);// => -5 (plane at z = 5)