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!
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.
Hello Peter! that’s great, it’s exactly what I needed, could you pass me your code please?
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:
- 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).
- 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).
- Due to 1 pipes with variable N of faces and/or variable N of edges at each end are not supported.
- Due to 1 closed pipes are not supported.
- 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).
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).
hi do you have this updated for rhino 8? im trying to use it because its exactly waht i need but its not running on my version.
Thanks
Er … hmm … for the usage (if any at all) that R/GH have in the practice R5 is all what I need.
BTW: obviously R8 is protesting because there’s old Methods on duty. But what Methods?
im was the whole day trying to extract the axis/center line of pipes. Because i have to do it for multiple times with a lot of pipes. But i never tried with something like this. i leave my code if you can take a looksy
thanks
ExtractCenterLine_re V03.gh (75.0 KB)
Apparently area is finding the center of the circle and relay its just for organizing the connectors.
BTW is it possible to obtein the c++ to write it again in R8?
Thanks
It’s not C++ (it’s C#). Writing for R8 may require new R8 Methods …where the old ones (used in that indicative thing posted) are obsolete and/or not supported. Obviously I can’t do that because I don’t have R6/7/8…/666.