I’m sure this is a easy task but I can’t find a neat solution. I’ve got a list of lines that I have used to generate walls, and I’m wanting to create callouts centred on each of these walls, so I need to create a rectangle to use as the callout extents.
I was hoping I can get the midpoint of the line, and create a rectangle centred on that, but my initial attempt was incredibly messy and longwinded, so I scrapped that.
1 Like
Sounds perfect, thanks!
Beats my method of translating the line up and down, and then getting the start & end points of those line, and trying to create a rectangle from them!
@jacob.small right, got the rectangle sorted on the XY plane, got the midpoint of the wall line (as a point), how do I transform the rectangle? I’ve not used this kind of geometry handling before.
Ooo, I might just have it!
If you wanted to move a geometry from the origin to a point, you can change the point to a vector using a Point.ToVector node, and then use a Geometry.Translate node which takes geometry and direction as the only inputs.
You don’t want to do that though as the rectangles won’t rotate to match the curve. You could rotate the rectangles before/after, but that’s extra work. Instead you want to Transform the geometry, which takes a coordinate system as the input.
Should look something like this:
1 Like
Ah I see thanks.
In my particular use case here, all my walls are in the same orientation. Its a bit of an odd workflow, but I’m essentially generating small sections of each wall type in an Admin phase prior to the Existing phase, and using that to report “semi-live” taggable info, rather than using the clunky Revit legend system.
Seems so silly that we can’t tag legend components! I understand due to them not containing instance information, but that is a topic for another day…