Streamline view_arbitrary plane
-
Hi,
Yes, this is possible, as shown in the example below.
Note that this sort of scripts can in principle be automatically generated using the "To Python" function from the GUI (in this case by right-clicking on the Streamline Viewer). Here, however, the autogenerated script did not fully work, as it forgets a crucial Update() call before setting up the Plane Center and Normal.I hope this helps!
# Creating the analysis pipeline # Adding a new SimulationExtractor simulation = document.AllSimulations["EM"] simulation_extractor = simulation.Results() # Adding a new EmSensorExtractor em_sensor_extractor = simulation_extractor["Overall Field"] document.AllAlgorithms.Add(em_sensor_extractor) # Adding a new StreamLineViewer inputs = [em_sensor_extractor.Outputs["EM E(x,y,z,f0)"]] stream_line_viewer = analysis.viewers.StreamLineViewer(inputs=inputs) stream_line_viewer.Streamline.SeedSource = stream_line_viewer.Streamline.SeedSource.enum.PlaneSource stream_line_viewer.Update() # this line is needed, otherwise the next lines have no effect stream_line_viewer.Streamline.Plane.PlaneCenter = numpy.array([0.2, 0.05, 0.002]) stream_line_viewer.Streamline.Plane.PlaneNormal = numpy.array([0.2, 0.5, 1.2]) stream_line_viewer.Update() document.AllAlgorithms.Add(stream_line_viewer)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login