用AutoLisp计算体积的一个问题

发布于 2024-11-17 10:17:22 字数 347 浏览 2 评论 0原文

大家好,这是问题所在。

我正在考虑用 AutoCAD 的 AutoLisp 语言创建以下程序:假设我们需要计算矩形基础表面的体积,该表面由给定地形水平曲线确定的曲面从上方封闭(此类水平曲线表示等高的点,并且因此给出地形表面的插值想法)。

我的第一个想法是插值到任意精度,即对基础区域进行网格划分,然后计算每个(例如)矩形网格元素中心的高度。因此,体积等于矩形边与所有这些高度之和的乘积。

现在的问题是确定这些高度。上述地形水平曲线通常以折线形式给出。因此,对于要查找高度的每个点,需要确定该点位于哪两条这样的折线之间,以便根据相邻折线表示的值来插值点的高度。

我不太确定如何解决这个问题,所以欢迎任何建议。提前致谢!

Hello to all and here's the problem.

I am thinking about creating the following program in AutoCAD's AutoLisp language: say we need to calculate the volume of a surface of rectangular basis, enclosed from above with a sorface determined by given terrain level curves (such level curves represent points of equal height, and hence give an interpolatory idea of how the terrain surface looks like).

My first idea is interpolation up to an arbitrary degree of accuracy, i.e. meshing the base area and then calculating the height at the center of every (say) rectangular mesh element. Hence, the volume equals the product of the rectangles sides with the sum of all such heights.

Now, the problem is to determine these heights. The above mentioned terrain level curves are usually given as polylines. So, for every point where the height is to be sought, one needs to determine between which two such polylines the point lies, in order to interpolate the height of the point based on values which are represented by neighbouring polylines.

I'm not really sure how to attack this problem, so any suggestions are welcome. Thanks in advance!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红尘作伴 2024-11-24 10:17:22

您可以从两个表面制作罐头开始。请参阅此处的说明和代码
然后,您可以在这些表面上确定网格并获取中心的高度。高度和网格大小之间的差异将帮助您确定体积。

这不是一件容易的事。

您看过 AutoDesk Civil 3D 吗?那有一些很好的体积计算工具。

you could start by making tins from the 2 surfaces. See explanation and code here
Then you could determine a grid over these surfaces and get the height in the center. The difference between both heights and the gridsize will help you to determine the volume.

This is no easy task.

Have you looked at AutoDesk Civil 3D? That has some good volume calculating tools.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文