交叉点3D网格python [英] Intersection 3D meshes python

查看:60
本文介绍了交叉点3D网格python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用面向有限元分析的3D网格.我想在类似立方体的矩阵中为材料(任何形状,但主要对球体和椭球体感兴趣)的内含物建模.这些内含物不应彼此重合.

所以我在考虑为python使用某种程序包,该程序包可以绘制原始对象,寻找它们的交集(如果存在)并导出几何体(或对其进行网格划分并导出).对于球体,我正在编写自己的解决方案,但我认为将其扩展为除球体以外的其他形状将非常困难.

在寻找合适的库/模块几天后,我无法决定应该使用哪个库/模块.

我想使用python作为主要语言,因为它很简单,开放源代码,我已经知道了一点.因此,检查了以下链接:

I just started to work with 3D meshes, oriented to be used for finite element analysis. I would like to model inclusions for materials (any shape, but mainly interested in spheres and ellipsoids) in a cube-like matrix. These inclusions shouldn't be coincident with each other.

So I was thinking to use some sort of package for python which can plot primitive objects, look for their intersection (if it exists) and export the geometry (or mesh it and export it). In case of spheres, I was coding my own solution, but I think it will be very difficult to expand it for any other shape than spheres.

After a couple of days looking for an appropriate library/module, I can't decide which one I should use.

I would like to use python as the main language since it is easy, open source and I already know a bit. Hence checked this link: Good geometry library in python?

But:

  • SymPy. It seems it is only for 2D objects.
  • pyeuclid. Looks discontinued in its google code page.
  • CGAL. It seems the most advanced, but I can't find if it does intersections.
  • geometry-simple. Also discontinued, and I believe it does not handle 3D objects.
  • pythonocc. The lack of documentation is an important issue here.
  • Open mesh. It seems a good alternative but I can't see if it does intersections.

I might be missing some features or libraries. Sorry about it.

If it is really necessary and useful, I could try to use C++ which it seems has more libraries for geometry as stated in here, here and here. Also, I think I should mention I work mainly on Windows 10, and my experience with Linux is little but I could challenge myself.

To summarize my question: Is there any good library in python (if possible) which can find intersections between 3D objects? Am I missing any feature or library I should know? I would appreciate a lot any suggestion in the right direction.

Thank very much in advance!

解决方案

You might want to check out pygalmesh (out of my zoo). It interfaces CGAL and as such uses level-set functions for mesh construction. All domain combinations (intersections, unions, differences) are implemented.

这篇关于交叉点3D网格python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