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

Rhino.ObjectClash (arrObjects0, arrObjects1, dblClearance)

Parameters

arrObjects0

Required.  Array.  The first array of object identifiers.

arrObjects1

Required.  Array.  The first array of object identifiers.

dblClearance

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

Array

An array that contains arrays of clash and clearance events if successful. The array of event information will contain the following:

Element

Description

0

String. The identifier of the object in arrObjects0.

1

String. The identifier of the object in arrObjects1.

2

Array.  An array of 3-D hit points where the objects interfere.

Null

If not successful, or on error.

Example

Const rhSurface = &h8

Const rhPolysrf = &h10

Const rhMesh = &h20

Const rhExtrusion = &h40000000

Dim arrObjects0, arrObjects1, intFilter, arrEvents, arrEvent

intFilter = rhSurface + rhPolysrf + rhMesh + rhExtrusion

arrObjects0 = Rhino.GetObjects("Select first set for clash detection", intFilter)

arrObjects1 = Rhino.GetObjects("Select second set for clash detection", intFilter)

arrEvents = Rhino.ObjectClash(arrObjects0, arrObjects1, 2.0)

If IsArray(arrEvents) Then

  For Each arrEvent In arrEvents

    Call Rhino.AddPoints(arrEvent(2))

  Next

End if

Also See

IntesectBreps

MeshMeshIntersection

SurfaceSurfaceIntersection