-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Common_Engine: Centralise methods for IElementXD's #1262
Comments
@rwemay I am not sure if I understand your idea. An enum argument corresponding with the discipline could be a nice way to feed the info about expected object type, but this would need to be added in the BHoM first. I imagine we have reasons not to have it until now, @al-fisher @IsakNaslundBh @FraserGreenroyd? By the way, wasn't Common meant to be removed/replaced (vide discussion #1204)? |
@rwemay get what you are after, and agree this needs to happen for as much as possible, at least for Query/Modify/Compute methods. Think this is a no-brainer that just need to get done when someone has time to go through and fix it all. This can be either with the IElement interface or the various IAnalytical interfaces (IPanel, ILink, INode etc) depending on what is more suitable for the case. Think Create will be trickier though. As highlighted by @pawelbaran, we can not initial interface types (be it IPanel or IElement). The two options of helping with this I can think of are:
And regarding you last point for list management, I would agree. Would like to have a generic AddToListProperty as well as ClearListProperty method in the reflection engine. Would remove the AddOpening type of method all in all (as not needed in the code at all). |
This adds openings based on an algorithm of working out which openings sit on which panel, rather than setting the property of an individual panel. |
@FraserGreenroyd do you use the Not sure if applicable in that particular case, but it is quite powerful and robust. I believe it would be good to wrap all panel constructors and opening assignment around it, both in the BHoM_Engine as well as in interop packages in order to provide similar behaviour for all - what do you think? |
Description:
We have several duplicate methods in different discipline/repo's for creating elements (e.g. IElement2D panels). Would be great to centralise some of these in the Engine (is Common the right place - or are we moving IElement methods?). As a starter for 10:
IElement2D
Thoughts/comments appreciated!
The text was updated successfully, but these errors were encountered: