Highlighting a Bounding Box (of a Group)

So I now have a collection of window and door groups nested within my main wall group (wall assembly).

As the user mouses over the various windows or doors I will have the tool determine if the point is within the bounding box of the window or door group and then base its selection on that criteria.

However I thought it might be nice to have the tool highlight all of the window and door groups within a selected wall group. However, I don’t want to add all of these groups to the selection set but rather just draw a thick green line around each bounding box of each window or door group of the currently selected wall so that the user gets a clear indication of where they need to click to select a particular opening.

The code to create the highlighted lines will reside in my draw method of the tool. I am wondering if there is already a nice method or algorithm someone has devised that will grab the eight points of the bounding box and draw the lines.

I thought Thomthom did something like this. Check his TTLib2 code. (Might be at BitBucket)

1 Like

ADD: A quick search on “hilight bounds” of this category finds the link …

1 Like

After giving it some additional thought it probably isn’t worth the trouble but it does lead me to another question.

Up until now when utilizing the draw method within a tool for preview purposes I’ve only ever drawn lines or dashed lines. Is there a way to draw a face?

Moved to new linked topic …

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.