-
Notifications
You must be signed in to change notification settings - Fork 27
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
FreeContour
BTLxProcessing
#382
base: main
Are you sure you want to change the base?
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.
left some comments.
if @papachap can have a look it would be great
# create subprocessing elements | ||
if self.subprocessings: | ||
for subprocessing in self.subprocessings: | ||
processing_element.append(self._create_processing(subprocessing)) |
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.
as BTLxWriter_create_processing()
gets removed, recursively call create_processing
here.
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.
@papachap can you confirm that this works as currently written? is there a processing we could test this on?
I responded to @chenkasirer s comments. Will wait for @papachap :-) |
added test, removed writer._create_part
@@ -155,8 +155,8 @@ def _create_project_element(self, model): | |||
# create parts element | |||
parts_element = ET.SubElement(project_element, "Parts") | |||
# create part elements for each beam | |||
for i, beam in enumerate(model.beams): # TODO: we need to add at least Plates to this too. | |||
part_element = self._create_part(beam, i) | |||
for i, element in enumerate(list(model.beams) + list(model.plates)): |
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.
maybe update the _create_part()
method as well to accept an element instead of a beam and adjust the docstring.
processings : list | ||
A list of the processings applied to the beam. | ||
et_element : :class:`~xml.etree.ElementTree.Element` | ||
The ET element of the BTLx part. | ||
|
||
""" | ||
|
||
def __init__(self, beam, order_num): | ||
self.beam = beam | ||
def __init__(self, element, order_num): |
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.
Please update the docstring accordingly.
) | ||
# create parameter subelements | ||
for key, value in self.params_dict.items(): | ||
print(key, value) |
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.
remove print
@@ -177,7 +193,7 @@ def compute_aabb(self, inflate=0.0): | |||
box.zsize += inflate | |||
return box | |||
|
|||
def compute_obb(self, inflate=0.0): | |||
def compute_obb(self): |
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.
update docstring
This adds the
FreeContour
BTLx Processing and updates thePlate
element to function as a BTLx Part. ThePlate.geometry
is now created withFreeContour
(and other) processings. TheSurfaceModel
andSurfaecModel.Window
have been updated to generateFreeContour
features and output BTLx files with all elements.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_timber.datastructures.Beam
.