Esempio n. 1
0
def mesh_generator(edge_cases=True):
    yield 'box', o3d.geometry.create_mesh_box()
    yield 'sphere', o3d.geometry.create_mesh_sphere()
    yield 'cone', o3d.geometry.create_mesh_cone()
    yield 'torus', o3d.geometry.create_mesh_torus(radial_resolution=30,
                                                  tubular_resolution=20)
    yield 'moebius (twists=1)', o3d.geometry.create_mesh_moebius(twists=1)
    yield 'moebius (twists=2)', o3d.geometry.create_mesh_moebius(twists=2)
    yield 'moebius (twists=3)', o3d.geometry.create_mesh_moebius(twists=3)

    yield 'knot', meshes.knot()

    if edge_cases:
        yield 'non-manifold edge', meshes.non_manifold_edge()
        yield 'non-manifold vertex', meshes.non_manifold_vertex()
        yield 'open box', meshes.open_box()
        yield 'boxes', meshes.intersecting_boxes()
Esempio n. 2
0
def mesh_generator(edge_cases=True):
    yield "box", o3d.geometry.TriangleMesh.create_box()
    yield "sphere", o3d.geometry.TriangleMesh.create_sphere()
    yield "cone", o3d.geometry.TriangleMesh.create_cone()
    yield "torus", o3d.geometry.TriangleMesh.create_torus(radial_resolution=30,
                                                          tubular_resolution=20)
    yield "moebius (twists=1)", o3d.geometry.TriangleMesh.create_moebius(
        twists=1)
    yield "moebius (twists=2)", o3d.geometry.TriangleMesh.create_moebius(
        twists=2)
    yield "moebius (twists=3)", o3d.geometry.TriangleMesh.create_moebius(
        twists=3)

    yield "knot", meshes.knot()

    if edge_cases:
        yield "non-manifold edge", meshes.non_manifold_edge()
        yield "non-manifold vertex", meshes.non_manifold_vertex()
        yield "open box", meshes.open_box()
        yield "boxes", meshes.intersecting_boxes()