compas_model update - #454
Conversation
…legacy 'interactions'
…cases for Processings
…into compas_model_update
remove beam.transformation
…into compas_model_update
|
@obucklin @chenkasirer The elephant is ready for review again..! Don't get scared by the 7000+ lines of code changes, at least 6000 of those are from the new json and btlx files that we store for testing. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
||
| @property | ||
| def blank(self): | ||
| """The blank of the beam in model space.""" |
There was a problem hiding this comment.
so this is shape + extensions, right? I'd make it clear in the docstring. btw property docstrings go in the class docstrings in the Attributes section
| return cls(**data) | ||
|
|
||
| @reset_computed | ||
| def _reset_computed_dummy(self): |
There was a problem hiding this comment.
is this for testing? should it be removed?
| The origin is at the bottom far corner of the element. | ||
| The ref_frame is always in model coordinates. | ||
| """ | ||
| return Frame(self.blank.points[1], Vector.from_start_end(self.blank.points[1], self.blank.points[2]), Vector.from_start_end(self.blank.points[1], self.blank.points[7])) |
There was a problem hiding this comment.
we should cache blank ref_frame or probably both, these will be called a lot
| # Override the base method to also reset computed properties of elements | ||
| super().transform(transformation) | ||
| for element in self.elements(): | ||
| element.reset_computed_properties() |
There was a problem hiding this comment.
note to future us: I guess here all computed geometries are gonna invalidate making transforming the entire model a very expensive operation. if the cached geometries are all some how in local space, then the only thing that needs to be re-applied are the new transformations, which is a much less expensive process, as you'd expect it to be.

This PR is an attempt to align with the current development of compas_model. It removes the old version pin (now set to the latest), refactors affected parts for compatibility, and adapts to recent API changes.
What type of change is this?
Checklist
Put an
xin 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.mdfile in theUnreleasedsection under the most fitting heading (e.g.Added,Changed,Removed).invoke test).invoke lint).compas_timber.datastructures.Beam.