Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

tags without Overlapping

11 REPLIES 11
Reply
Message 1 of 12
Anonymous
3937 Views, 11 Replies

tags without Overlapping

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

11 REPLIES 11
Message 2 of 12
Anonymous
in reply to: Anonymous

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.

Message 3 of 12
jeremytammik
in reply to: Anonymous

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

Message 4 of 12
jeremytammik
in reply to: Anonymous

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

Message 5 of 12
FlorisvdG
in reply to: Anonymous

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

Message 6 of 12
sivin.sivov
in reply to: FlorisvdG

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

Message 7 of 12

archi-lab boasts with a feature :

 

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

 

haven't tried it. yet.

Message 8 of 12
jeremy_tammik
in reply to: Anonymous

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
Message 9 of 12
sahin.ikbal
in reply to: Anonymous

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 

Message 10 of 12
aliAANV4
in reply to: Anonymous

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
in reply to: aliAANV4

Now thát is a solution. Amazing stuff!

Message 12 of 12
morrisa1E2UP
in reply to: aliAANV4

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report