Grasshopper

algorithmic modeling for Rhino

Orient Block from World XY to list of Planes (Change Basis)

I have attempted to modify a bit of VB code to transform a block present in the rhino doc to a series of new planes.

but I have run into trouble with the change basis portion of the transformation can anyone help fix this? (the scale and move portion seems ok but 3d rotation is not)

I attach my attempt

Regards

Andrew

Views: 1217

Attachments:

Replies to This Discussion

Function InsertBlock(BlockName As String, inspln As Plane, dblScale As Double) As Guid
   Dim blockTable As docobjects.Tables.InstanceDefinitionTable = doc.InstanceDefinitions
   Dim block As docObjects.InstanceDefinition = blockTable.Find(BlockName, True)
   Dim xform As Transform = Transform.PlaneToPlane(plane.WorldXY, inspln)
   xform = xform * Transform.Scale(Point3d.Origin, dblScale) insertBlock =  doc.Objects.

      AddInstanceObject(block.Index, xform)
   xform = transform.Unset
End Function

perfect!

Thanks

your welcome

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service