SpotWeld (hwx.inspire)#

class SpotWeld(partsPoints, **kwds)#

Bases: Connector

Spot welds two or more parts together.

Spot welds connect parts together by welding them at specific locations.

Attribute Table#

Name

Type

diameter

Double

location

property

material

Reference

parts

List

points

property

weldGroup

property

Example

from hwx import inspire
from hwx.inspire.core import openTutorialFile

model = openTutorialFile('Structures/spotweld.stmod')
weldPoints = model.getChild('weld location points 1', recursive=True)
parts = [model.getChild('double-hanger', recursive=True),
         model.getChild('bottom', recursive=True),
         model.getChild('top', recursive=True)]

group = inspire.core.WeldGroup()
for pt in weldPoints.features:
  points = [
      parts[0].getRayIntersections(pt.location, (0, 0, 1))[0],
      parts[1].getRayIntersections(pt.location, (0, 0, -1))[0],
      parts[2].getRayIntersections(pt.location, (0, 0, -1))[0]
  ]
  weld = inspire.core.SpotWeld([
    [parts[0], points[0]], 
    [parts[1], points[1]], 
    [parts[2], points[2]]
  ])
  group.add(weld)

# Get number of spotwelds
print("Model has " +str(len(model.spotWelds))+" spotwelds")

# Get all spotwelds
print("Spotwelds : "+str(model.spotWelds))

# Get participating parts in Spot Weld 50
print("Participating parts in "+model.spotWelds[0].name+" are "+     str(model.spotWelds[0].parts))
property parts#

The parts connected by the spot weld.

property diameter#

The diameter of the connector.

property material#

The material of the connector.