set_hinge_2d

Set hinge in 2D.

Parameters

vertices : ShapeList
List of vertices
edges : ShapeList
List of edges
material : Hinge or str, optional
Hinge material (object, name or uuid). When omitted, the project's first hinge material is used (one is created if there is none).

Returns

bool
True if at least one hinge was added.

Notes

Vertices must be connected to at least one plate, to which the hinge will be assigned. If vertices are connected to multiple plates, hinges will all be set to all of them, unless edges are specified.

See also

Examples

vertices = model.get_shapes(['vertex'])
edges = model.get_shapes(['edge'])
model.set_hinge_2d(vertices, edges)
model.set_hinge_2d(vertices, material=prj.Hinge(name='Hinge 50', moment=50))