I set the align distance to 3 ft, and now it locks up when rebuilding the preview. It caused a fatal revit error too. This is the log:
2023-06-06 14:09:22.8802|FATAL|pollination_logger|System.NullReferenceException: Object reference not set to an instance of an object.
at Pollination.Revit.Utilities.DocumentUtils.GetFilePath(Document doc)|System.NullReferenceException: Object reference not set to an instance of an object.
at Pollination.Revit.Utilities.DocumentUtils.GetFilePath(Document doc)
2023-06-06 14:09:26.4048|DEBUG|pollination_logger|& "C:\Program Files\pollination_revit\python\Scripts\dragonfly.exe" edit align --output-file "C:\Users\Cory.Duggin\AppData\Local\Temp\fa51ecfb-6965-44af-97b7-1babaa64d111\tmp92F4.tmp" --distance 3ft "C:\Users\Cory.Duggin\AppData\Local\Temp\fa51ecfb-6965-44af-97b7-1babaa64d111\tmp9400.tmp" "C:\Users\Cory.Duggin\AppData\Local\Temp\fa51ecfb-6965-44af-97b7-1babaa64d111\tmp93DF.tmp"|
2023-06-06 14:09:39.3743|DEBUG|pollination_logger||
2023-06-06 14:09:39.4525|DEBUG|pollination_logger|& "C:\Program Files\pollination_revit\python\Scripts\dragonfly.exe" translate model-to-honeybee "C:\Users\Cory.Duggin\AppData\Local\Temp\fa51ecfb-6965-44af-97b7-1babaa64d111\tmp92F4.tmp" --folder "C:\Users\Cory.Duggin\AppData\Local\Temp\fa51ecfb-6965-44af-97b7-1babaa64d111\vnnplnnb.xqd" --bypass-adj-check|
2023-06-06 14:09:45.0462|DEBUG|pollination_logger||
2023-06-06 14:09:46.5490|DEBUG|pollination_logger|& "C:\Program Files\pollination_revit\python\Scripts\honeybee-display.exe" model-to-vis "C:\Users\Cory.Duggin\AppData\Local\Temp\fa51ecfb-6965-44af-97b7-1babaa64d111\tmp8CAA.tmp" --output-file "C:\Users\Cory.Duggin\AppData\Local\Temp\fa51ecfb-6965-44af-97b7-1babaa64d111\sboomh4m.d3w\e72299d4-b3c1-4a58-8e7c-c22f45f380e2.html" --room-attr display_name --text-attr --output-format html|
Thank you for sharing the logs. This should just simply fail but it is probably because of this null Object reference.
System.NullReferenceException: Object reference not set to an instance of an object.
at Pollination.Revit.Utilities.DocumentUtils.GetFilePath(Document doc)|System.NullReferenceException: Object reference not set to an instance of an object.
at Pollination.Revit.Utilities.DocumentUtils.GetFilePath(Document doc)
Can you share this file with us? "C:\Users\Cory.Duggin\AppData\Local\Temp\fa51ecfb-6965-44af-97b7-1babaa64d111\tmp8CAA.tmp" - You can send it to me in a private message or in an email.
The visualization code struggles to create the visualization from this model because there is a room (STORAGE 1720) that is translated to a single line after the alignment. I imagine this is because the width of the room is less than 3 ft. @chriswmackey, we should add an automated check to filter these cases out.
@crduggin, we will push a fix for this but until then, unselect the problematic storage room before visualization and everything should work as expected.
This is already there in the alignment code when we run this delete_degenerate_rooms method:
This type of alignment operation would be producing tons of garbage rooms otherwise.
Let me see if thereās some reason why this room is not being removed by this method.
Looking at the code, Iām pretty sure that this is just a floating point tolerance issue and so I have put together a PR that I think will address this case by using the Model tolerance instead of absolute floating point tolerance:
Once I get the DFJSON and I can test it, I will merge it into the codebase if it fixes the issue.
Also, @mostapha , itās a little concerning that the VTK visualization code gets stuck in an endless loop whenever there is a degenerate geometry. I am sure that not all HBJSONs that we want to preview in the viewer will have the benefit of having passed through a check for degenerate rooms. Can you get the visualization code to fail more gracefully for this case instead of looping endlessly? I feel like it should ideally proceed with producing the visualization and just report that one of the rooms could not be rendered.
Gotcha. I had been using like 2 ft. I was struggling to get it to work, so I increased it to see whether anything changed. I think my issue was mainly with me not creating the selection set right in revit though. I tried making two separate align lines for either side of the bathrooms and column there, so it wouldnāt collapse. Iām not sure why the walls are difference right there from the rest of the floor. Thanks @chriswmackey .
Hmm. Thatās strange! @crduggin, if you can send us the input files, we can recreate the case on our end and tell you whatās happening. I know that you sent me the Revit file, but it is easier if you can send us the temp files that are generated on your end. From the screenshot, I can see that @chriswmackey is getting a much better results on his end.
If you run the visualization command and check the logs you should see a command that starts with "C:\Program Files\pollination_revit\python\Scripts\dragonfly.exe" edit align. The full command will look like something like this one.