Skip to content

Enabling correct unbound use of LevelSet::distance for in-grid points

Jérôme Duriez requested to merge unboundDistance into master

Before:

Welcome to Yade 20230925-7517~b169c3f~jammy1 
[...]
In [1]: b = levelSetBody("sphere",radius=1)

In [2]: b.shape.distance(Vector3.Zero,True)
Out[2]: 0.0 # Wrong, the origin is not part of the sphere

After:

In [1]: b = levelSetBody("sphere",radius=1)

In [2]: b.shape.distance(Vector3.Zero,True)
Out[2]: -1.0 # Correct

Merge request reports