Skip to content

slim_precompute fails when fixing only one vertex as a boundary condition #266

@arvigj

Description

@arvigj

When trying to use igl::slim_precompute to get an isometric parametrization, I usually give one vertex (the first) as a boundary condition with a value of [0, 0]. This fails in the new bindings, with the following error message:

TypeError: slim_precompute(): incompatible function arguments. The following argument types are supported:
    1. slim_precompute(V: numpy.ndarray[dtype=float64, shape=(*, *), order='F'], F: numpy.ndarray[dtype=int32, shape=(*, *), order='F'], V_init: numpy.ndarray[dtype=float64, shape=(*, *), order='F'], slim_energy: igl.pyigl_core.MappingEnergyType, b: numpy.ndarray[dtype=int32, shape=(*), order='C'], bc: numpy.ndarray[dtype=float64, shape=(*, *), order='F'], soft_p: float = 100000.0) -> igl.pyigl_core.SLIMData

My current resolution is to pass in the boundary condition twice, duplicated, but this seems like it should be fixed. I'm not super familiar with the inner workings of nanobind, but is a one element numpy array being cast into an int?

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