Grasshopper

algorithmic modeling for Rhino

Hello 
I want use the rhino comand "Rectangle 3 points" in grasshopper,
Sommebody know the script to use ?
thanks a lot
Jc

Views: 493

Replies to This Discussion

I'd do it like this:

Private Sub RunScript(ByVal p0 As Point3d, ByVal p1 As Point3d, ByVal p2 As Point3d, ByRef A As Object)
   Dim base As New Line(p0, p1)
   Dim pp As Point3d = base.ClosestPointTo(p2, False)
   Dim ex As Vector3d = p2 - pp

   Dim rec As New Polyline(5)
   rec.Add(p0)
   rec.Add(p1)
   rec.Add(p1 + ex)
   rec.Add(p0 + ex)
   rec.Add(p0)

   A = rec
End Sub



--
David Rutten
david@mcneel.com
Poprad, Slovakia
Great job
thank you David

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service