XformMultiply

Multiples two transformation matrices, where xform_result = xform1 * xform2.

Syntax

rhinoscriptsyntax.XformMultiply (xform1, xform2)

rhinoscript.transformation.XformMultiply (xform1, xform2)

Parameters

xform1

Required.  List or Rhino.Geometry.Transform.  The first 4x4 transformation matrix to multiply.

xform2

Required.  List or Rhino.Geometry.Transform.  The second 4x4 transformation matrix to multiply.

Returns

Transform

The 4x4 transformation matrix.

None

On error.

Example

import rhinoscriptsyntax as rs

import math

objs = rs.GetObjects("Select objects to shear")

if objs:

    cplane = rs.ViewCPlane()

    cob = rs.XformChangeBasis(rs.WorldXYPlane(), cplane)

    shear2d = rs.XformIdentity()

    shear2d[0,2] = math.tan(math.radians(45.0))

    cob_inv = rs.XformChangeBasis(cplane, rs.WorldXYPlane())

    temp = rs.XformMultiply(shear2d, cob)

    xform = rs.XformMultiply(cob_inv, temp)

    rs.TransformObjects( objs, xform, True )

Also See

XformPlanarProjection

XformRotation

XformScale

XformShear

XformTranslation