Im trying to group rebars which are closer to the “Exterior” or the “interior” faces of the walls. I have developed a simple script shown below which uses the concept of surface thickening and using geometry intersect option to group them.
The problem with this is that, the thickened surface also comes into contact with the perpendicular walls, which messes up the process where there are “T” junctions in the model.
Is there a way to just thicken one side of the surface instead of both the sides. My ultimate aim is to isolate 2 layers of rebars in one side of the wall, so that i can apply some parameters to them.
Don’t completely flatten your list - use sublists instead and only test the groups of rebar against the groups of surfaces.
Also, you may want to use Geometry.DistanceTo instead of bounding box containment.
In each sublist:
Get the distance from rebar to interior face.
Get the distance from rebar to exterior face.
If D1 > D2 the rebar is should get an “interior” key, otherwise the rebar should get an “exterior” key.
Group the rebars by the ‘interior/exterior keys.
Thanks a lot for the quick reply. Using Geometry.DistanceTo node does sound good. But i faced a bit of a dead end when i tried it. Its just that whenever i try to convert the rebar elements to Geometry using Element.Geometry, i just get an empty list. Even tried it without using Levels.
Loos like the keys are a bit complex since, there will be four values for each of the rebars in one wall and the same process for several other walls against several other rebars which increases the conditions two fold. Im currently struggling to match the rebars with their respective walls, which i think will make the task a bit more simpler and also, it seems like the script needs a better list management. I’ve only gotten this far with the script:
Thanks a lot for following up!! i’ll look into how this works in getting the rebars at respective faces. And will post the script here too when I’m successful!