open3d.geometry.TetraMesh#

class open3d.geometry.TetraMesh#

TetraMesh class. Tetra mesh contains vertices and tetrahedra represented by the indices to the vertices.

class Type#

Enum class for Geometry types.

HalfEdgeTriangleMesh = <Type.HalfEdgeTriangleMesh: 7>#
Image = <Type.Image: 8>#
LineSet = <Type.LineSet: 4>#
PointCloud = <Type.PointCloud: 1>#
RGBDImage = <Type.RGBDImage: 9>#
TetraMesh = <Type.TetraMesh: 10>#
TriangleMesh = <Type.TriangleMesh: 6>#
Unspecified = <Type.Unspecified: 0>#
VoxelGrid = <Type.VoxelGrid: 2>#
property name#
property value#
__init__(*args, **kwargs)#

Overloaded function.

  1. __init__(self: open3d.cpu.pybind.geometry.TetraMesh) -> None

Default constructor

  1. __init__(self: open3d.cpu.pybind.geometry.TetraMesh, arg0: open3d.cpu.pybind.geometry.TetraMesh) -> None

Copy constructor

  1. __init__(self: open3d.cpu.pybind.geometry.TetraMesh, vertices: open3d.cpu.pybind.utility.Vector3dVector, tetras: open3d.cpu.pybind.utility.Vector4iVector) -> None

Create a tetrahedra mesh from vertices and tetra indices

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_point_cloud(point_cloud)#

Function to create a tetrahedral mesh from a point cloud.

Parameters:

point_cloud (open3d.geometry.PointCloud) – A PointCloud.

Returns:

tuple[open3d.geometry.TetraMesh, list[int]]

dimension(self)#

Returns whether the geometry is 2D or 3D.

Returns:

int

extract_triangle_mesh(self, values, level)#

Function that generates a triangle mesh of the specified iso-surface.

Parameters:
  • values (open3d.utility.DoubleVector) – Vector with a scalar value for each vertex in the tetra mesh

  • level (float) – A scalar which defines the level-set to extract

Returns:

open3d.geometry.TriangleMesh

get_axis_aligned_bounding_box(self)#

Returns an axis-aligned bounding box of the geometry.

Returns:

open3d.geometry.AxisAlignedBoundingBox

get_center(self)#

Returns the center of the geometry coordinates.

Returns:

numpy.ndarray[numpy.float64[3, 1]]

get_geometry_type(self)#

Returns one of registered geometry types.

Returns:

open3d.geometry.Geometry.Type

get_max_bound(self)#

Returns max bounds for geometry coordinates.

Returns:

numpy.ndarray[numpy.float64[3, 1]]

get_min_bound(self)#

Returns min bounds for geometry coordinates.

Returns:

numpy.ndarray[numpy.float64[3, 1]]

get_minimal_oriented_bounding_box(self: open3d.cpu.pybind.geometry.Geometry3D, robust: bool = False) open3d.cpu.pybind.geometry.OrientedBoundingBox#

Returns the minimal oriented bounding box for the geometry.

Creates the oriented bounding box with the smallest volume. The algorithm makes use of the fact that at least one edge of the convex hull must be collinear with an edge of the minimum bounding box: for each triangle in the convex hull, calculate the minimal axis aligned box in the frame of that triangle. at the end, return the box with the smallest volume

Parameters:

robust (bool) – If set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates.

Returns:

The oriented bounding box. The bounding box is oriented such that its volume is minimized.

Return type:

open3d.geometry.OrientedBoundingBox

get_oriented_bounding_box(self: open3d.cpu.pybind.geometry.Geometry3D, robust: bool = False) open3d.cpu.pybind.geometry.OrientedBoundingBox#

Returns the oriented bounding box for the geometry.

Computes the oriented bounding box based on the PCA of the convex hull. The returned bounding box is an approximation to the minimal bounding box.

Parameters:

robust (bool) – If set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates.

Returns:

The oriented bounding box. The bounding box is oriented such that the axes are ordered with respect to the principal components.

Return type:

open3d.geometry.OrientedBoundingBox

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

Returns True if the mesh contains tetras.

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 length 1.

Returns:

open3d.geometry.MeshBase

paint_uniform_color(self, color)#

Assigns each vertex in the MeshBase the same color.

Parameters:

color (numpy.ndarray[numpy.float64[3, 1]]) – RGB colors of vertices.

Returns:

open3d.geometry.MeshBase

remove_degenerate_tetras(self)#

Function that removes degenerate tetras, i.e., tetras that references a single vertex multiple times in a single tetra. They are usually the product of removing duplicated vertices.

Returns:

open3d.geometry.TetraMesh

remove_duplicated_tetras(self)#

Function that removes duplicated tetras, i.e., removes tetras that reference the same four vertices, independent of their order.

Returns:

open3d.geometry.TetraMesh

remove_duplicated_vertices(self)#

Function that removes duplicated vertices, i.e., vertices that have identical coordinates.

Returns:

open3d.geometry.TetraMesh

remove_unreferenced_vertices(self)#

This function removes vertices from the tetra mesh that are not referenced in any tetra of the mesh.

Returns:

open3d.geometry.TetraMesh

rotate(*args, **kwargs)#

Overloaded function.

  1. rotate(self, R)

    Apply rotation to the geometry coordinates and normals.

Parameters:

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

Returns:

open3d.geometry.Geometry3D

  1. rotate(self, R, center)

    Apply rotation to the geometry coordinates and normals.

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

  • center (numpy.ndarray[numpy.float64[3, 1]]) – Rotation center used for transformation.

Returns:

open3d.geometry.Geometry3D

scale(*args, **kwargs)#

Overloaded function.

  1. scale(self, scale, center)

    Apply scaling to the geometry coordinates.

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

  • center (numpy.ndarray[numpy.float64[3, 1]]) – Scale center used for transformation.

Returns:

open3d.geometry.Geometry3D

  1. scale(self, scale, center)

    Apply scaling to the geometry coordinates.

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

  • center (numpy.ndarray[numpy.float64[3, 1]]) – Scale center used for transformation.

Returns:

open3d.geometry.Geometry3D

transform(self, arg0)#

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

Parameters:

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

Returns:

open3d.geometry.Geometry3D

translate(self, translation, relative=True)#

Apply translation to the geometry coordinates.

Parameters:
  • translation (numpy.ndarray[numpy.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: 7>#
Image = <Type.Image: 8>#
LineSet = <Type.LineSet: 4>#
PointCloud = <Type.PointCloud: 1>#
RGBDImage = <Type.RGBDImage: 9>#
TetraMesh = <Type.TetraMesh: 10>#
TriangleMesh = <Type.TriangleMesh: 6>#
Unspecified = <Type.Unspecified: 0>#
VoxelGrid = <Type.VoxelGrid: 2>#
property tetras#

List of tetras denoted by the index of points forming the tetra.

Type:

int64 array of shape (num_tetras, 4), 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