LineCylinderIntersection

Calculates the intersection of a line and a cylinder.   

Syntax

rhinoscriptsyntax.LineCylinderIntersection (line, cylinder_plane, cylinder_height, cylinder_radius)

rhinoscript.line.LineCylinderIntersection (line, cylinder_plane, cylinder_height, cylinder_radius)

Parameters

line

Required.  List of 6 numbers, 2 Point3d, or Line.  Two 3-D points identifying the starting and ending points of the line.

cylinder_plane

Required.  Plane.  The base plane of the cylinder.

cylinder_height

Required.  Number.  The height of the cylinder.

cylinder_radius

Required.  Number.  The radius of the cylinder.

Returns

List

A list of intersection points, either one or two, if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

plane = rs.WorldXYPlane()

line = (-10,0,0), (10,0,10)

points = rs.LineCylinderIntersection(line, plane, cylinder_height=10, cylinder_radius=5)

if points:

    for point in points: rs.AddPoint(point)

Also See

LineLineIntersection

LinePlaneIntersection

LineSphereIntersection