Getting coordinates of diagonal points of a column

Hello

As the title suggests, i have a scripts that reads the opposite points of a column, used to work fine, but now it doesnt, the output as you can see is “null” and there is nothing displayed on the view except blue dots on where the spot coordintaes should be, could really use your help.

Thanks in advance

Could you show the other node previews? It’s no help if we can’t see what they’re doing.

1 Like

Well…there are a couple of ways you could go about this, which may be a bit more simple:

  1. GetLocation, and then rebuild points at the top and bottom of column with the xy-values from the origin, and the min/max z-values from the element.boundingbox and box.min and box.max values. Adding a factor to the z-values would be a simple addition node.

  2. Set the column from vertical to end-point driven. The location of the end-points can be retrieved again using the GetLocation node.

I see you are referencing the surface paramter at 1.0, so I am not sure if you are searching the centroid of the column, or some other reference.

Based on your current graph-screenshot, it’s quite difficult to understand what is breaking. I am unfamiliar with the spot.coordinates node. Maybe you could upload the script?

1 Like

no not the centroid of the column, what i want is the upper east vertex and the lower west vertex.
here is what i want to accomplish:

and here is the script:
1234.dyn (50.3 KB)

by the way, is there a way to select all the visible elements of a category of a view??
i know i can use category then all elements of a category, but that would select all of the columns for example in the model! which isnt what i want.

thanks in advance

Nerdasorus, from the image you provided it looks like you are just finding the min and max point of the bounding box. Is there a reason why that wouldn’t work?

1 Like

here is what i get when i run the script

image

As long as your columns are axis aligned like your example image, wouldn’t this give the same result?

1 Like

yes, your solution would read the same result, the problem is how to write them on the view? (i also think that is the problem in my script)

I used spot coordinate by point (from clockwork 2.0x), sometimes it works sometimes it doesn’t! is there another node that can help me with that? (btw i tried your script with it and it gave me the same blue dots you see in the picture above, this is why i think its the problem)

Be aware, the bounding box method only this only works for elements which are exactly orthoganal. If you have a piece of building, or a column which is rotated (45° for example, you will not get the correct coordinates.

The other thing you could do, is to nest a shared-family on the column corners and get the coordinates that way.

Otherwise, you could also cut a plane through the column, grab the resulting geometry (lines or surface) and grab the xy min-max points with some logic and filtering. (A bit more complex, but would work for rotated elements.)

1 Like

thanks for the tip!! but it seems a bit more complex. and as you said this script should suffice as is, since all of the columns are not rotated.

But do you know any other way than to use “spot coordinate by point” from Clockwork 2.0x?

I’ve never scripted spot-coordinates, so I’m afraid I can’t help you there.

There is a ByCategeroyAndView Node from archilab. The one thing you need to be aware of, is that this may also grab your columns in the level above / below your cut-level if they are visible in the view. Structural engineers use reflected ceiling plans where I am working, and I am usually looking 50cm into the level above.

I know in the US, engineers are cutting at the slab and usually looking about 1m into the level below.

You can avoid getting those columns by either filter the level out (you can grab the associate level of the active view, and then do a simple “==” test to see if the column base constraint is equal to the associated view. Otherwise, if your columns aren’t hosted correctly, you can just adjust the view depth of the script before running the script, and change it back.

If you don’t have the following packages, you MUST get them:

  • Clockwork
  • Steamnodes
  • Springs (there is a good one, and a bad one with a lot of thumbs down. You obviously want the good one.)
  • archi-lab
  • Rhythm
  • GeniusLoci

I did a quick search for “spot elevations” and “elevation” and only clockwork had a few nodes.

1 Like

Also, as a side note:

If there is a solution to your question, please mark it as such. This will help other users quickly find solutions to problems when they click on the thread. Threads sometimes become filled with side-notes and discussions (like this, or the package recommendations, or tangential topics) and it can be frustrating to find what you are looking for quickly. (I assume most of us are working, and just trying to check-off the current task before moving onto the next one…most of us anyways :wink:

Cheers,
Matt

1 Like