File: geometric.rst

package info (click to toggle)
python-pyvista 0.46.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176,968 kB
  • sloc: python: 94,346; sh: 216; makefile: 70
file content (107 lines) | stat: -rw-r--r-- 3,087 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.. _geometry_api:

Geometry
--------
PyVista includes several functions to generate simple geometric
objects. The API reference for these functions is on this page. For
additional details see :ref:`create_geometric_objects_example` example.

PyVista provides both geometric objects and geometric sources. These two types
serve similar but distinct purposes. Both allow you to create various types of
geometry, but they differ mainly in their level of abstraction and usage
scenarios.

If you are looking for an easy and Pythonic way to generate geometric shapes,
PyVista's geometric objects may be more appropriate. If you need more control
over the geometry or are building a complex VTK pipeline, then using geometric
sources would be more suitable.


Geometric Objects
~~~~~~~~~~~~~~~~~
* High-Level Abstraction: Geometric objects like Box, Circle, Arrow, etc., in
  PyVista are high-level Pythonic wrappers around VTK's underlying geometric
  constructs. They provide a more user-friendly way to create geometries and
  might include additional utility functions or attributes.
* Self-contained: Geometric objects are often intended to be stand-alone
  entities, fully encapsulating the properties of the shape they represent.
* Quick Prototyping: These are often used for quick and simple tasks where
  complex control over the geometry is not required.
* Specific to PyVista: While they may be built on top of VTK, these high-level
  abstractions might be unique to PyVista and not directly translatable to raw
  VTK code.

.. currentmodule:: pyvista

.. autosummary::
   :toctree: _autosummary

   Arrow
   Box
   Capsule
   Circle
   CircularArc
   CircularArcFromNormal
   Cone
   Cube
   Cylinder
   CylinderStructured
   Disc
   Dodecahedron
   Icosahedron
   Icosphere
   KochanekSpline
   Line
   MultipleLines
   Octahedron
   Plane
   PlatonicSolid
   Polygon
   Pyramid
   Rectangle
   SolidSphere
   SolidSphereGeneric
   Sphere
   Spline
   Superquadric
   Tetrahedron
   Text3D
   Triangle
   Tube
   Wavelet


Geometric Sources
~~~~~~~~~~~~~~~~~
Geometric sources are closer to the actual VTK pipeline. They serve as the
'source' nodes in a VTK pipeline and generate specific types of geometry.

* Pipeline Integration: These sources are meant to be integrated into a VTK
  pipeline, and their output can be directly connected to other pipeline stages
  like filters, mappers, etc.
* Fine Control: They often offer more parameters to control the geometry and
  may be more suitable for scenarios where you need to have fine-grained
  control over the generated geometry.
* VTK Compatible: Since they are closer to raw VTK, transitioning from PyVista
  to VTK or vice versa might be smoother when using geometric sources.

.. autosummary::
   :toctree: _autosummary

   ArrowSource
   AxesGeometrySource
   BoxSource
   ConeSource
   CubeSource
   CubeFacesSource
   CylinderSource
   DiscSource
   LineSource
   MultipleLinesSource
   OrthogonalPlanesSource
   PlaneSource
   PlatonicSolidSource
   PolygonSource
   SphereSource
   SuperquadricSource
   Text3DSource