I'm trying to orient instances so that they align correctly to form same shape of the Mesh Object Input, here a pentagonal faces Dodecahedron. I've used Vertex Group Input to control the Guides param. of Direction to Rotation node, but it's a kind of dirty trick, not perfect clean math solution at all.How to orient instances correctly? blend file
This method works for any object which has symmetric faces of the same size. The main idea is to align the instance object's (in your case the Tritube) any axis (local) along the edges of the base object (in your case is the Pentaface).
Note: This method required that any symmetric face of the base object should not have any cutting edge. For example, a cube object should not have a diagonal edge in any its face or in case of Pentaface object:
Step-1: A edge has a start, end, and center. So, the equation below gives the guide for start and end:
Start-Center = guide at the start End-Center = guide at the end
To solve this for all edges, I have made a Guides for Direction Loop loop-node which takes the vertex locations, edges of the object and two empty vector lists, calculate the guides for each vertex. To simplify further, I have also made a AN-Guides for Direction group-node which automatically creates two empty lists for the Guides for Direction Loop node, so you only need to supply the vertex locations and edges:
Step-2: Then connect the vertex normals to direction and guides from the AN-Guides for Direction group-node to guides of the Direction to Rotation node: Sometimes, you may need to rotate the instance object (in your case the Tritube) in edit mode to match the direction of the edges of the base object.
Step-4: I have converted the node-tree of How to call vertex groups in Animation nodes into a group-node for easy usage: