Table of Contents

Method CollidesWith

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

CollidesWith(GeoFace2, GeoLine2)

Determines whether a segment reaches the material of a face.

public static bool CollidesWith(GeoFace2 face, GeoLine2 line)

Parameters

face GeoFace2
line GeoLine2

Returns

bool

CollidesWith(GeoFace2, GeoLine2, Tolerance)

Determines whether a segment reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoLine2 line, Tolerance tolerance)

Parameters

face GeoFace2
line GeoLine2
tolerance Tolerance

Returns

bool

Remarks

The segment collides where it crosses a rim, lies on the material, or comes within the point tolerance of a rim, the outline from outside or a hole's from within the hole. At a tolerance of a thousandth, the segment from (41, 58) to (50, 59.9995), in the hole from (40, 40) to (60, 60) of the square 100 by 100, reaches the material half a thousandth below the hole's top.

CollidesWith(GeoFace2, GeoArc2)

Determines whether a arc reaches the material of a face.

public static bool CollidesWith(GeoFace2 face, GeoArc2 arc)

Parameters

face GeoFace2
arc GeoArc2

Returns

bool

CollidesWith(GeoFace2, GeoArc2, Tolerance)

Determines whether a arc reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoArc2 arc, Tolerance tolerance)

Parameters

face GeoFace2
arc GeoArc2
tolerance Tolerance

Returns

bool

Remarks

The arc collides where it crosses a rim, lies on the material, or comes within the point tolerance of a rim, the outline from outside or a hole's from within the hole. At a tolerance of a thousandth, an arc ending half a thousandth above the top of the square 100 by 100 collides with it, and one ending two thousandths above does not.

CollidesWith(GeoFace2, GeoCircle2)

Determines whether a circle reaches the material of a face.

public static bool CollidesWith(GeoFace2 face, GeoCircle2 circle)

Parameters

face GeoFace2
circle GeoCircle2

Returns

bool

CollidesWith(GeoFace2, GeoCircle2, Tolerance)

Determines whether a circle reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoCircle2 circle, Tolerance tolerance)

Parameters

face GeoFace2
circle GeoCircle2
tolerance Tolerance

Returns

bool

Remarks

The circle, read as its disc, collides where it reaches the material or comes within the point tolerance of a rim, a hole's from within the hole included.

CollidesWith(GeoFace2, GeoRectangle2)

Determines whether a rectangle reaches the material of a face.

public static bool CollidesWith(GeoFace2 face, GeoRectangle2 rect)

Parameters

face GeoFace2
rect GeoRectangle2

Returns

bool

CollidesWith(GeoFace2, GeoRectangle2, Tolerance)

Determines whether a rectangle reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoRectangle2 rect, Tolerance tolerance)

Parameters

face GeoFace2
rect GeoRectangle2
tolerance Tolerance

Returns

bool

Remarks

The rectangle collides where it crosses a rim, where its material and the face's overlap, or where it comes within the point tolerance of a rim, the outline from outside or a hole's from within the hole.

CollidesWith(GeoFace2, GeoPolyline2)

Determines whether a polyline reaches the material of a face.

public static bool CollidesWith(GeoFace2 face, GeoPolyline2 polyline)

Parameters

face GeoFace2
polyline GeoPolyline2

Returns

bool

CollidesWith(GeoFace2, GeoPolyline2, Tolerance)

Determines whether a polyline reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoPolyline2 polyline, Tolerance tolerance)

Parameters

face GeoFace2
polyline GeoPolyline2
tolerance Tolerance

Returns

bool

Remarks

The polyline collides where it crosses a rim, lies on the material, or comes within the point tolerance of a rim, the outline from outside or a hole's from within the hole.

CollidesWith(GeoFace2, GeoPolygon2)

Determines whether a polygon reaches the material of a face.

public static bool CollidesWith(GeoFace2 face, GeoPolygon2 polygon)

Parameters

