BoxMorphObject

Deforms an object by mapping its eight bounding box points to eight new points.

Note, this function only works on non-planar, objects unless the arrOrigBoxPoints optional argument is specified. In such a case, arrOrigBoxPoints should define a non-degenerate box, and the planar objects should be positioned inside of this box.

boxmorphobject.jpg

Syntax

Rhino.BoxMorphObject (strObject, arrBoxPoints [, blnCopy [, arrOrigBoxPoints]])

Rhino.BoxMorphObject (arrObjects, arrBoxPoints [, blnCopy [, arrOrigBoxPoints]])

Parameters

strObject

Required. String. The identifier of the object to deform.

arrObjects

Required. Array. An array of strings identifying the objects to deform.

arrBoxPoints

Required. Array. An array of eight 3-D points that contain the modified bounding box points.

blnCopy

Optional. Boolean. Copy the object. If omitted, the object(s) will not be copied (False).

arrOrigBoxPoints

Optional. Array. An array of eight 3-D points that define the original, or starting, box. If omitted, the object(s) bounding box is used.

Returns

String

The identifier of the deformed object if successful.

Array

An array of strings identifying the deformed objects if successful.

Null

If not successful, or on error.

Example

Dim strObject, arrBox, arrPoint

strObject = Rhino.GetObject("Select object to box morph")

If Not IsNull(strObject) Then

  arrBox = Rhino.BoundingBox(strObject)

  arrPoint = arrBox(6)

  arrPoint(2) = arrPoint(2) * 2

  arrBox(6) = arrPoint

  Rhino.BoxMorphObject strObject, arrBox

End If

Also See

BendObject

FlowObject

BoundingBox

MaelstromObject

SporphObject

StretchObject

TaperObject

TwistObject