open3d.geometry.HalfEdgeTriangleMesh

class open3d.geometry.HalfEdgeTriangleMesh

HalfEdgeTriangleMesh inherits TriangleMesh class with the addition of HalfEdge data structure for each half edge in the mesh as well as related functions.

class Type

Enum class for Geometry types.

HalfEdgeTriangleMesh = Type.HalfEdgeTriangleMesh
Image = Type.Image
LineSet = Type.LineSet
PointCloud = Type.PointCloud
RGBDImage = Type.RGBDImage
TetraMesh = Type.TetraMesh
TriangleMesh = Type.TriangleMesh
Unspecified = Type.Unspecified
VoxelGrid = Type.VoxelGrid
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: open3d.geometry.HalfEdgeTriangleMesh) -> None

Default constructor

  1. __init__(self: open3d.geometry.HalfEdgeTriangleMesh, arg0: open3d.geometry.HalfEdgeTriangleMesh) -> None

Copy constructor

boundary_half_edges_from_vertex(self, vertex_index)

Query manifold boundary half edges from a starting vertex. If query vertex is not on boundary, empty vector will be returned.

Parameters

vertex_index (int) –

Returns

open3d.utility.IntVector

boundary_vertices_from_vertex(self)
Returns

open3d.utility.IntVector

clear(self)

Clear all elements in the geometry.

Returns

open3d.geometry.Geometry

compute_convex_hull(self)

Computes the convex hull of the triangle mesh.

Returns

Tuple[open3d.geometry.TriangleMesh, List[int]]

static create_from_triangle_mesh(mesh)

Convert HalfEdgeTriangleMesh from TriangleMesh. Throws exception if the input mesh is not manifolds

Parameters

mesh (open3d.geometry.TriangleMesh) – The input TriangleMesh

Returns

open3d.geometry.HalfEdgeTriangleMesh

dimension(self)

Returns whether the geometry is 2D or 3D.

Returns

int

get_axis_aligned_bounding_box(self)

Returns an axis-aligned bounding box of the geometry.

Returns

open3d.geometry.AxisAlignedBoundingBox

get_boundaries(self)

Returns a vector of boundaries. A boundary is a vector of vertices.

Returns

List[open3d.utility.IntVector]

get_center(self)

Returns the center of the geometry coordinates.

Returns

numpy.ndarray[float64[3, 1]]

get_geometry_type(self)

Returns one of registered geometry types.

Returns

open3d.geometry.Geometry.GeometryType

get_max_bound(self)

Returns max bounds for geometry coordinates.

Returns

numpy.ndarray[float64[3, 1]]

get_min_bound(self)

Returns min bounds for geometry coordinates.

Returns

numpy.ndarray[float64[3, 1]]

get_oriented_bounding_box(self)

Returns an oriented bounding box of the geometry.

Returns

open3d.geometry.OrientedBoundingBox

static get_rotation_matrix_from_axis_angle(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_quaternion(rotation: numpy.ndarray[float64[4, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_xyz(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_xzy(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_yxz(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_yzx(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_zxy(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
static get_rotation_matrix_from_zyx(rotation: numpy.ndarray[float64[3, 1]]) → numpy.ndarray[float64[3, 3]]
has_half_edges(self)

Returns True if half-edges have already been computed.

Returns

bool

has_vertex_colors(self)

Returns True if the mesh contains vertex colors.

Returns

bool

has_vertex_normals(self)

Returns True if the mesh contains vertex normals.

Returns

bool

has_vertices(self)

Returns True if the mesh contains vertices.

Returns

bool

is_empty(self)

Returns True iff the geometry is empty.

Returns

bool

normalize_normals(self)

Normalize vertex normals to legnth 1.

Returns

open3d.geometry.MeshBase

paint_uniform_color(self, arg0)

Assigns each vertex in the MeshBase the same color.

Parameters

arg0 (numpy.ndarray[float64[3, 1]]) –

Returns

open3d.geometry.MeshBase

rotate(self, R, center=True)

Apply rotation to the geometry coordinates and normals.

Parameters
  • R (numpy.ndarray[float64[3, 3]]) – The rotation matrix

  • center (bool, optional, default=True) – If true, then the rotation is applied to the centered geometry

Returns

open3d.geometry.Geometry3D

scale(self, scale, center=True)

Apply scaling to the geometry coordinates.

Parameters
  • scale (float) – The scale parameter that is multiplied to the points/vertices of the geometry

  • center (bool, optional, default=True) – If true, then the scale is applied to the centered geometry

Returns

open3d.geometry.Geometry3D

transform(self, arg0)

Apply transformation (4x4 matrix) to the geometry coordinates.

Parameters

arg0 (numpy.ndarray[float64[4, 4]]) –

Returns

open3d.geometry.Geometry3D

translate(self, translation, relative=True)

Apply translation to the geometry coordinates.

Parameters
  • translation (numpy.ndarray[float64[3, 1]]) – A 3D vector to transform the geometry

  • relative (bool, optional, default=True) – If true, the translation vector is directly added to the geometry coordinates. Otherwise, the center is moved to the translation vector.

Returns

open3d.geometry.Geometry3D

HalfEdgeTriangleMesh = Type.HalfEdgeTriangleMesh
Image = Type.Image
LineSet = Type.LineSet
PointCloud = Type.PointCloud
RGBDImage = Type.RGBDImage
TetraMesh = Type.TetraMesh
TriangleMesh = Type.TriangleMesh
Unspecified = Type.Unspecified
VoxelGrid = Type.VoxelGrid
property half_edges

List of HalfEdge in the mesh

property ordered_half_edge_from_vertex

Counter-clockwise ordered half-edges started from each vertex

property triangle_normals

Triangle normals.

Type

float64 array of shape (num_triangles, 3), use numpy.asarray() to access data

property triangles

List of triangles denoted by the index of points forming the triangle.

Type

int array of shape (num_triangles, 3), use numpy.asarray() to access data

property vertex_colors

RGB colors of vertices.

Type

float64 array of shape (num_vertices, 3), range [0, 1] , use numpy.asarray() to access data

property vertex_normals

Vertex normals.

Type

float64 array of shape (num_vertices, 3), use numpy.asarray() to access data

property vertices

Vertex coordinates.

Type

float64 array of shape (num_vertices, 3), use numpy.asarray() to access data