Plane units of measure
-
I need to interrogate a plane and need to know what what the values mean.
entity.plane
I noticed that if I have the plane at 45deg then I get a value of 0.707106781186547 I do not know what that means. I also see there are 4 values what are they? I can understand x, y, z but I am not sure of the 4th item in the array.
Thanks
-
http://code.google.com/apis/sketchup/docs/ourdoc/geom.html
@unknownuser said:
A plane can be represented as either an Array of a point and a vector, or as an Array of 4 numbers that give the coefficients of a plane equation.
http://code.google.com/apis/sketchup/docs/ourdoc/geom.html#fit_plane_to_points
@unknownuser said:
The plane is returned as an Array of 4 numbers which are the coefficients of the plane equation Ax + By + Cz + D = 0.
-
Thomthom beat me two it but I'd typed it so I post it anyway
A plane can be determined by an on-plane point and a normal vector, or an on-plane point and two in-plane vectors, or three on-plane points...
See this http://code.google.com/apis/sketchup/docs/ourdoc/geom.html for notes onplane
- a plane is set/got by an array of a point3d and a vector3d
soplane=[point_on_face, face.normal]
, OR an array of four values.
The array of 4 numbers gives the coefficients of a plane equation as follows:
Ax + By + Cz + D = 0
It consists of four coefficients A, B, C and D, where D is the constant term
The plane's normal vector is [Ax,By,Cz]
If D!=0 you can divide everything by D to get
a + b + c = 1
etc...
... this is a good source http://www.astro.uvic.ca/~tatum/celmechs/celm4.pdf
You don't really need to do too much with the plane's raw data - there are several API methods to get the distance a point is from a plane, or project a point perpendicularly onto a plane, make a plane from three points, find the 'line' formed by the intersection of two planes, find the intersect point of a line and a plane [a line is NOT an edgeline=edge.line
orline=[edge.start.position, edge.start.position,vector_to(edge.end.position)]
(i.e. a point and a vector - a 'line' is infinitely long, as is a plane in two directions) etc etc.
Advertisement