是否有一种简单的方法来计算plitly / python中网格的体积(立方米)

发布于 2025-02-03 01:52:44 字数 588 浏览 2 评论 0原文

我在Plotly中创建了一个3D网格。

import plotly.graph_objects as go

fig = go.Figure(data=[
    go.Mesh3d(
        x=[0, 1, 2, 0],
        y=[0, 0, 1, 2],
        z=[0, 2, 0, 1],
        i=[0, 0, 0, 1],
        j=[1, 2, 3, 2],
        k=[2, 3, 1, 3],
    )
])

fig.show()

有没有简单的方法可以在Plotly / Python中计算此网格的音量(以立方米为单位)?

我展示的对象应该作为一个例子。我正在寻找任何对象(不是三角形/四面体对象的索利利)的一般批准。

亲切的问候

I have created a 3d mesh in plotly.

import plotly.graph_objects as go

fig = go.Figure(data=[
    go.Mesh3d(
        x=[0, 1, 2, 0],
        y=[0, 0, 1, 2],
        z=[0, 2, 0, 1],
        i=[0, 0, 0, 1],
        j=[1, 2, 3, 2],
        k=[2, 3, 1, 3],
    )
])

fig.show()

enter image description here

Is there an easy way to calculate the volume (in cubic meters) of this mesh in plotly / python?

The object I showed should serve as an example. I am searching for a general approch for any object (not soleley for triangle/tetrahedral objects).

Kind Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文