# Slanted Column irregular shape coordinates

Hello everyone

I am trying to get the shape coordinates at the start and end of each column for slanted columns, some are rectangular and others and irregular shape.

any ideas ?

thanks

Hi Amin,

What exactly do you mean by shape coordinates? If youâ€™re referring to the start point and end points of the column curve, slanted columns act very similarly to beams and that means that we can extract their location curve with â€śStructuralFraming.Locationâ€ť.

If youâ€™re referring to the column section at each end, that would be trickier. If the column is not being cut by other elements and you end up with a nice flat face at each end, one option would be to extract the two smallest faces of the columnâ€™s geometry. (most likely the cross section at the start and the end of the column will end up being the smallest faces in a several meter long column.

Check out the example below:

A more direct approach would be to extract the point coordinates of the vertices.

Definitely. Good idea, Vikram.

1 Like

Perfect, thatâ€™s exactly what I was looking for.

Thanks Dimitar

Thanks Vikram

1 Like

So, getting the coordinates worked, now I have another problem,

Say I have 150 columns, and I got the point coordinates, so itâ€™s a list of 150 items and each item has a sublist of 18 points, 9 top of column and 9 bottom. To divide the list into two lists one for top and one for bottom that I can do, and then sort them by Z value using Sort.bykey , the key being the Z, then chopping the list in half, one top one bottom. What I cannot do is do that for the 150 columns at once, since I donâ€™t know how to sortbykey for a sublist, and of I flatten all the points, I end up with 2700 point, and the column points get mixed.

Hopefully after that, setting each top and point coordinate as an instance parameter.

That flatten node is destroying your list structure and all the columnsâ€™ points get mixed up. Avoid flattening the list so early. How about something like the following:

Perfect ! thanks Dimitar.

Got any links to learn design script from ? Itâ€™s becoming essential.

Â

Â

Â

Â

Â

For sorting by a sublist, use the List.GetItemAtIndex node as the keyProjector.

While not as fancy and efficient as a script, I still find this method extremely useful in many situations.

The language guide is still very relevant: http://dynamobim.org/wp-content/uploads/forum-assets/colin-mccroneautodesk-com/07/10/Dynamo_language_guide_version_1.pdf

The sample under help>samples>core>CoreCodeBlocks (also Core_Math to some part) are a great resource too.

Thereâ€™s a ton of sample code on the forum.

Also try the newly re-introduced â€śNode to Codeâ€ť functionality in the latest daily builds.