Method Locate
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
Locate(GeoTriangle3, GeoPoint3)
Locates a point relative to a triangle, using the default tolerance.
public static PointLocation Locate(GeoTriangle3 triangle, GeoPoint3 point)
Parameters
triangleGeoTriangle3pointGeoPoint3
Returns
Locate(GeoTriangle3, GeoPoint3, Tolerance)
Locates a point relative to a triangle, within a tolerance.
public static PointLocation Locate(GeoTriangle3 triangle, GeoPoint3 point, Tolerance tolerance)
Parameters
triangleGeoTriangle3The triangle.
pointGeoPoint3The point to locate.
toleranceToleranceThe tolerance.
Returns
- PointLocation
Inside when the point lies on the triangle away from its edges, OnSide when it lies on an edge, and OutSide otherwise.
Remarks
A triangle is a planar region, so a point counts as inside only when it lies on the carrier plane as well as within the edges: a point hovering above the middle of a triangle is outside it. A degenerate triangle has no interior at all and reports every point as outside, including points on the sliver itself, because a shape with no area is not a region.
Locate(GeoPolygon3, GeoPoint3)
Locates a point relative to a polygon, using the default tolerance.
public static PointLocation Locate(GeoPolygon3 polygon, GeoPoint3 point)
Parameters
polygonGeoPolygon3pointGeoPoint3
Returns
Locate(GeoPolygon3, GeoPoint3, Tolerance)
Locates a point relative to a polygon, within a tolerance.
public static PointLocation Locate(GeoPolygon3 polygon, GeoPoint3 point, Tolerance tolerance)
Parameters
polygonGeoPolygon3The polygon.
pointGeoPoint3The point to locate.
toleranceToleranceThe tolerance.
Returns
- PointLocation
Inside when the point lies on the polygon away from its edges, OnSide when it lies on an edge, and OutSide otherwise.
Remarks
A polygon is a planar region, so a point counts as inside only when it lies on the carrier plane as well as within the boundary: a point hovering above the middle of a polygon is outside it. Within the plane the test is the even-odd rule, counting how many edges a ray from the point crosses, which is why a self-crossing polygon reports its doubly-enclosed lobes as outside.
Locate(GeoObb3, GeoPoint3)
Locates a point relative to an oriented box, using the default tolerance.
public static PointLocation Locate(GeoObb3 box, GeoPoint3 point)
Parameters
Returns
Locate(GeoObb3, GeoPoint3, Tolerance)
Locates a point relative to an oriented box, within a tolerance.
public static PointLocation Locate(GeoObb3 box, GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
Remarks
The point is taken into the local frame of the box first, which turns the oriented problem into three independent comparisons against the extents.
Locate(GeoSolid3, GeoPoint3)
Locates a point relative to a solid, using the default tolerance.
public static PointLocation Locate(GeoSolid3 solid, GeoPoint3 point)
Parameters
Returns
Locate(GeoSolid3, GeoPoint3, Tolerance)
Locates a point relative to a solid, within a tolerance.
public static PointLocation Locate(GeoSolid3 solid, GeoPoint3 point, Tolerance tolerance)
Parameters
solidGeoSolid3The solid; its boundary is assumed closed.
pointGeoPoint3The point to locate.
toleranceToleranceThe tolerance.
Returns
- PointLocation
OnSide when the point lies where the material ends — on a face of the solid outside every opening, or on the wall of an opening where that wall runs through the body — Inside when it lies in the material, and OutSide otherwise, openings included.
Remarks
Interior points are found by counting how many faces a ray from the point crosses: an odd count means it started inside. The answer is only as good as the boundary — an open shell has no inside and the count means nothing — which is what IsClosed() is for.
An opening is asked first, because it takes away everything strictly inside it, the body's own skin included. A plate's top face is a whole square even where a bolt hole passes through it, so a point in the middle of the hole at the level of that face is on a face and in empty space at once, and empty space is the answer. The wall of an opening drawn overshooting a face, as a through-hole usually is, is boundary only where it runs through the body.
Locate(GeoCircle3, GeoPoint3)
Locates a point relative to a circular disc, using the default tolerance.
public static PointLocation Locate(GeoCircle3 circle, GeoPoint3 point)
Parameters
circleGeoCircle3pointGeoPoint3
Returns
Locate(GeoCircle3, GeoPoint3, Tolerance)
Locates a point relative to a circular disc, within a tolerance.
public static PointLocation Locate(GeoCircle3 circle, GeoPoint3 point, Tolerance tolerance)
Parameters
circleGeoCircle3pointGeoPoint3toleranceTolerance
Returns
Remarks
A disc is a planar region like a polygon, so a point counts as inside only when it lies on the carrying plane as well as within the radius: a point hovering above the centre is outside it.
Locate(GeoFace3, GeoPoint3)
Locates a point relative to a face, using the default tolerance.
public static PointLocation Locate(GeoFace3 face, GeoPoint3 point)
Parameters
Returns
Locate(GeoFace3, GeoPoint3, Tolerance)
Locates a point relative to a face, within a tolerance.
public static PointLocation Locate(GeoFace3 face, GeoPoint3 point, Tolerance tolerance)
Parameters
Returns
Remarks
A point inside a hole is outside the face, and a point on the rim of a hole is on the face boundary, since the rim is as much an edge of the material as the outer loop is.