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 rotation_axis arg to extrude_rotate method #2791

Merged
merged 23 commits into from
Jun 17, 2022
Merged

Conversation

tkoyama010
Copy link
Member

@tkoyama010 tkoyama010 commented Jun 14, 2022

Overview

Add rotation_axis arg to extrude_rotate method.

import pyvista


pyvista.set_plot_theme("document")

resolution = 4
line = pyvista.Line(pointa=(0, 0, 0), pointb=(1, 0, 0))
line.clear_data()

rotation_axis = (0, 0, 1)
poly1 = line.extrude_rotate(rotation_axis=(0, 0, 1))
rotation_axis = (0, 1, 0)
poly2 = line.extrude_rotate(rotation_axis=(0, 1, 0))

pl = pyvista.Plotter(shape=(1, 2))

pl.subplot(0, 0)
pl.add_text("rotation_axis = (0, 0, 1)")
pl.add_mesh(poly1, show_edges=True)
pl.show_axes()

pl.subplot(0, 1)
pl.add_text("rotation_axis = (0, 1, 0)")
pl.add_mesh(poly2, show_edges=True)
pl.show_axes()

pl.show(screenshot="test.png")

test

resolves #2786

Details

@github-actions github-actions bot added the enhancement Changes that enhance the library label Jun 14, 2022
@tkoyama010 tkoyama010 marked this pull request as ready for review June 15, 2022 04:41
@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #2791 (7387f4b) into main (a3d0351) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2791      +/-   ##
==========================================
- Coverage   93.97%   93.92%   -0.06%     
==========================================
  Files          76       76              
  Lines       16320    16331      +11     
==========================================
+ Hits        15337    15339       +2     
- Misses        983      992       +9     

@tkoyama010 tkoyama010 closed this Jun 15, 2022
@tkoyama010 tkoyama010 reopened this Jun 15, 2022
@tkoyama010
Copy link
Member Author

This feature is currently only available in vtk==9.1.0.

tests/test_filters.py Outdated Show resolved Hide resolved
tests/test_filters.py Outdated Show resolved Hide resolved
@tkoyama010 tkoyama010 changed the title Add rotation_axis arg to extrude_rotate method Add rotation_axis arg to extrude_rotate method Jun 15, 2022
pyvista/core/filters/poly_data.py Outdated Show resolved Hide resolved
pyvista/core/filters/poly_data.py Outdated Show resolved Hide resolved
tkoyama010 and others added 4 commits June 15, 2022 23:12
Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
tests/test_filters.py Outdated Show resolved Hide resolved
tests/test_filters.py Outdated Show resolved Hide resolved
tests/test_filters.py Outdated Show resolved Hide resolved
tests/test_filters.py Outdated Show resolved Hide resolved
pyvista/core/filters/poly_data.py Outdated Show resolved Hide resolved
pyvista/core/filters/poly_data.py Outdated Show resolved Hide resolved
tests/test_filters.py Outdated Show resolved Hide resolved
tkoyama010 and others added 2 commits June 17, 2022 04:24
Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
tests/test_filters.py Outdated Show resolved Hide resolved
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.

LGTM

@tkoyama010
Copy link
Member Author

Suggest merging on 2022/06/18.

@tkoyama010 tkoyama010 merged commit 6301be8 into main Jun 17, 2022
@tkoyama010 tkoyama010 deleted the feat/rotation_axis branch June 17, 2022 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes that enhance the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add rotation_axis arg to extrude_rotate method
2 participants