Returns the points as a VTKCompositeDataArray instance.
(self)
| 771 | |
| 772 | @property |
| 773 | def points(self): |
| 774 | "Returns the points as a VTKCompositeDataArray instance." |
| 775 | if not NUMPY_AVAILABLE: |
| 776 | # don't know how to handle composite dataset when numpy not around |
| 777 | raise NotImplementedError("Only available with numpy") |
| 778 | |
| 779 | if self._Points is None or self._Points() is None: |
| 780 | pts = [] |
| 781 | for ds in self: |
| 782 | try: |
| 783 | _pts = ds.Points |
| 784 | except AttributeError: |
| 785 | _pts = None |
| 786 | |
| 787 | if _pts is None: |
| 788 | pts.append(dsa.NoneArray) |
| 789 | else: |
| 790 | pts.append(_pts) |
| 791 | if len(pts) == 0 or all([a is dsa.NoneArray for a in pts]): |
| 792 | cpts = dsa.NoneArray |
| 793 | else: |
| 794 | cpts = dsa.VTKCompositeDataArray(pts, dataset=self) |
| 795 | self._Points = weakref.ref(cpts) |
| 796 | return self._Points() |
| 797 | |
| 798 | |
| 799 | @vtkPartitionedDataSet.override |