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

assignment_05 #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8,358 changes: 8,358 additions & 0 deletions lecture_06/assignment_05/frederick_kim/assembly.json

Large diffs are not rendered by default.

Binary file not shown.
10,116 changes: 10,116 additions & 0 deletions lecture_06/assignment_05/frederick_kim/assignment_05.ghx

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions lecture_06/assignment_05/frederick_kim/helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from functools import partial

import compas_rhino

from compas.utilities import color_to_colordict

colordict = partial(color_to_colordict, colorformat='rgb', normalize=False)

def draw_directed_edges(artist, edges=None, color=None):
node_xyz = artist.node_xyz
edges = edges or list(artist.network.edges())
edge_color = colordict(color, edges, default=artist.color_edges)
lines = []
for edge in edges:
lines.append({
'start': node_xyz[edge[0]],
'end': node_xyz[edge[1]],
'color': edge_color[edge],
'arrow': 'end',
'name': "{}.edge.{}-{}".format(artist.network.name, *edge)})
return compas_rhino.draw_lines(lines, layer=artist.layer, clear=False, redraw=False)

Binary file not shown.