-
Notifications
You must be signed in to change notification settings - Fork 3
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
Big clean up (through a PR, as requested) #29
Conversation
I reviewed the last clean-up. |
i think we should wait because it is not yet clear t me what to do with the geometry of the elements |
def __init__(self, model: compas_model.model.Model, **kwargs): | ||
super().__init__(item=model, **kwargs) | ||
self.model = model | ||
self.show_hierarchy = False |
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.
What would be the most basic visualization of interactions applicable to all elements, regardless of interaction type?
Cases:
a) When visualizing a pair of elements, they are colored.
b) However, how would you display adjacencies between multiple or all elements (without using a form)? I often need to check visually what the collider detected and to which elements, specially when dealing with different tolerances.
This question pertains to the interaction attribute of the model class.
|
||
def __init__(self, name=None, value=None): | ||
# type: (str | None, object | None) -> None | ||
def __init__(self, name=None): |
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.
What would be the mechanism behind to carry information other than name and indices of the interface?
Would you need to implement your own class that inherits interface with attributes you need?
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.
not sure i understand what you mean. can you give a concrete example?
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.
One example I had:
- I define interfaces through collision detection.
- then add interfaces with a pair of "features" at the interface level
- lastly I add geometry from the detected interface to the individual element features.
src/compas_model/model/model.py
Outdated
print("=" * 80) | ||
def element_worldtransformation(self, element): | ||
# type: (Element) -> compas.geometry.Transformation | ||
"""Compute the element transformation to hte world coordinate system |
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.
Typo: hte -> the.
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.
What would be the simplest example to use element_worldtransformation
?
attr.update(kwargs) | ||
attr["name"] = name | ||
super(GroupNode, self).__init__(**attr) | ||
self._frame = frame |
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.
If setter and getter, sets and gets the same frame, why not to make the frame property simply public?
self.frame = frame
If this is not meant to be public, then maybe WorldXY is the default value as your wrote in the model?
@property
def frame(self):
# type: () -> compas.geometry.Frame
if not self._frame:
self._frame = Frame.worldXY()
return self._frame
print("Element Groups") | ||
print("=" * 80) | ||
print("n/a") | ||
print("=" * 80) | ||
|
||
# ============================================================================= | ||
# Attributes |
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.
Where is the frame assigned? I see only getter:
@property
def frame(self):
# type: () -> compas.geometry.Frame
if not self._frame:
self._frame = Frame.worldXY()
return self._frame
What type of change is this?
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CHANGELOG.md
file in theUnreleased
section under the most fitting heading (e.g.Added
,Changed
,Removed
).invoke test
).invoke lint
).compas.datastructures.Mesh
.