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

Use Set method insted of On and Off method #2769

Closed
1 task done
tkoyama010 opened this issue Jun 11, 2022 · 2 comments · Fixed by #3001
Closed
1 task done

Use Set method insted of On and Off method #2769

tkoyama010 opened this issue Jun 11, 2022 · 2 comments · Fixed by #3001
Labels
good first issue 🍏 low-hanging-fruit A great issue for first time contributors to get their hands dirty maintenance Low-impact maintenance activity

Comments

@tkoyama010
Copy link
Member

Describe what maintenance you would like added.

Some code uses VTK's *On() and *Off() methods (ex: QuadsOn() and QuadsOff() in vtkTessellatedBoxSource class). These generally implement a method called Set*() (ex: SetQuads()), which can be refactored to avoid using if statements.

Inspired by @adeak in #2767 (comment)

Links to source code.

You can find it by running grep "On()" ./pyvista/*/*.py in root path. For example:

if quads:
src.QuadsOn()
else:
src.QuadsOff()

Pseudocode or Screenshots

 src.SetQuads(quads)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tkoyama010 tkoyama010 added maintenance Low-impact maintenance activity good first issue labels Jun 11, 2022
@banesullivan banesullivan added the 🍏 low-hanging-fruit A great issue for first time contributors to get their hands dirty label Jun 27, 2022
@RobPasMue
Copy link
Contributor

I'll be handling this issue if possible :)

@tkoyama010
Copy link
Member Author

@RobPasMue Awesome! Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue 🍏 low-hanging-fruit A great issue for first time contributors to get their hands dirty maintenance Low-impact maintenance activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants