MeshTweaker.py 文件源码

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

项目:Tweaker-3 作者: ChristophSchranz 项目源码 文件源码
def project_verteces(self, mesh, orientation):
        """Supplement the mesh array with scalars (max and median)
        for each face projected onto the orientation vector.
        Args:
            mesh (np.array): with format face_count x 6 x 3.
            orientation (np.array): with format 3 x 3.
        Returns:
            adjusted mesh.
        """
        mesh[:, 4, 0] = np.inner(mesh[:, 1, :], orientation)
        mesh[:, 4, 1] = np.inner(mesh[:, 2, :], orientation)
        mesh[:, 4, 2] = np.inner(mesh[:, 3, :], orientation)

        mesh[:, 5, 1] = np.max(mesh[:, 4, :], axis=1)
        mesh[:, 5, 2] = np.median(mesh[:, 4, :], axis=1)
        sleep(0)  # Yield, so other threads get a bit of breathing space.
        return mesh
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号