Add a module to make streamlines from an array of seeds#678
Add a module to make streamlines from an array of seeds#678Cadair wants to merge 1 commit intoenthought:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #678 +/- ##
==========================================
+ Coverage 50.59% 50.59% +<.01%
==========================================
Files 257 257
Lines 23437 23455 +18
Branches 3194 3197 +3
==========================================
+ Hits 11858 11868 +10
- Misses 10819 10825 +6
- Partials 760 762 +2
Continue to review full report at Codecov.
|
prabhuramachandran
left a comment
There was a problem hiding this comment.
Thanks for the PR but I think we could do this in a nicer way. Let me know what you think.
| src = mm.source | ||
| self.configure_connection(self.stream_tracer, src) | ||
| self.seed.inputs = [src] | ||
| if isinstance(self.seed, SourceWidget): |
There was a problem hiding this comment.
Thanks for the PR! I am not too happy about this isinstance check, it suggests that there should be a cleaner way to do this. Is the intent to just allow a user to set the polydata and not use a widget at all? I think it would be very useful thing in any case to allow users complete control over the points. So maybe I should think of supporting either a widget or a poly data. This could perhaps be done by simply having another attribute on the streamline module, say user_seed which is a polydata and if this is non-None, that we use that instead of the seed?
A long time ago, I needed to make streamlines from a specific set of points. This is my first attempt to graft it into mayavi.
It would be nice if it could be integrated into the main
Streamlineclass rather than having to make a new one, but I don't know how to make theStreamline.seedattribute be either aSourceWidgetorPolyData. I guess it would be possible to make a variant onSourceWidgetwhich is just a wrapper aroundPolyDatabut that seems a little overkill.