BHoM_Engine
BHoM_Engine copied to clipboard
Structure_Engine: MergePanels
Description:
Merge Structure.Panel (and/or any IPanel) which are coplanar, contiguous, and share a property into a single panel with the same property.
- [x] Write basic geometrical method which takes a list of
IPanels, boolean unions the external edges and openings (separately), and outputs a list of (nominally fewer)IPanels(?) with no property assigned. - [x] Write method which takes a list of panels, groups them by property, and calls the basic method on each group, assigning the property to the merged panels.
- [ ] implement HasMergeablePropertiesWith in order to compare properties
- [ ] Extend the method to optionally consider fragments and custom data as well as the surface property.
Is this actually a promotion, or can I just make a new method IMergePanels() which takes IElement2D and calls environment merge or structure merge based on the type of the panel? (Also need to create the structure merge)
This has been discussed at great length before, and the conclusion has always been that the different meta data on panels between disciplines is too diverse for one method to reliably cover all the cases of merging properties. It was also agreed that the time taken to make that work vs the time taken to add merge methods appropriate to each discipline engines when required was not suitable to put resource on.
I would be against having an IMergePanels method which takes in IElement2D on the basis that all Panels are IElement2D but not all IElement2D are panels. I would advise we go for either an IMerge method which takes IElement2D or IMergePanels which take in an Analytical IPanel instead. If we go for the latter, we should put it in the Analytical Engine rather than the spatial one.
Not sure I agree on the conclusion, said discussions were documented more generally in this issue But if the first thing we need to do is write MergePanels() for Structure.Panel, then I'm happy to change this issue to relate to Structure_Engine, and start writing based on that assumption.