algorithmic modeling for Rhino
i try my best ,but still cannot convert the nurbscurves into ellipse
here is my script
Private Sub RunScript(ByVal x As Object, ByVal y As Object, ByVal z As Object, ByRef A As Object, ByRef B As Object)
Dim c_list As New list(Of nurbscurve)
Dim P_list As New list(Of Point3d)
For i As int32 = 0 To z
Dim c As New Ellipse(plane.WorldXY, i / 2, i)
Dim g As New NurbsCurve(c.ToNurbsCurve)
g.rotate(y * i, New vector3d(0, 1, 0), New point3d(x, 0, 0))
c_list.add(g)
Dim e As New BoundingBox
e = g.getboundingbox(False)
p_list.add(e.Center)
Next
Dim polyline As New polyline(p_list)
a = c_list
b = polyline
End Sub
To do the same thing is more easy in the old version
because i can't get the center of an ellipse directly
how can i do ???
thanks
ceason
Tags:
Dim c_list As New list(Of NurbsCurve)
Dim P_list As New list(Of Point3d)
For i As Int32 = 0 To z
Dim c As New Ellipse(plane.WorldXY, i / 2, i)
Dim g As NurbsCurve = c.ToNurbsCurve()
g.Rotate(y * i, Vector3d.YAxis, New Point3d(x, 0, 0))
c_list.Add(g)
p_list.Add(g.GetBoundingBox(True).Center)
Next
A = c_list
B = New polyline(p_list)
p_list.Add(c.Plane.Origin)
Dim c_list As New list(Of Ellipse)
Dim P_list As New list(Of Point3d)
For i As Int32 = 0 To z
Dim p As Plane = Plane.WorldXY
p.Rotate(y * i, Vector3d.YAxis, New Point3d(x, 0, 0))
c_list.Add(New Ellipse(p, i / 2, i))
p_list.Add(p.Origin)
Next
A = c_list
B = New polyline(p_list)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by