关于 几个开源的几何算法库
本帖最后由 landsat99 于 2022-5-20 16:26 编辑// 关于 几个开源的几何算法库。和大家交流、共同促进。。(图片引zhihu原稿不单提交了)
// 理论基础算法,推荐CGAL
1. 【CGAL】The Computational Geometry Algorithms Library
官网:The Computational Geometry Algorithms Library
github:https://github.com/CGAL/cgal
CGAL,Computational Geometry Algorithms Library,计算几何算法库,设计目标是以C++库的形式,提供方便,高效,可靠的几何算法。CGAL可用于各种需要几何计算的领域,如计算机图形学,科学可视化,计算机辅助设计和建模,地理信息系统,分子生物学,医学成像,机器人运动规划,网格生成,数值方法等等。 计算几何算法库(CGAL),提供计算几何相关的数据结构和算法,诸如三角剖分(2D约束三角剖分及二维和三维Delaunay三角剖分),Voronoi图(二维和三维的点,2D加权Voronoi图,分割Voronoi图等),多边形(布尔操作,偏置),多面体(布尔运算),曲线整理及其应用,网格生成(二维Delaunay网格生成和三维表面和体积网格生成等),几何处理(表面网格简化,细分和参数化等),凸壳算法(2D,3D和dD),搜索结构(近邻搜索,kd树等),插值,形状分析,拟合,距离等。
CGAL is a software project that provides easy access to efficient and reliable geometric algorithms in the form of a C++ library. CGAL is used in various areas needing geometric computation, such as geographic information systems, computer aided design, molecular biology, medical imaging, computer graphics, and robotics.
The library offers data structures and algorithms like triangulations, Voronoi diagrams, Boolean operations on polygons and polyhedra, point set processing, arrangements of curves, surface and volume mesh generation, geometry processing, alpha shapes, convex hull algorithms, shape reconstruction, AABB and KD trees...
Learn more about CGAL by browsing through the Package Overview.Learn more about CGAL by browsing through the Package Overview.
2. 【OCC】OpenCascade
官网:Open CASCADE Technology | Collaborative development portal
下载链接:Download - Open CASCADE Technology
Open CASCADE是一套开放源码的CAD/CAM/CAE几何模型核心,源自于法国的Matra Datavision公司。1998年Matra Datavision改变市场策略:从以销售软件为主改为提供CAD/CAM/CAE软体服务为主的获利模式,并且在1999年公布Open CASCADE的原始码,任何人都可以在该公司的网站上下载并且使用这些源码。 Matra Datavision则以此函式库为基础,为客户建立定制化的数值模拟软件。国内CAD/CAM产业所需的套装软件常常动辄数百万甚至上千万,如此高昂的软件费用对于中小企业来说非常沉重的负担。套装软件功能有些用不到,软件使用者也必须花钱购买这些用不到的功能。能够针对中小企业的需求建构一个精简化的CAD/CAM软体,并且在生产需求改变的时候才增加新的功能,将可以有效节省软件成本。 Open CASCADE的成功经验或许可以提供产业界甚至学术界一些新的思考方向。
Open CASCADE Technology (OCCT) is the only open-source full-scale 3D geometry library. Striving to be one of the best free cad software kernels, OCCT is widely used for the development of specialized programs dealing with the following engineering and mechanical domains: 3D modeling (CAD), manufacturing (CAM), numerical simulation (CAE), measurement equipment (CMM) and quality control (CAQ).
Since its publication in 1999 as an open source CAD software kernel, OCCT has been successfully used in numerous projects ranging from building and construction to aerospace and automotive.
https://pic3.zhimg.com/80/v2-34ba5260bb990b6898dd1f7c4cb9eef6_720w.jpg
https://pic3.zhimg.com/v2-eb11da395a0d2b18494bebc52a409a8e_b.jpg
3. 【libigl】 A simple C++ geometry processing library
官网:libigl
github:https://github.com/libigl/libigl
libigl is a simple C++ geometry processing library. We have a wide functionality including construction of sparse discrete differential geometry operators and finite-elements matrices such as the cotangent Laplacian and diagonalized mass matrix, simple facet and edge-based topology data structures, mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix manipulation which make Eigen feel a lot more like MATLAB.
It is a header-only library.
You do not need to compile anything to use, just include igl headers (e.g. #include<igl/cotmatrix.h>) and run. Each header file contains a single function (e.g. igl/cotmatrix.h containsigl::cotmatrix()).
Most are tailored to operate on a generic triangle mesh stored in an n-by-3 matrix of vertex positions V and an m-by-3 matrix of triangle indices F.
Optionally the library may also be pre-compiled into a statically linked library, for faster compile times with your projects. This only effects compile time (run-time performance and behavior is identical). If in doubt, use the header-only default mode: (i.e. just include the headers you want to use).
We use the Eigen library heavily in our code. Our group prototypes a lot in MATLAB, and we have a useful MATLAB to libigl+Eigen conversion table.
We regularly test compiling our library on Mac OS X with clang, Linux with gcc and Windows with Visual Studio 2015 Community Edition.
https://pic4.zhimg.com/80/v2-e2a0dd7f660dab9f2c2bb93e7d2d378b_720w.jpg
4. 【VTK】Visualization Toolkit
官网:VTK - The Visualization Toolkit
github:https://github.com/Kitware/VTK
gitlab:VTK / VTK · GitLab
可以利用python接口做可视化
The Visualization Toolkit (VTK) is open source software for manipulating and displaying scientific data. It comes with state-of-the-art tools for 3D rendering, a suite of widgets for 3D interaction, and extensive 2D plotting capability.
VTK is part of Kitware’s collection of supported platforms for software development. The platform is used worldwide in commercial applications, as well as in research and development. For examples, please see VTK in Action.
https://pic1.zhimg.com/80/v2-07fe0a37daba13734a41c53e477500f0_720w.jpg
5. 【VCG Library】
官网:VCG
github:https://github.com/cnr-isti-vclab/vcglib/
https://pic3.zhimg.com/80/v2-deecaec7f78550b2a7b4f0f4da61fbb6_720w.jpg
https://pic4.zhimg.com/80/v2-6953516519f87c27158df246e94cd067_720w.jpg
6. 【OpenMesh】
官网:http://www.openmesh.org/
github:https://github.com/heyaaron/openmesher
OpenMesh是一种用于表示和操作多边形网格的通用且高效的数据结构。有关OpenMesh及其特性的更多信息,请查看介绍页面。 OpenMesh是一个c++库。还提供了Python绑定。在OpenMesh的基础上,我们开发了一个灵活的几何建模和处理框架OpenFlipper。
https://pic2.zhimg.com/80/v2-a28321cf297bbc0d9daa9d9cf96b197d_720w.jpg
不错,就是不知道工作用那个 谢谢楼主分享,请问有没有什么比较好的C#计算几何库吗? qjchen 发表于 2022-6-10 17:34
谢谢楼主分享,请问有没有什么比较好的C#计算几何库吗?
纯C#几何库 有g3Sharp
github: https://github.com/gradientspace/geometry3Sharp g3与Unity的几何数据类型对应。
框架基于c#,感觉调用c++几何算法库 可能是更常见的方式,,
landsat99 发表于 2022-6-13 12:20
纯C#几何库 有g3Sharp
github: https://github.com/gradientspace/geometry3Sharp g3与Unity的几何 ...
谢谢,看起来功能很强大~ 感谢分享,真的很不错的一些资源 C++学习门槛太高,实在是太难了,可是不学这些恐怕都用不了吧 gdfyhao 发表于 2022-12-7 11:39
C++学习门槛太高,实在是太难了,可是不学这些恐怕都用不了吧
非C++专属,绝不是c++专用,,任何主流工具都能用
C++当然最佳,调用融合度高,静态动态deploy方式多样灵活,接口 封装等二次代价也小
Python也是天然集成。成熟py接口方案cytpe pybind boost都ok
Java内置JNI 也算天然集成。你自己熟悉的工具都有c++接口,没问题的
页:
[1]