face GeoFace2
polygon GeoPolygon2

Returns

bool

CollidesWith(GeoFace2, GeoPolygon2, Tolerance)

Determines whether a polygon reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoPolygon2 polygon, Tolerance tolerance)

Parameters

face GeoFace2
polygon GeoPolygon2
tolerance Tolerance

Returns

bool

Remarks

The polygon collides where it crosses a rim, where its material and the face's overlap, or where it comes within the point tolerance of a rim, the outline from outside or a hole's from within the hole.

CollidesWith(GeoFace2, GeoPolygonArc2)

Determines whether a curved loop reaches the material of a face.

public static bool CollidesWith(GeoFace2 face, GeoPolygonArc2 loop)

Parameters

face GeoFace2
loop GeoPolygonArc2

Returns

bool

CollidesWith(GeoFace2, GeoPolygonArc2, Tolerance)

Determines whether a curved loop reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoPolygonArc2 loop, Tolerance tolerance)

Parameters

face GeoFace2
loop GeoPolygonArc2
tolerance Tolerance

Returns

bool

Remarks

The loop collides where it crosses a rim, where its material and the face's overlap, or where it comes within the point tolerance of a rim, the outline from outside or a hole's from within the hole.

CollidesWith(GeoFace2, GeoPolylineArc2)

Determines whether a curved chain reaches the material of a face.

public static bool CollidesWith(GeoFace2 face, GeoPolylineArc2 chain)

Parameters

face GeoFace2
chain GeoPolylineArc2

Returns

bool

CollidesWith(GeoFace2, GeoPolylineArc2, Tolerance)

Determines whether a curved chain reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoPolylineArc2 chain, Tolerance tolerance)

Parameters

face GeoFace2
chain GeoPolylineArc2
tolerance Tolerance

Returns

bool

Remarks

The chain collides where it crosses a rim, lies on the material, or comes within the point tolerance of a rim, the outline from outside or a hole's from within the hole.

CollidesWith(GeoFace2, GeoFace2)

Determines whether the materials of two faces meet.

public static bool CollidesWith(GeoFace2 face, GeoFace2 other)

Parameters

face GeoFace2
other GeoFace2

Returns

bool

Exceptions

ArgumentNullException

Thrown when either face is null.

CollidesWith(GeoFace2, GeoFace2, Tolerance)

Determines whether the materials of two faces meet, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoFace2 other, Tolerance tolerance)

Parameters

face GeoFace2

The first face.

other GeoFace2

The second face.

tolerance Tolerance

The tolerance.

Returns

bool

true if the two overlap or touch, one lying on the other's material included; false where they are apart, and where one lies wholly in a hole of the other. A square 20 by 20 about (50, 50) does not collide with the square 100 by 100 with a corner at the origin and a hole 40 by 40 in its middle; about (15, 50) it does.

Remarks

The other face is the probe, asked as a polygon is: it has to reach the outline, through CollidesWith(GeoFace2, GeoPolygon2, Tolerance), and no hole may hold it whole. A face that crosses no rim of a hole lies wholly inside it, wholly outside it, or holds it, and the first is told by a corner of the probe's outline falling inside the hole while the probe's material does not hold a corner of the hole. No boolean is made.

Exceptions

ArgumentNullException

Thrown when either face is null.

CollidesWith(GeoFace2, GeoRay2)

Determines whether a ray reaches the material of a face.

public static bool CollidesWith(GeoFace2 face, GeoRay2 ray)

Parameters

face GeoFace2
ray GeoRay2

Returns

bool

Exceptions

ArgumentNullException

Thrown when the face is null.

CollidesWith(GeoFace2, GeoRay2, Tolerance)

Determines whether a ray reaches the material of a face, within a tolerance.

public static bool CollidesWith(GeoFace2 face, GeoRay2 ray, Tolerance tolerance)

Parameters

face GeoFace2
ray GeoRay2
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the face is null.