BlockResearchGroup / compas_tna

Form finding of funicular networks in compression with vertical loads using Thrust Network Analysis
https://blockresearchgroup.github.io/compas_tna
MIT License
13 stars 9 forks source link

ForceDiagram.ordered_edges() ignores FormDiagram's edges' 'is_true' attributes #13

Closed tkmmark closed 4 years ago

tkmmark commented 4 years ago

ForceDiagram.ordered_edges() ignores FormDiagram's edges' 'is_true' attributes

Suggest changing edges = [index_uv[index] for index in range(self.number_of_edges())] to n_form_true_edges = len(list(form.edges_where({'is_edge': True}))) edges = [index_uv[index] for index in range(n_form_true_edges)]

tomvanmele commented 4 years ago

as far as i can tell the code is correct. it is not the number of edges in the form diagram that matters in this context but rather the number of edges in the force diagram, and this is number can be counted correctly with self.number_of_edges().

the is_true flag is used correctly in the uv_index function to enumerate the true edges of the form diagram.

can you give an example of where this doesn't work as expected?

tomvanmele commented 4 years ago

can i close this?