|
3 | 3 | from typing import Optional |
4 | 4 | from typing import Union |
5 | 5 |
|
6 | | -from compas.geometry import Line |
7 | 6 | from compas_ags.diagrams import Diagram |
8 | 7 | from compas_ags.diagrams import FormGraph |
9 | 8 |
|
@@ -113,9 +112,7 @@ def leaves(self) -> list[int]: |
113 | 112 | # edges |
114 | 113 | # -------------------------------------------------------------------------- |
115 | 114 |
|
116 | | - def edges( |
117 | | - self, data: bool = False |
118 | | - ) -> Generator[Union[tuple[int, int], tuple[tuple[int, int], dict]], None, None]: |
| 115 | + def edges(self, data: bool = False) -> Generator[Union[tuple[int, int], tuple[tuple[int, int], dict]], None, None]: |
119 | 116 | """Edge iterator automatically discarding mesh edges that are not relevant in AGS. |
120 | 117 |
|
121 | 118 | Parameters |
@@ -188,9 +185,7 @@ def edge_forcedensity( |
188 | 185 |
|
189 | 186 | return self.edge_attribute(edge, "q", q) |
190 | 187 |
|
191 | | - def edge_force( |
192 | | - self, edge: Union[tuple[int, int], int], force: Optional[float] = None |
193 | | - ) -> float: |
| 188 | + def edge_force(self, edge: Union[tuple[int, int], int], force: Optional[float] = None) -> float: |
194 | 189 | """Get or set the force in an edge. |
195 | 190 |
|
196 | 191 | Parameters |
@@ -235,9 +230,7 @@ def fixed(self) -> list[int]: |
235 | 230 | return list(self.vertices_where(is_fixed=True)) |
236 | 231 |
|
237 | 232 | def constrained(self) -> list[int]: |
238 | | - return [ |
239 | | - vertex for vertex, attr in self.vertices(True) if attr["cx"] or attr["cy"] |
240 | | - ] |
| 233 | + return [vertex for vertex, attr in self.vertices(True) if attr["cx"] or attr["cy"]] |
241 | 234 |
|
242 | 235 | def constraints(self) -> tuple[float, float]: |
243 | 236 | cx = self.vertices_attribute("cx") |
|
0 commit comments