Fastener (hwx.inspire)#

class Fastener(connection=None, direction=(0, 0, 1), name='', **kwds)#

Bases: PartsConnector

Fasten two or more parts together.

Fasteners connect parts together without allowing movement at the hole location.

Example

from hwx import inspire
from hwx.inspire.demo import openDemoFile

model = openDemoFile("dangler_with_holes.stmod")
holes = model.holes

for aligned_holes in holes.aligned:
  bolt = inspire.Fastener(aligned_holes, color="green")
  print(bolt.name + " connects parts '" + aligned_holes[0].part.name +
        "' and '" + aligned_holes[1].part.name + "'")