generative modeling for Rhino
Tags: IRhinoObject

Permalink Reply by Daniel Xiong on August 19, 2010 at 7:02am
Permalink Reply by Daniel Xiong on August 19, 2010 at 7:04am 
Private Sub RunScript(ByVal geo As List(Of OnBrep), ByRef A As Object)
Dim box As New OnBoundingBox()
For Each brp As OnBrep In geo
Dim p0 As New On3dpoint
Dim p1 As New on3dpoint
brp.GetBoundingBox(p0, p1)
box.Set(p0, True)
box.Set(p1, True)
Next
Dim view As MRhinoView = RMA.Rhino.RhUtil.RhinoApp().ActiveView
view.ActiveViewport().DollyExtents(box, RMA.OpenNURBS.IOn.coordinate_system.world_cs)
view.Redraw()
End Sub
Permalink Reply by Daniel Xiong on August 19, 2010 at 7:37am 
Private Sub RunScript(ByVal geo As List(Of GeometryBase), ByRef A As Object)
Dim box As BoundingBox = BoundingBox.Empty
For Each obj As GeometryBase In geo
box.Union(obj.GetBoundingBox(True))
Next
doc.Views.ActiveView.ActiveViewport.ZoomBoundingBox(box)
End Sub
Permalink Reply by Daniel Xiong on August 19, 2010 at 8:16am
© 2012 Created by Scott Davidson.
Powered by