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

add truss example #1683

Merged
merged 1 commit into from Sep 23, 2021
Merged

add truss example #1683

merged 1 commit into from Sep 23, 2021

Conversation

akaszynski
Copy link
Member

Add the truss example created in pyvista/pyvista-support#494 to our gallery.

@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #1683 (e59b0a1) into main (9d05d4d) will not change coverage.
The diff coverage is n/a.

❗ Current head e59b0a1 differs from pull request most recent head 66684f7. Consider uploading reports for the commit 66684f7 to get more accurate results

@@           Coverage Diff           @@
##             main    #1683   +/-   ##
=======================================
  Coverage   92.59%   92.59%           
=======================================
  Files          71       71           
  Lines       13864    13864           
=======================================
  Hits        12838    12838           
  Misses       1026     1026           

Copy link
Contributor

@MatthewFlamm MatthewFlamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, some whitespace, and some minor suggestions.


Plot connections between points in 3D as cylinders, colored by scalars.


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

[4.0, 1.0, 2.0],
[4.0, 3.0, 2.0]
]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 29 is also blank.


mesh = pyvista.PolyData(nodes, edges_w_padding)

colors = range(edges.shape[0])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colors is a bit confusing as it isn't directly a color, what about edge_id? You also use edges.shape[0] twice, you could define it above for reuse.

[2, 6],
])

# We must "pad" the edges to indicate to vtk how many points per edge
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

points or nodes here? I'm not sure. It might be a good place to point out quickly why the padding is necessary, or maybe link to the PolyData class where it is explained more?

@akaszynski akaszynski merged commit 946871b into main Sep 23, 2021
@akaszynski akaszynski deleted the doc/example_truss branch September 23, 2021 21:00
@akaszynski
Copy link
Member Author

akaszynski commented Sep 23, 2021

Sorry @MatthewFlamm, I saw it was green on the cli and didn't think to check for comments. I'll create a follow up PR tonight with these incorporated.

@tkoyama010 tkoyama010 added the documentation Anything related to the documentation/website label Oct 13, 2021
@akaszynski akaszynski mentioned this pull request Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Anything related to the documentation/website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants