tags without Overlapping

tags without Overlapping

Anonymous
Not applicable
5,682 Views
11 Replies
Message 1 of 12

tags without Overlapping

Anonymous
Not applicable

Hi,

 

When we do tag all the tags overlap. How do I make adjustment so that they are not cluttered and do not overlap.

 

Thanks & Regards

Sanjay Pandey

5,683 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable
Hi Sanjay,

You can find tags are overlapped or not using geometry but for adjustment you can not ( because client need tags differently according to scenario (Tags adjustment are aesthetic in nature )). But at least you can take a input from user like reference and can move tag there or can define rules according to requirement that help user to accomplish their work faster.

0 Likes
Message 3 of 12

jeremytammik
Autodesk
Autodesk

Not a trivial problem.

 

As Manish suggests, you can easily determine whether tags overlap.

 

https://stackoverflow.com/questions/1119451/how-to-tell-if-a-line-intersects-a-polygon-in-c

 

To determine an alternative arrangement, you will have to move them around until they do not overlap.

 

Once you have that sorted out, you will possibly not be happy with the result, and the next problem will be how to distribute them nicely.

 

The last step sound like machine learning to me...

 

Here is a powerful computational geometry algorithms library:

 

https://www.cgal.org/

 

Here is a simpler polygon clipper:

 

http://angusj.com/delphi/clipper.php

 

You might want to research what algorithms people use to place labels on maps... they face the same challenge.

 

Here is a solution that places labels avoiding overlaps using either a greedy or simulated annealing strategy:

 

https://github.com/d3fc/d3fc-label-layout

 

Looking forward to seeing how you end up solving this!

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 4 of 12

jeremytammik
Autodesk
Autodesk

Here is a really cool and performant new tool to check for overlapping rectangles:

 

https://github.com/mourner/flatbush

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 12

FlorisvdG
Advocate
Advocate

Very interested in this, did you come up with a solution, or find anything useful?

0 Likes
Message 6 of 12

sivin.sivov
Explorer
Explorer

+1 
Has anyone figured something out? I'm working on a dynamo script but it's a long battle ahead.

0 Likes
Message 7 of 12

bogdan.petrescu63URX
Participant
Participant

archi-lab boasts with a feature :

 

https://wrw.is/clean-element-tagging-with-dynamo/ 

 

haven't tried it. yet.

0 Likes
Message 8 of 12

jeremy_tammik
Alumni
Alumni

Did you also note this recent conversation and solution?

 

https://forums.autodesk.com/t5/revit-api-forum/auto-tagging-without-overlap/td-p/9996808

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 9 of 12

sahin.ikbal
Advocate
Advocate

As said by Manish "You can find tags are overlapped or not using geometry"

I can not seem to find any geometric object from tags. Can someone suggest what process its referring to?

@Anonymous @jeremy_tammik 

0 Likes
Message 10 of 12

aliAANV4
Explorer
Explorer

As suggested by @jeremytammik it's not a trivial problem. 

 

We have developed a solution to this problem using machine learning and AI. Our algorithms leverage fast and parallelizable techniques that we developed for calculating overlaps between rectangles (for tag/tag and tag/object collision detection) and overlaps between lines and rectangles (for leader line/tag/objection collision detection).

 

Using these algorithms and cloud computing, we calculate the best location for each tag and its leader line to avoid collision with other tags, objects, and their leader lines.

 

The solution also considers tag alignment as an objective to reach a nice outcome. You can try our method here: https://bimlogiq.com/products/smart-annotataion

 

Feel free to reach out if you would like to discuss it any further. 

 

Thanks 

Ali 

Message 11 of 12

FlorisvdG
Advocate
Advocate

Now thát is a solution. Amazing stuff!

Message 12 of 12

morrisa1E2UP
Community Visitor
Community Visitor

Hi Ali!

 

I have been experimenting with BIMLOGIQ and have noticed there are no Walls under Generic for Wall tags.  A specialty equipment section would be great too!  I would love to see a feature where we could add our own custom family Tag types to the tag settings.

0 Likes