Accessing Specific Information From a List (Multiple Times)


I am currently working with a model that was created by an architect which has in it several 3D polysurfaces that are curved (in two directions). For this example, we’ll assume that it’s a square cross section that has been extruded along the curve. My end goal is to create a centerline representation of these 3D items that I can import into a 3D finite element model for structural analysis purposes. I had done this before for simpler straight solid elements and had some decent luck getting it to work. As of now, I’m running into some roadblocks on my current approach.

Right now, my approach has been as follows. Any suggestions (or alternate easier methods) would be appreciated!

  1. Input the brep as a parameter
  2. Extract the edges of the polysurface
  3. Divide the edge curves of the polsurface along its length by a certain number of segments (using a slider so I can change this later).
  4. Extract the points from teh divided curve. This gives me 4 points at each “segment” along the 3D polysurface (making the square cross-section).

My idea was that for each bundle of 4 points I could find the centerpoint and then connect a curve (segmented) through the various centerpoints. This would then be my output to my analysis program.

The issue I’m having is trying to deal with the large list of values. I have a hard time 1) figuring out which order those points are organized in and 2) extracting a specific four points at a time from which I would want to evaluate a centerpoint for. I could easily extract ONLY four points, but I need to do this process on each bundle of four points. Again, I could probably split my list a bunch of times, but I would like to be able to generate a centerpoint for each segment based on the slider that I mentioned before. That is - if I want 10 segments, I need 10 centerpoints, if i want 20 segments, I need 20 centerpoints, etc.

Again, I’m pretty new at GH, so there is probably an easier way to deal with this. Let me know if you have any suggestions!

Post files and images/diagrams which explain the issue.
See here - How to ask effective questions

This is what I have so far…


That division-interpolate step is going to wreck whatever accuracy you’re hoping to maintain.

If you have the four curved edge curves (four because we’re assuming a rectangular or square cross-section), what you could try instead is put those four curves into two lists of two curves each (grouping doesn’t matter).

Then you loft or rule each pair, giving you two surfaces. You extract the central isocurve from both these surfaces, giving you two new curves. Loft/rule once again with these two remaining curves and extract the centre-isocurve again, this will be the central axis of your shape.

However if your cross section isn’t rectangular, then the area-centroid cannot be found by simply averaging the corner points. In that case you will have to section the base shape at a number of intervals, and then use Area Centroid to get the centre of each section. Ultimately these centroids will need to be interpolated, re-introducing an accuracy problem.

ps. If you’re running Rhino6, you can extract edges by length more easily using the Edges From Length component in the Surface.Util panel.


Thanks for the response! I like your idea of grabbing the edge curves and then lofting between them. After doing so, how do you extract the “central isocurve”? The only curves I’ve been able to pull off are the edge curves as of now. I realize I’m probably missing a fairly easy feature, so I apologize if this is super simple.

Still on Rhino 5.


There’s an Iso Curve component, and if you reparameterise a Loft or Rule made from two curves only, the 0.5 coordinate is probably smack in the middle.