-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slicing the Mesh Arbitrarily #362
Comments
Hi @aluthfian! I developed some code for doing this a couple of years back, which also uses the vtk model object. The last time I tried running this plotting code though I remember having problems loading the vtk model into pyvista. I haven't dug into this to try and sort it out. I'll try to revive my code and clean it up enough to share. It would be very interesting to experiment with both of our plotting codes and combine the best of both. I seem to remember my approach being a little more complicated and requiring many more lines of code so your approach maybe cleaner. I know that in mine I opted to plot depth versus the along profile distance instead of x or y coordinates. |
@micmitch Good idea! In my earlier version of this, I used vtk's slice along line capability and then retrieve the points on the slice using ctp(). This was very slow (needs tens of seconds to run), memory intensive, and results in a longer code. The approach I proposed here is faster to run (a few seconds only) and keep the voxel-like shape intact for honesty and transparency (although interpolation option may be possible to implement so the plot can look "smooth"). Changing the x axis into distance instead of Northing/Easting should also be given as an option as well, like:
I am interested on how you produced your smooth plot since I can only to use (Sorry for the closing and reopening of the same issue, commenting on GitHub mobile and small screen is not that convenient!) |
Hi all, I just want to propose a feature addition (if there isn't any) for future releases of discretize: slicing the mesh using a straight line of arbitrary direction. I propose this feature as an addition to the already available
discretize.TensorMesh.plot_slice
. The draft code for this functionality is given below.The final result will look like this:
Thanks for reading!
The text was updated successfully, but these errors were encountered: