FacePointClassification
Describes where a 3D point sits relative to a face.
When you call face.classifyPoint(point), SketchUp tests
whether the point is inside the face boundary, on one of its
edges, on a vertex, completely outside, or not even on the
face’s plane. The returned enum value tells you exactly which
case applies — useful for hit-testing, snapping logic, or
validating that a point lies on a surface before projecting.
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();let Classification = SketchUpApi.FacePointClassification;
// Create a 100x100 face on the ground planeawait model.performOperation(async op => { op.createFace(model, [ [0, 0, 0], [100, 0, 0], [100, 100, 0], [0, 100, 0] ]);}, 'Create face');
let faces = await model.entities.get( { filterBy: { types: ['Face'] } });let face = faces[0];
let inside = face.classifyPoint([50, 50, 0]);console.log(inside === Classification.PointInside);// => true
let above = face.classifyPoint([50, 50, 10]);console.log(above === Classification.PointNotOnPlane);// => true
let outside = face.classifyPoint([200, 200, 0]);console.log(outside === Classification.PointOutside);// => trueSDK 2.25.0
Enumeration Members
Section titled “Enumeration Members”PointInside
Section titled “PointInside”PointInside:
1
The point is inside the face boundary.
PointNotOnPlane
Section titled “PointNotOnPlane”PointNotOnPlane:
32
The point is not on the face’s plane at all.
PointOnEdge
Section titled “PointOnEdge”PointOnEdge:
4
The point lies on one of the face’s edges.
PointOnVertex
Section titled “PointOnVertex”PointOnVertex:
2
The point coincides with one of the face’s vertices.
PointOutside
Section titled “PointOutside”PointOutside:
16
The point is on the face’s plane but outside its boundary.
PointUnknown
Section titled “PointUnknown”PointUnknown:
0
Classification could not be determined.