mesh.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:meshpy 作者: BerkeleyAutomation 项目源码 文件源码
def convex_hull(self):
        """Return a 3D mesh that represents the convex hull of the mesh.
        """
        hull = ss.ConvexHull(self.vertices_)
        hull_tris = hull.simplices
        if self.normals_ is None:
            cvh_mesh = Mesh3D(self.vertices_.copy(), hull_tris.copy(), center_of_mass=self.center_of_mass_)
        else:
            cvh_mesh = Mesh3D(self.vertices_.copy(), hull_tris.copy(), normals=self.normals_.copy(), center_of_mass=self.center_of_mass_)
        cvh_mesh.remove_unreferenced_vertices()
        return cvh_mesh
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号