Grasshopper

algorithmic modeling for Rhino

Hi.

 

I am trying to divide a 2D shape (closed Curve) at a point on its outline (decided by the input side/param) with a result of new closed Curves. The split will take place within a grid, here represented by WorldXY (could be a user set Plane)

 

As far as I understand, no Curve method could do this? My take was the following:

 

- create a planar surface from the shape curve
- find the point on the curve
- decide on split direction
- add a splitting curve in direction, with boundingbox max as lenght
- extract curve - convert surface to Brep
- split Brep using Brep.Split() function
- for each new shape
- extract outline curves with Brep.GetWireFrame()
- join outline curves to a new closed curve shape

This works, I am just worried that I'm using to many functions and create to much geometry for something that could be solved simpler? This split function is part of a much larger plugin.

Cheers,
Eirik

Views: 1001

Attachments:

Replies to This Discussion

So one closed curve is divided into several closed curves? If that plural was a typo, aren't you just looking to change the seam of a closed curve?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David.

Plural was not typo.. Let's say the curve represents a building, and by splitting the curve at a point it is divided into apartments. So the closed curve is split and the result is two or more split curves depending on the split point. If you have a look at the working attached definition (original thread) you might see what I'm trying to do. The script works, just wondering if it is the right way to do it or if there is a less resource heavy (creating breps and surfaces and extracting and joining.. ) way to do it...

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