AddCutPlane

Adds a planar surface through objects at a designated location.  For more information, see the Rhino help file for the CutPlane command.

Syntax

rhinoscriptsyntax.AddCutPlane (object_ids, start_point, end_point, normal=None)

rhinoscript.surface.AddCutPlane (object_ids, start_point, end_point, normal=None)

Parameters

object_ids

Required.  List.  The identifiers of objects that the cutting planes will pass through.

start_point

Required.  List of 3 numbers or Point3d.  The start of the line that defines the cutting plane.

end_point

Required.  List of 3 numbers or Point3d.  The end of the line that defines the cutting plane.

normal

Optional.  A vector that will be contained in the returned planar surface.  In the case of Rhino's CutPlane command, this is the normal to, or Z axis of, the active view's construction plane.  If omitted, the world Z axis is used.

Returns

Guid

The identifier of the new object if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

objs = rs.GetObjects("Select objects for cut plane")

if objs:

    point0 = rs.GetPoint("Start of cut plane")

    if point0:

        point1 = rs.GetPoint("End of cut plane", point0)

        if point1: rs.AddCutPlane( objs, point0, point1 )

Also See

AddPlaneSurface