Grasshopper

algorithmic modeling for Rhino

How can we creat a line with two points in vb?

Views: 272

Replies to This Discussion

Hello, I'm looking iin .VB to put a specific color to an object, why not a circle.

Dim cercle As New Circle

cercle.color!?!?!?

thanks
Hello,

I get the error "invalid Circle"

Dim cercle As New circle

cercle.center = New Point3d(0, 0, 0)

cercle.radius = 1

a = cercle

what is the problem?
thanks for help:)
Hi RG,

Circles in Rhino are 3D entities, you cannot define them by only a center point and a radius. Circles need a plane and a radius. The reason your circle is invalid is because the plane has x, y and z vectors of zero length.

The following will work:

Dim cr As New circle(Plane.WorldXY, 1)
cr.center = New Point3d(1, 2, 3)
a = cr


--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi RG,

you could also use one of the other constructor possibilities (overloads) to obtain a circle from a point. RhinoCommon will set the plane as parallel to the XY plane.

This is a shortcut, as RhinoCommon will do the work of creating the plane.

A = New Circle(New Point3d(1, 2, 3), 1)
thanks,

do you think is possible to put a specific color to a circle?

cr.color = red

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