ObjectClash

Performs clash and clearance analysis on two sets of surface, polysurface, extrusion, or mesh objects. For more information see the Rhino help file for details on the Clash command.

Syntax

rhinoscriptsyntax.ObjectClash objects0, objects1, clearance)

rhinoscript.object.ObjectClash objects0, objects1, clearance)

 

Parameters

objects0

Required.  List.  The first set of object identifiers.

objects1

Required.  List.  The second set of object identifiers.

clearance

Required.  Number.  The clearance distance. If 0.0, then only clash, or intersection, analysis is performed. If > 0.0, then objects are also analyzed to see if they violate the defined zone of clearance.

Returns

List

A list that contains tuples of clash and clearance events if successful. The array of event information will contain the following:

Element

Description

0

Guid. The identifier of the object in objects0.

1

Guid. The identifier of the object in objects1.

2

List.  A list of 3-D hit points where the objects interfere.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

filter = rs.filter.surface + rs.filter.polysurface + rs.filter.mesh + rs.filter.extrusion

objects0 = rs.GetObjects("Select first set for clash detection", filter)

objects1 = rs.GetObjects("Select second set for clash detection", filter)

events = rs.ObjectClash(objects0, objects1, 2.0)

if events:

    for event in events:

        rs.AddPoints(event[2])

Also See

IntesectBreps

MeshMeshIntersection

SurfaceSurfaceIntersection