-
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
BHoM_Engine: Design the representation system #2288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to have a quick chat on this
/***************************************************/ | ||
|
||
[Description("Returns the geometrical representation of the curve, which is a Pipe.")] // the pipe radius corresponds to how big the Curve is when represented. | ||
public static GeometricalRepresentation Representation(this ICurve curve, ElementRepresentationOptions options = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following comments here also: https://github.com/BHoM/BHoM/pull/1179/files
Might separate the two problems of Colouring/Rendering/Text etc. as a Graphics question.
And the Geometry question of - do you want to return 1D, 2D or 3D to represent the object.
A simple approach could then be to have for IElements - a common method which returns 3D geometry. Unifying Extrude methods etc.
The parent method could then also check inside Fragments as a fall back - for the case where user wants to store solid geometry representation.
Will be good to focus on this a primary example as immediately useful.
Suggestions from initial review of code for BHoM/BHoM#1179 and associated PRs to help potentially simplify. I would do this work in a couple of phases - which I think will unblock and simplify reviews and also mean we can start using some features sooner. As mentioned in my comment above - would separate the three tasks of: 1. Graphical Entities 2. Extraction of 3D Geometry As also commented above - this approach will allow implementation of a fall back to look for the specific mesh representation fragment when calling IGeometry3D. (really useful for attaching meshes etc on object for revit workflows etc.) 1 and 2. then become simpler and are already hugely useful. The IGeometry3D() method on its own is needed also to generalise at scale the IsContaining method in 3D for all IElements and our Spatial Specs. So good to decouple fully from representation work. 3. IRepresentation @alelom @rolyhudson @IsakNaslundBh - what do you think of above comments? |
@al-fisher I had a quick chat with @IsakNaslundBh and I think that breakdown aligns with our discussion too. @alelom and I have been nudging this forward and today I have focused in on 1 above. Working from the perspective of 3 use cases:
I have added test scripts for the 3 ucs and some initial results below. Also solid surfaces looking a little murky in the floors image as I think we need to allow control of transparency as currently defaults to previous hardcoded 0.6! |
@al-fisher Nothing to add really, as @rolyhudson alluded to in his comment. 100% agree with that strategy, and breakdown of 3 individual tasks that touch on the same subject but can be done in the order you have outlined above. So big +1 from me on your comment! 👍 |
Closed as replaced by BHoM/BHoM#1190 and #2304 |
NOTE: Depends on
BHoM/BHoM#1179
Issues addressed by this PR
Closes #2288
Test files
Changelog
Additional comments