|
1 | | -from typing import Generator |
| 1 | +# from typing import Generator |
2 | 2 | from typing import Optional |
3 | 3 |
|
4 | 4 | from compas.datastructures import Graph |
5 | 5 | from compas_model.elements import Element # noqa: F401 |
6 | | -from compas_model.interactions import Interaction # noqa: F401 |
7 | 6 |
|
8 | 7 | # Ideally, graph (and mesh) are rewritten to use dedicated classes for nodes and edges. |
9 | 8 | # This will allow more fine-grained control over the (types of) attributes added to nodes and edges. |
@@ -113,29 +112,29 @@ def node_element(self, node: int) -> Element: |
113 | 112 | """ |
114 | 113 | return self.node_attribute(node, "element") # type: ignore |
115 | 114 |
|
116 | | - def edge_interactions(self, edge: tuple[int, int]) -> list[Interaction]: |
117 | | - """Get the element associated with the node. |
| 115 | + # def edge_interactions(self, edge: tuple[int, int]) -> list[Interaction]: |
| 116 | + # """Get the element associated with the node. |
118 | 117 |
|
119 | | - Parameters |
120 | | - ---------- |
121 | | - edge : tuple[int, int] |
122 | | - The identifier of the edge. |
| 118 | + # Parameters |
| 119 | + # ---------- |
| 120 | + # edge : tuple[int, int] |
| 121 | + # The identifier of the edge. |
123 | 122 |
|
124 | | - Returns |
125 | | - ------- |
126 | | - :class:`compas_model.interactions.Interaction` |
| 123 | + # Returns |
| 124 | + # ------- |
| 125 | + # :class:`compas_model.interactions.Interaction` |
127 | 126 |
|
128 | | - """ |
129 | | - return self.edge_attribute(edge, "interactions") # type: ignore |
| 127 | + # """ |
| 128 | + # return self.edge_attribute(edge, "interactions") # type: ignore |
130 | 129 |
|
131 | | - def interactions(self) -> Generator[Interaction, None, None]: |
132 | | - """Get the interactions in the graph. |
| 130 | + # def interactions(self) -> Generator[Interaction, None, None]: |
| 131 | + # """Get the interactions in the graph. |
133 | 132 |
|
134 | | - Yields |
135 | | - ------ |
136 | | - :class:`compas_model.interactions.Interaction` |
| 133 | + # Yields |
| 134 | + # ------ |
| 135 | + # :class:`compas_model.interactions.Interaction` |
137 | 136 |
|
138 | | - """ |
139 | | - for edge in self.edges(): |
140 | | - for interaction in self.edge_interactions(edge): |
141 | | - yield interaction |
| 137 | + # """ |
| 138 | + # for edge in self.edges(): |
| 139 | + # for interaction in self.edge_interactions(edge): |
| 140 | + # yield interaction |
0 commit comments