[英]How to create unstructured 2D meshes from CAD files in python
I'm working on a finite differences code to solve 2D problems. 我正在研究有限差分代码以解决2D问题。 I want to be able to solve complex geometries written as STEP or IGES files. 我希望能够解决以STEP或IGES文件形式编写的复杂几何图形。 However I don't know how to read and mesh this kind of files. 但是,我不知道如何读取和划分此类文件。
While I know that there are free and independent meshing applications, I want my code to be self-contained. 虽然我知道有免费的和独立的网格应用程序,但我希望代码是独立的。 Is there a way to achieve this on python? 有办法在python上实现吗?
You might be interested in GMSH API . 您可能对GMSH API感兴趣。 GMSH is well-known for a while as a free open-source mesher, and recently (by relative means), they introduced an API for C,C++, Python, and Julia. GMSH作为免费的开源网格划分器已有一段时间了,最近(通过相对方式),他们引入了C,C ++,Python和Julia的API。
At first, a simple usage of Top level functions GMSH::open
and Mesh function GMSH::generate(2)
can get you started. 首先,简单使用顶级函数 GMSH::open
和网格函数 GMSH::generate(2)
即可入门。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.