Grasshopper

algorithmic modeling for Rhino

Defining cells from unordered curves and interior point

I am looking for a way to create closed planar regions/cells from a bunch of unordered planar curves only where there is a point inside the region.

The behavior is very similar to the behavior of the Rhino Hatch command and its option - By Boundary.

Usually I would make a planar surface, split it with the curves and test and filter the surfaces/boundaries that contain a point. This split/testing process however is very costly and I am looking for another solution.

Thanks,

Dimitar

Views: 667

Attachments:

Replies to This Discussion

Hi.

Check this out. It's not a hard task for my machine. You'll need "Human" plug-in.

Attachments:

No plugin, just sort and filter by 'Brep CP' distance:

Attachments:

Thank you guys but maybe I have not been clear enough. I am aware of this way of extracting the boundaries. Both your solutions include making a planar surface and splitting it with all the curves. Using the test data this task takes 2.3s (according to the profiler). This is equally computationally intensive task on any machine and this is the part that I am trying to optimize. The test data has 134 curves. I am trying to complete that task on 40 000 curves.

Do you have any suggestions on optimization? Any suggestions on avoiding having to using all curves for surface generation and all curves for surface split?

So, you want to be able to create the boundaries consist of 40000 curves all at once and find the area to apply hatchs?

It may be easier if your curves are polylines and already forming regions but your curves are not consistent at all.

Perhaps you'll need special coding for this task or would be helpful to work with separate areas.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service