From 2d9fa20feee7b036d35ad489374384c30e778825 Mon Sep 17 00:00:00 2001 From: Joseph Kenny Date: Tue, 6 Feb 2024 09:57:57 +0100 Subject: [PATCH 1/5] Update sequencer.py Updating sequencer.py SimpleSequenceGenerator() to work with standard assemblies, and if instanceis TimberAssembly steps are created from beam elements. But if instance is Assembly steps are created from assembly parts --- src/compas_timber/planning/sequencer.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/compas_timber/planning/sequencer.py b/src/compas_timber/planning/sequencer.py index 49288d4ee..1a80dacae 100644 --- a/src/compas_timber/planning/sequencer.py +++ b/src/compas_timber/planning/sequencer.py @@ -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): @@ -268,7 +269,7 @@ class SimpleSequenceGenerator(object): Parameters ---------- - assembly : :class:`compas_timber.assembly.TimberAssembly` + assembly : :class:`compas_timber.assembly.TimberAssembly` or :class:'compas.datastructures.Assembly' Assembly to be sequenced. Attributes @@ -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 From 4dae00e626d79fb3a9d33de081b29f78b1dcab8b Mon Sep 17 00:00:00 2001 From: Joseph Kenny Date: Tue, 6 Feb 2024 10:15:16 +0100 Subject: [PATCH 2/5] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5385414c..cb4d2b06b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,8 @@ 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. +* `SimpleSequenceGenerator` updated to work with `compas.datastructures.assembly` and generates building plan acording to type. ### Removed From 5fe2bbd29101c7831ebaf48faf52aaddc317cd59 Mon Sep 17 00:00:00 2001 From: Joseph Kenny Date: Tue, 6 Feb 2024 14:33:10 +0100 Subject: [PATCH 3/5] Update sequencer.py update annotation to to just compas.datastructures.Assembly --- src/compas_timber/planning/sequencer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compas_timber/planning/sequencer.py b/src/compas_timber/planning/sequencer.py index 1a80dacae..8d17717d4 100644 --- a/src/compas_timber/planning/sequencer.py +++ b/src/compas_timber/planning/sequencer.py @@ -269,7 +269,7 @@ class SimpleSequenceGenerator(object): Parameters ---------- - assembly : :class:`compas_timber.assembly.TimberAssembly` or :class:'compas.datastructures.Assembly' + assembly : :class:'compas.datastructures.Assembly' Assembly to be sequenced. Attributes From 168fb6e3bfabd054742b717a833c231ac2a620fd Mon Sep 17 00:00:00 2001 From: obucklin Date: Tue, 6 Feb 2024 15:15:59 +0100 Subject: [PATCH 4/5] updated GH component categories --- .../ghpython/components/CT_Assembly/metadata.json | 2 +- .../ghpython/components/CT_Attributes_Set/metadata.json | 4 ++-- src/compas_timber/ghpython/components/CT_BTLx/metadata.json | 2 +- .../ghpython/components/CT_Joint_Rule_Category/metadata.json | 2 +- .../ghpython/components/CT_Joint_Rule_Direct/metadata.json | 4 ++-- .../ghpython/components/CT_Joint_Rule_Topology/metadata.json | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compas_timber/ghpython/components/CT_Assembly/metadata.json b/src/compas_timber/ghpython/components/CT_Assembly/metadata.json index caaaf882f..0d1ef44d1 100644 --- a/src/compas_timber/ghpython/components/CT_Assembly/metadata.json +++ b/src/compas_timber/ghpython/components/CT_Assembly/metadata.json @@ -4,7 +4,7 @@ "category": "COMPAS Timber", "subcategory": "Assembly", "description": "Creates an Assembly", - "exposure": 4, + "exposure": 2, "ghpython": { "isAdvancedMode": true, "iconDisplay": 0, diff --git a/src/compas_timber/ghpython/components/CT_Attributes_Set/metadata.json b/src/compas_timber/ghpython/components/CT_Attributes_Set/metadata.json index ebb89e928..3960cc4f3 100644 --- a/src/compas_timber/ghpython/components/CT_Attributes_Set/metadata.json +++ b/src/compas_timber/ghpython/components/CT_Attributes_Set/metadata.json @@ -38,14 +38,14 @@ "description": "Category.", "typeHintID": "str", "scriptParamAccess": 1 - }, + }, { "name": "update", "description": "Set to True to apply. Nothing happens if None or False.", "typeHintID": "bool", "scriptParamAccess": 0 } - + ], "outputParameters": [ diff --git a/src/compas_timber/ghpython/components/CT_BTLx/metadata.json b/src/compas_timber/ghpython/components/CT_BTLx/metadata.json index 27ed5f1dc..8dcbacdf2 100644 --- a/src/compas_timber/ghpython/components/CT_BTLx/metadata.json +++ b/src/compas_timber/ghpython/components/CT_BTLx/metadata.json @@ -2,7 +2,7 @@ "name": "WriteBTLx", "nickname": "WriteBTLx", "category": "COMPAS Timber", - "subcategory": "Utils", + "subcategory": "Fabrication", "description": "Writes a BTLx file for machining of assembly parts.", "exposure": 4, "ghpython": { diff --git a/src/compas_timber/ghpython/components/CT_Joint_Rule_Category/metadata.json b/src/compas_timber/ghpython/components/CT_Joint_Rule_Category/metadata.json index e1a6f1fc2..3ad908ae7 100644 --- a/src/compas_timber/ghpython/components/CT_Joint_Rule_Category/metadata.json +++ b/src/compas_timber/ghpython/components/CT_Joint_Rule_Category/metadata.json @@ -2,7 +2,7 @@ "name": "Category Joints Rules ", "nickname": "JointsByCategory", "category": "COMPAS Timber", - "subcategory": "Joints", + "subcategory": "Joint Rules", "description": "Defines which Joint type will be applied in the Automatic Joints component for connecting Beams with the given Category attributes. This overrides Topological Joint rules and is overriden by Direct joint rules", "exposure": 2, "ghpython": { diff --git a/src/compas_timber/ghpython/components/CT_Joint_Rule_Direct/metadata.json b/src/compas_timber/ghpython/components/CT_Joint_Rule_Direct/metadata.json index b3c9838d8..0d2087689 100644 --- a/src/compas_timber/ghpython/components/CT_Joint_Rule_Direct/metadata.json +++ b/src/compas_timber/ghpython/components/CT_Joint_Rule_Direct/metadata.json @@ -2,9 +2,9 @@ "name": "Direct Joint Rules", "nickname": "DirectJoints", "category": "COMPAS Timber", - "subcategory": "Joints", + "subcategory": "Joint Rules", "description": "Generates a direct joint between two beams. This overrides other joint rules.", - "exposure": 4, + "exposure": 2, "ghpython": { "isAdvancedMode": true, "iconDisplay": 0, diff --git a/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology/metadata.json b/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology/metadata.json index 7a33e95ba..7296d4edf 100644 --- a/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology/metadata.json +++ b/src/compas_timber/ghpython/components/CT_Joint_Rule_Topology/metadata.json @@ -2,7 +2,7 @@ "name": "Topological Joint Rules", "nickname": "JointsByTopo", "category": "COMPAS Timber", - "subcategory": "Joints", + "subcategory": "Joint Rules", "description": "makes rules to apply joint types for each topology type.", "exposure": 2, "ghpython": { From 718abf6879e5a7c032daabbec1d7af449d0f4a86 Mon Sep 17 00:00:00 2001 From: obucklin Date: Tue, 6 Feb 2024 15:23:30 +0100 Subject: [PATCH 5/5] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b40eed394..b0c158e8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * `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. +* Changed GH Categories for joint rules ### Removed