Clarity required on placing a family

I am trying to place the bolts automatically based on the location of holes.
the bolt family was modelled with Z-axis (refer bolt image front view)

the bolts are placed perfectly good if the hole is in z-direction, but the bolts are not getting placed properly if the holes are in x or y direction ( i have attached the dynamo script)

A post was merged into an existing topic: Select Face Node is returning an error