question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add plane object to plotter

See original GitHub issue

Describe the feature you would like to be added.

I would like to have an add_planes method in the pyvista.Plotter object to add pyvista.Plane objects to the plotter.

I was able to use the add_planes_widget, but I only want the plane itself and not the entire widget.

Links to VTK Documentation, Examples, or Class Definitions.

NA

Pseudocode or Screenshots

import pyvista as pv
pl = pv.Plotter()
plane = pv.Plane(center, normal)
pl.add_planes(plane)
pl.show()

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
MatthewFlammcommented, Dec 8, 2022

My opinion is that we should not add these functions. It would be never ending. I would prefer to only have these helper functions that help cut through the mess that is the function signature of add_mesh. For example, add_points forces the user to select one style that renders points.

https://docs.pyvista.org/api/plotting/_autosummary/pyvista.Plotter.add_points.html

add_plane would have no such benefit that I can see, but I’m open to hear if there are benefits here. A pv.Plane object is just a normal DataSet.

However, this issue highlights that we could do a better job in the documentation to describe the difference between add_points and add_mesh, i.e. add_points is a helper and only a thin wrapper around add_mesh. This also applies to the other wrappers.

5reactions
tkoyama010commented, Dec 8, 2022

@AlejandroFernandezLuces Good point. My only concern is that the number of methods will grow indefinitely. For example, for Shere, we would need add_sphere. We need to add methods to use each object under geometoric_objects.py at least.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add plane object to plotter - PullAnswer
I would like to have an add_planes method in the pyvista.Plotter object to add pyvista.Plane objects to the plotter.
Read more >
pyvista.Plotter — PyVista 0.37.0 documentation
Plotting object to display vtk meshes or numpy arrays. Parameters: off_screenbool, optional. Renders off screen when True ...
Read more >
CPM 3D Plotter - CPM Educational Program
In the middle you will see the 3D axes with the XY grid shown. Click and drag anywhere to rotate the axes. You...
Read more >
Points, Lines & Planes in Space - CalcPlot3D Help - LibreTexts
Select to add a Point (x, y, z), entering the coordinates of one of the points. ... Rotate the plot to verify that...
Read more >
Model FROM PHOTOS in Blender with Perspective Plotter!
In this video, learn to use the Blender Add -On Perspective Plotter to set up your camera perspective to use photos for reference...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found