MeshSolver.add_closeness_constraint_with_position

MeshSolver.add_closeness_constraint_with_position(index, weight, x, y, z)

Add a closeness constraint at a specific xyz coordinate.

A closeness constraint that keeps vertices close to a specified target position rather than their original positions. This is useful for fixing points in space or forcing points to move to specific locations.

Parameters:
indexint

Vertex index to constrain.

weightfloat

Weight of the constraint. Higher values make the constraint stronger.

xfloat

X-coordinate of the target position.

yfloat

Y-coordinate of the target position.

zfloat

Z-coordinate of the target position.

Returns:
int

ID of the added constraint.