-
Notifications
You must be signed in to change notification settings - Fork 4
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
Store Polyline in one cell #48
Comments
Have you experimented with the different types of lines in this example?: https://docs.pyvista.org/examples/00-load/create-spline.html If you sort the points in order, then you can create a poly line cell for all of them using the function: def polyline_from_points(points):
poly = pv.PolyData()
poly.points = points
the_cell = np.arange(0, len(points), dtype=np.int)
the_cell = np.insert(the_cell, 0, len(points))
poly.lines = the_cell
return poly |
Upon trying the code above I receive this error:
My points are in order before I apply this function. |
This was fixed on the last release of PyVista. Would you please make sure you are using the latest version of PyVista: pip install -U pyvista |
Worked perfect, thanks! |
Using pyvista.lines_from_points I create polylines, although each cell contains lines for each connection to point. Is there a way to make it so that it recognizes the entire polyline as a cell?
How can I solve this? Thanks!
The text was updated successfully, but these errors were encountered: