Skip to content

VoxelGrid.voxels.append() does not append #1101

@SilvioJin

Description

@SilvioJin

IMPORTANT: Please use the following template to report the bug.


Describe the bug
open3d.geometry.VoxelGrid.voxels.append(voxel) does not append the voxel object or any other object.

My goal is to create a VoxelGrid object from a numpy array of shape (128,128,128).

To Reproduce

import open3d as o3d
import numpy as np

vg = o3d.geometry.VoxelGrid()
vox = o3d.geometry.Voxel()
vox.grid_index = np.array([  7,  59, 101])
vg.voxels.append(vox)

but print(vg.voxels) just returns []
and of course print(vg.has_voxels) says <bound method PyCapsule.has_voxels of geometry::VoxelGrid with 0 voxels.>

Expected behavior
vg.voxels should contain the Voxel object

Environment (please complete the following information):

  • OS: OSX Mojave 10.14.5
  • Python version: 3.6.5
  • Open3D version: 0.7.0.0
  • Is this remote workstation?: no
  • How did you install Open3D?: conda

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions