使用曲面进行切割
import pyvista as pv
import numpy as np
mesh = pv.ParametricRandomHills()
mesh.rotate_y(90)
surface= mesh.elevation()
# Create a grid around that surface
# 根据生成的mesh生成网格
grid = pv.create_grid(surface)
# Clip the grid using the surface
model = grid.clip_surface(surface)
# Compute height and display it
model.elevation().plot()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
surface:surface.plot()
grid:grid.plot()
clip result:model.elevation().plot()
————————————————
版权声明:本文为CSDN博主「wblong_cs」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/mrbaolong/article/details/106364026