open-rmf / rmf_site

Experimental visualizer for dense buildings in RMF
32 stars 13 forks source link

Add automatic lift floor hole generation #196

Closed luca-della-vedova closed 6 months ago

luca-della-vedova commented 8 months ago

New feature implementation

Implemented feature

This PR adds automatic lift floor hole generation for lift shafts. It switches our path library from lyon to geo since the latter supports boolean operations between polygons, otherwise we would have to write our own.

Example below:

Screencast from 2024-01-12 11-02-03.webm

luca-della-vedova commented 7 months ago

When a floor is completely divided on two sides by a lift, one entire half of the floor will end up being deleted.

Yea I noticed this as well and I think it's just a consequence of the triangulation algorithm. I tried all the difference triangulation algorithms in the library and I believe I found the one that gives the best outcome here. The outline is still a bit messed up but the polygon shape itself seems to be OK in all the cases I could test (including the hall example you brought up).