Element boundingbox average problem (renumber piles)

Hi there,

I’ve got a code that renames a family in the x direction by using the code attached, but the problem is the results are not as good as attended due to the families are a bit up and down on plan.

Is there a way of setting bounding box to an average of x & y points for example, or something that would read better on screen going from left to right.

Thanks in advance

Hi,
try sth like this:

Tomasz,

Thanks for this I’ve to adapted your code as attached but the last node fails, any idea whats going on here?

Regards

What’s the error?
Would be better if you upload the file.

Vikram,

As you can see from project snap shot just by specifying the min y point for the sort key on the original code its skipping piles in close proximity see p4 and p18 in the snap shot.

So I’ve just tried to amend the code from Tomasz’ give me a better result for the renaming of the families.

I’ve also uploaded the code and warning for your information.

Thank you

<a class=“attachment”

PILE RE-NAMER mk2.dyn (18.1 KB)

Looks like you are trying to create a new boundingbox from two identical points (MinPoint), try to replace one of them with the MaxPoint.

Einar,

I’ve changed that still get the warning,

I’ve change the above and I noticed that the x and y point are going in to the place, but I still have null values in the list.map after the bounding.box contains node.

Regards

That is because Bounding.Box contains expect a point and you are feeding it an element.

In the method shown by @Tomasz_Puchala you need to drawn a spline or polyline to determine the order of the piles.

To answer the topic: Here is one way to get the average point (centroid) of a bounding box. Draw a line between the min and max point and get the midpoint of the line.

@James_Washbourne Your workflow seems flawed…

@James_Washbourne Here is an alternate workflow.
RemarkPiles.dyn (9.1 KB)
RemarkPiles.rvt (1.2 MB)

1 Like

@James_Washbourne

Do you want to renumber your piles in x-direction for each grid line/axis from top to bottom?

If that’s the case, the average bounding box won’t help you, but you could try something like this:

renumberPilesXandGroupY.dyn (22.4 KB)

1 Like