Grasshopper

algorithmic modeling for Rhino

Matching object properties from 2D plan to 3D axon

I am working on a masterplan project and I have two files for the site:

1. 2D plan that is made up of closed curves-- each curve has a unique object name in Rhino based on its lot ID

2. 3D model with closed polysurfaces that have no object names

I now need a way to transfer the lot ID's of the 2D curves to the 3D polysurfaces. I've already gotten very close to a solution by using Curve CP to find the closest cuve to the center point of each polysurface. Unfortunately, I've now discovered that my lot curves aren't perfectly clean and this solution fails whenever one of the lot curves slightly overlaps into an adjacent lot because it then becomes the closest curve.

The simplest solution I can think of would be to offset all of the curves by a small margin inward so that there is no longer any overlap, but I would need to do this in a way that preserves the object name of the original curve, so that the offset can then pass the name on to the polysurface. I imagine this is possible, but I am relatively new to grasshopper and so I am hitting a wall here.

If anyone knows an existing offset component out there that can do this on a large set of curves, or if there is an even easier solution to my original problem, I would be very grateful-- thanks!

Views: 757

Attachments:

Replies to This Discussion

Hello Matt,

I believe that if you calculate the distance from the centroid of the brep to the centroid of the polyline you will get the results you want:

Thanks for the reply Nikos. You are right that this would be a solution if the breps were the same footprint as the curves, but one detail I should have mentioned: the breps are often smaller volumes on the edge of one lot. If the lot is large and the adjacent lot small, then the brep centroid can be closer to an adjacent lot centroid and therefore still vulnerable to getting hijacked.

Now, the brep XY coordinates of each brep centroid will all fall inside only one corresponding curve. This may be more complicated to define, but if there is a way to link the XY coordinate of the brep centroid with the curve that contains that point, that would be another solution.

That, or offsetting the curves while maintaining the original curves attributes are the two ideas I've been able to come up with.

Thanks again for the help- any more leads or suggestions out there would be much appreciated.

Matt

Hi Matt,

In this case this should work:

Provided all your curves are closed and have 0 elevation!

Attachments:

Wow, not so complicated after all-- that InCurve is exactly what I needed. Thanks Nikos!

Glad it works,

good luck with your project!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service