Skip to content
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

Update sequencer.py #208

Merged
merged 4 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

* `BeamFromCurve` GH component accepts now referenced Rhino curves, referenced Rhino object IDs and internalized lines.
* `BeamFromCurve` GH component accepts now referenced Rhino curves, referenced Rhino object IDs and internalized lines.
* `BeamFromCurve` GH component accepts now referenced Rhino curves, referenced Rhino object IDs and internalized lines.
* Fixed `FeatureError` when L-Butt applies the cutting plane.
* Fixed T-Butt doesn't get extended to cross beam's plane.
* `SimpleSequenceGenerator` updated to work with `compas.datastructures.assembly` and generates building plan acording to type.

### Removed

Expand Down
11 changes: 8 additions & 3 deletions src/compas_timber/planning/sequencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from compas.data import json_dump
from compas.data import json_load
from compas.geometry import Frame
from compas_timber.assembly import TimberAssembly


class Actor(object):
Expand Down Expand Up @@ -268,7 +269,7 @@ class SimpleSequenceGenerator(object):

Parameters
----------
assembly : :class:`compas_timber.assembly.TimberAssembly`
assembly : :class:'compas.datastructures.Assembly'
Assembly to be sequenced.

Attributes
Expand All @@ -283,7 +284,11 @@ def __init__(self, assembly):

@property
def result(self):
if isinstance(self.assembly, TimberAssembly):
parts = self.assembly.beams
else:
parts = self.assembly.parts()
plan = BuildingPlan()
for beam in self.assembly.beams:
plan.add_step(Step(element_ids=[beam.key], actor=Actor.HUMAN, location=beam.frame))
for part in parts:
plan.add_step(Step(element_ids=[part.key], actor=Actor.HUMAN, location=part.frame))
return plan
Loading