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
Tags:
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.
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
© 2024 Created by Scott Davidson. Powered by