gpt4 book ai didi

python (VTK) : Connect two 3D points by an oriented cylinder

转载 作者:行者123 更新时间:2023-11-28 17:45:59 24 4
gpt4 key购买 nike

假设我们在 3D 空间中有两个点,希望通过具有指定半径的圆柱体连接它们。显然,圆柱体的高度(长度)将是两点之间的距离。然而标准Cylinder object没有任何东西要遵循上面的内容。

如何做到这一点?

最佳答案

我能看到的最简单的方法是使用 TubeFilter。基本上你在两点之间画一条线,然后应用过滤器。这是一个 example在 c++ 中,但将其移植到 Python 应该很简单。

编辑:和here如果有帮助,有一个 python 示例。

关于 python (VTK) : Connect two 3D points by an oriented cylinder,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18158382/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com