Generated by DocFX

Class Intersect

Provides various tools for all kinds of intersection between NURBS and primitive.

Inheritance
System.Object
Intersect
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Syntax
public class Intersect

Methods

| Improve this Doc View Source

CurveCurve(NurbsBase, NurbsBase, Double)

Computes the intersection between two curves.

Declaration
public static List<CurvesIntersectionResult> CurveCurve(NurbsBase crv1, NurbsBase crv2, double tolerance = 1E-06)
Parameters
Type Name Description
NurbsBase crv1

First curve to intersect.

NurbsBase crv2

Second curve to intersect.

System.Double tolerance

Tolerance set per default at 1e-6.

Returns
Type Description
System.Collections.Generic.List<CurvesIntersectionResult>

If intersection found a collection of CurvesIntersectionResult otherwise the result will be empty.

| Improve this Doc View Source

CurveLine(NurbsBase, Line)

Computes the intersection between a curve and a line.

Declaration
public static List<CurvesIntersectionResult> CurveLine(NurbsBase crv, Line ln)
Parameters
Type Name Description
NurbsBase crv

The curve to intersect.

Line ln

The line to intersect with.

Returns
Type Description
System.Collections.Generic.List<CurvesIntersectionResult>

A collection of CurvesIntersectionResult.

| Improve this Doc View Source

CurvePlane(NurbsBase, Plane, Double)

Computes the intersection between a curve and a plane.
https://www.parametriczoo.com/index.php/2020/03/31/plane-and-curve-intersection/

Declaration
public static List<CurvePlaneIntersectionResult> CurvePlane(NurbsBase crv, Plane pl, double tolerance = 1E-06)
Parameters
Type Name Description
NurbsBase crv

The curve to intersect.

Plane pl

The plane to intersect with the curve.

System.Double tolerance

Tolerance set per default at 1e-6.

Returns
Type Description
System.Collections.Generic.List<CurvePlaneIntersectionResult>

If intersection found a collection of CurvePlaneIntersectionResult otherwise the result will be empty.

| Improve this Doc View Source

CurveSelf(NurbsBase, Double)

Computes the self intersections of a curve.

Declaration
public static List<CurvesIntersectionResult> CurveSelf(NurbsBase crv, double tolerance = 1E-06)
Parameters
Type Name Description
NurbsBase crv

The curve for self-intersections.

System.Double tolerance

Tolerance set per default at 1e-6.

Returns
Type Description
System.Collections.Generic.List<CurvesIntersectionResult>

If intersection found a collection of CurvesIntersectionResult otherwise the result will be empty.

| Improve this Doc View Source

LineCircle(Circle, Line, out Point3[])

Computes the intersection between a circle and a line.
If the intersection is computed the result points can be 1 or 2 depending on whether the line touches the circle tangentially or cuts through it.
The intersection result false if the line misses the circle entirely.
http://csharphelper.com/blog/2014/09/determine-where-a-line-intersects-a-circle-in-c/

Declaration
public static bool LineCircle(Circle cl, Line ln, out Point3[] pts)
Parameters
Type Name Description
Circle cl

The circle for intersection.

Line ln

The line for intersection.

Point3[] pts

Output the intersection points.

Returns
Type Description
System.Boolean

True if intersection is computed.

| Improve this Doc View Source

LineLine(Line, Line, out Point3, out Point3, out Double, out Double)

Solves the intersection between two lines, assumed as infinite.
Returns as outputs two points describing the minimum distance between the two lines.
Returns false if the segments are parallel.
http://geomalgorithms.com/a07-_distance.html

Declaration
public static bool LineLine(Line ln0, Line ln1, out Point3 pt0, out Point3 pt1, out double t0, out double t1)
Parameters
Type Name Description
Line ln0

The first line.

Line ln1

The second line.

Point3 pt0

The output point of the first line.

Point3 pt1

The output point of the second line.

System.Double t0

The parameter on the first line between 0.0 to 1.0

System.Double t1

The parameter on the second line between 0.0 to 1.0

Returns
Type Description
System.Boolean

True if the intersection succeed.

| Improve this Doc View Source

LinePlane(Line, Plane, out Point3, out Double)

Finds the unique point intersection of a line and a plane.
This method returns true if intersection return the unique point,
it returns false if the segment is parallel to the plane or lies in plane.
http://geomalgorithms.com/a05-_intersect-1.html

Declaration
public static bool LinePlane(Line line, Plane plane, out Point3 pt, out double t)
Parameters
Type Name Description
Line line

The segment to intersect. Assumed as infinite.

Plane plane

The plane has to be intersected.

Point3 pt

The point representing the unique intersection.

System.Double t

The parameter on the line between 0.0 to 1.0

Returns
Type Description
System.Boolean

True if the intersection success.

| Improve this Doc View Source

PlaneCircle(Plane, Circle, out Point3[])

Computes the intersection between a plane and a circle.
If the intersection is computed the result points can be 1 or 2 depending on whether the plane touches the circle tangentially or cuts through it.
The intersection result false if the plane is parallel to the circle or misses the circle entirely.

Declaration
public static bool PlaneCircle(Plane pl, Circle cl, out Point3[] pts)
Parameters
Type Name Description
Plane pl

The plane for intersection.

Circle cl

The circle for intersection.

Point3[] pts

Output the intersection points.

Returns
Type Description
System.Boolean

True if intersection is computed.

| Improve this Doc View Source

PlanePlane(Plane, Plane, out Line)

Solves the intersection between two planes.
This method returns true if intersection is found, false if the planes are parallel.

Declaration
public static bool PlanePlane(Plane p1, Plane p2, out Line line)
Parameters
Type Name Description
Plane p1

The first plane.

Plane p2

The second plane.

Line line

The intersection as Line.

Returns
Type Description
System.Boolean

True if the intersection success.

| Improve this Doc View Source

PolylinePlane(PolyLine, Plane)

Computes the intersection between a polyline and a plane.
Under the hood, is intersecting each segment with the plane and storing the intersection point into a collection.
If no intersections are found a empty collection is returned.

Declaration
public static List<Point3> PolylinePlane(PolyLine poly, Plane pl)
Parameters
Type Name Description
PolyLine poly

The polyline to intersect with.

Plane pl

The section plane.

Returns
Type Description
System.Collections.Generic.List<Point3>

A collection of the unique intersection points.