MeshSolver.add_similarity_constraint

MeshSolver.add_similarity_constraint(indices, weight=1.0, allow_scaling=True, allow_rotation=True, allow_translation=True)

Add similarity constraint to transform vertices to match a target shape.

This is a low-level method that creates a similarity constraint. You must manually set the target shape using set_similarity_constraint_shape(). For a higher-level method that automatically creates a regular polygon, use add_regular_polygon_constraint().

Parameters:
indiceslist

List of vertex indices.

weightfloat, optional

Weight of the constraint, by default 1.0

allow_scalingbool, optional

Whether to allow scaling, by default True

allow_rotationbool, optional

Whether to allow rotation, by default True

allow_translationbool, optional

Whether to allow translation, by default True

Returns:
bool

True if the constraint was added successfully.