Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/r/h/rhinopython-HEAD/scripts/rhinoscript/transformation.py   rhinopython(Download)
def XformChangeBasis(initial_plane, final_plane):
    "Returns a change of basis transformation matrix or None on error"
    initial_plane = rhutil.coerceplane(initial_plane, True)
    final_plane = rhutil.coerceplane(final_plane, True)
    xform = Rhino.Geometry.Transform.ChangeBasis(initial_plane, final_plane)
    y1 = rhutil.coerce3dvector(y1, True)
    z1 = rhutil.coerce3dvector(z1, True)
    xform = Rhino.Geometry.Transform.ChangeBasis(x0,y0,z0,x1,y1,z1)
    if not xform.IsValid: return scriptcontext.errorhandler()
    return xform

src/r/h/rhinopython-HEAD/scripts/rhinoscript/object.py   rhinopython(Download)
 
    world_plane = Rhino.Geometry.Plane.WorldXY
    cob = Rhino.Geometry.Transform.ChangeBasis(world_plane, frame)
    shear2d = Rhino.Geometry.Transform.Identity
    shear2d[0,1] = math.tan(math.radians(angle_degrees))
    cobinv = Rhino.Geometry.Transform.ChangeBasis(frame, world_plane)

src/r/h/rhinopython-HEAD/scripts/rhinoscript/geometry.py   rhinopython(Download)
        if plane is None: return scriptcontext.errorhandler()
    if plane:
        xform = Rhino.Geometry.Transform.ChangeBasis(Rhino.Geometry.Plane.WorldXY, plane)
    bbox = Rhino.Geometry.BoundingBox.Empty
    if type(objects) is list or type(objects) is tuple:
    corners = list(bbox.GetCorners())
    if in_world_coords and plane is not None:
        plane_to_world = Rhino.Geometry.Transform.ChangeBasis(plane, Rhino.Geometry.Plane.WorldXY)
        for pt in corners: pt.Transform(plane_to_world)
    return corners