Grasshopper

algorithmic modeling for Rhino

Hi All,

I tried to find cylinder center with Cylinder.Center. If the input cylinder is referenced from Rhino, it all works alright. If the cylinder is created in Grasshopper, the center is out of the cylinder. It is always offset to half the height of the cylinder. How could I differentiate these two cases? Thank you.

Xiaoming

Views: 512

Attachments:

Replies to This Discussion

Not sure if this works for all cases, but getting the boundingbox and then taking centre out of it seems to work for this example.

 Point3d cPt = brep.GetBoundingBox(true).Center;

Just realized that in Cylinder component, it output cylinder.ToRevSurface(). Maybe this is why. Wondering why it output RevSurface instead of cylinder itself.

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