Reorient several group axes



I created a set of tubes with the lines to tubes extension and each individual tube has its axes oriented to the global axes (as expected).

I want to replace all the tubes with a component.

Is there a way (or plugin) to reorient the axes along the longest edge of each tube to simplify the process? Maybe another plugin that creates the tubes the way I need them?

I could quickly do it one by one but there are too many…

Take a look:

This is what one of the tubes looks like

And these are all the tubes I need to fix (2892!)

I’ll appreciate any help.


I wonder if you took the wrong route to create the (set of? ) strings with the wrong plugin. Are the tubes all unique groups? I guess so, (different axes orientation).
Even if the groups are recreated/converted into a set of component instances (all copies of the same component) with one of their axes along the tube’s direction, you would still have to get the ends intersected properly (taken that you want the whole string printed/printable in the end).

Maybe you are better off by using TubeAlongPath.rb (by Tig) on the few sets of tangled edge strings. The edges need to be connected in a string!
This plugin would create proper connections at the end of each tube.


Thank you. You’re right, I could make the tubes again as a single solid, but I need them sepparated as instances to add further detail. This model is not for 3d printing.


So ends of tubes are flat. That doesn’tmatter?
And each old group is unique and thus will be altered into a unique group or component with new proper sets of axes?
(In case of components they will be unique but the same).
There must be a plugin that converts (replaces) edges by a component (here a tube).
At one time @sdmitch kindly wrote a plugin to do just that. Edges, irrespective of their different lengths, could be replaced by a component of choice in the ‘InModel’ component library. The length of each edge would be used as a scale factor for the replacing component. Your same edges would result in same tube instances of one component with proper axes.
Maybe @sdmitch could chime in with (an update of) that plugin.

p.s. credits to @sdmitch


I have attached a copy of the “Edge to Component” plugin Wo3Dan mentioned. The edge is assumed to be the Z axis of the component. To use Extensions>SDM Tools>CorG Tool>Edge to Component.
Edge to Component.rb (3.1 KB)


Thank you! I think that’s just what I need. I’ll check it out tomorrow, I’m having some technical issues. But thanks nonetheless!


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.