Extracting the rail from a rhino modelled pipe

unhandled

(Bea Zurdi) #1

Hi! I’m quite new in grasshopper so sorry if this question sounds obvious. I have a rhino model with closed rectangular section pipes (extrusions along curves) and I’d like to extract their central “rail” since I need them to make the structure calcul model. I know how to draw pipes in grasshopper but don’t know how to do it the other way around, could you help me? thanks!


(Pfotiad0) #2

The question isn’t obvious at all.

Anyway it’s very easy via code (and maybe via components but this is not my game at all). The blue thingy is a sweep 1 brep made in Rhino with some rectangular profile.

Notify if you need the C# solution that does that.


(Bea Zurdi) #3

Hello Peter! that’s great, it’s exactly what I needed, could you pass me your code please?


(Pfotiad0) #4

OK, get the public version of the thing …

Brep_GetRectPipeRail_V2.gh (123.8 KB)
Brep_GetRectPipeRail_V2.3dm (956.5 KB)

… and have in mind:

  1. The way that the face loops are calculated in the public version is half the bacon (the internal build is using Cluster analysis based on FF data).
  2. Due to 1 ring type of pipes are NOT supported (In general unsupported breps are displayed in red and the info planel reports where this happened).
  3. Due to 1 pipes with variable N of faces and/or variable N of edges at each end are not supported.
  4. Due to 1 closed pipes are not supported.
  5. Mostly Due to 1 curvy pipes are not supported.

Anyway … get the gist of what this version does by using the sample data provided (load R file first).


(Pfotiad0) #5

On the other hand … and without violating the strict practice rules about internal/secret this, internal/secret that … I’ve spend a couple of minutes more on that V2. Now you can have the axis (shown as pink tube for clarity) for several types of pipes that are denied on the def provided:

I’m going to implement this extra ability tomorrow (in the classic update V2A).