PDA

View Full Version : Convert tube into curve



samscudder
02-01-2014, 06:43 AM
I have an object with several dozen "tubes" modeled, and I need to change the cross-section of the tubes from triangular to hexagonal. Is there any tool for converting the triangular tube back into a curve so I can re-railextrude a hexagon along the path?

I tried welding the points together but since the tubes have complex paths manually doing this is impracticle. Anybody know a process, plugin, script or tool than could help me to do this?

Thanks for the help!

Sensei
02-01-2014, 07:31 AM
EasySpline
http://www.easyspline.com
has tools Trace Spline and Trace Closed Spline.
http://www.youtube.com/watch?v=xtZUKmiltqY
They allow ultra easy conversion of geometry to spline cage. See video tutorial.

erikals
02-01-2014, 09:28 AM
depending, this could work

first, delete any Ngons,
now hit Shift+D, use Metaform, you should now have a hexa shape
use "point normal move" to re-adjust the thickness of the tubes...

if not, please provide screengrab

samscudder
02-01-2014, 10:29 AM
Here's a couple of the tubes that now exist... They have a triangular cross section: I've highlighted a polygon from the object so you can imagine the mesh... The triangles are not polygons, just polygon edges.

119807

Any way to collapse the 3 points into a single point and merge the polygons together into a single curve?

I had imagined that turning them into curves would allow me to rail extrude hexagons along them to get the results I need.

Thanks for the suggestions so far.

JoePoe
02-01-2014, 11:04 AM
erikals - I like it!


Any way to collapse the 3 points into a single point and merge the polygons together into a single curve?

I had imagined that turning them into curves would allow me to rail extrude hexagons along them to get the results I need.

Thanks for the suggestions so far.

Yes you can do exactly that....

First, I also suggest getting rid of any end cap geometry first....
Method 1) Easiest way. If you don't mind a small offset in location..... you can select one edge length > switch to points > copy/paste into new layer > lasso select all at once > create open curve > rail extrude your new shape.

Method 2) if placement needs to be exact.... Use Move Plus (or point normal move) to squeeze the vertices in tight on each other along the path > Merge points (with a fixed tolerance to catch the three-point groupings). Now you have a two point poly chain, but you can't use it just yet because the point order will be screwy.
So.... Two options.
A) hand select the point order and Make Open Curve. Fine if your tubes aren't too long. Could be a pain if they're long or super curvy.
B) Select all edges (by selecting an end edge and expanding out through the full length) press "e" for extend, with the new edges still selected immediately switch to points, copy/paste into a new layer.... viola, you now have a properly ordered set of points. Select all points at one time and make open curve. That's your new curve for rail extrude!! :hey:

Edit: you can do "B)" with points or edges. So select an end point > expand selection through length > "e" > copy/paste to new layer > select all in one shot > make open curve.

Oedo 808
02-01-2014, 12:00 PM
2) if placement needs to be exact.... Use Move Plus (or point normal move) to squeeze the vertices in tight on each other along the path > Merge points (with a fixed tolerance to catch them all). Now you have a two point poly chain, but you can't use it just yet because the point order will be screwy.
So.... Two options.

Hi Joe, at which point do you do this, I got a bit lost, lol, not that I need it for anything I'm just not following.

samscudder
02-01-2014, 12:35 PM
Ok... I managed to get it to work...

Copy tube into an empty layer
Did a modify->point nomal move
detail->merge points with a very small offset (say 10mm)
select all point (point select mode, and hit ")
make open curve (^P) - (this worked directly on the one I tested as it was created by a rail extrude in the first place, so I guess the points are in order)

Thanks everybody, and especially JoePoe (and erikals for the point normal move)

BTW you wouldn't happen to know how to do a point normal move in LScript, do you? I've been googling a lot but haven't found any reference to it. I was hoping to make up a script to automate the process a bit.

Thanks again!

JoePoe
02-01-2014, 12:36 PM
Hi Joe, at which point do you do this, I got a bit lost, lol, not that I need it for anything I'm just not following.

Sorry, the 1) and 2) were confusing. I didn't mean them as steps 1 and 2. Rather method number 1 and method number 2 (now changed).
So after removing the end caps it would be the first step in that method. It's sort of a hack to weld averaging the three points at every triangle "cross section".

JoePoe
02-01-2014, 12:43 PM
Ok... I managed to get it to work...

BTW you wouldn't happen to know how to do a point normal move in LScript, do you? I've been googling a lot but haven't found any reference to it. I was hoping to make up a script to automate the process a bit.

Thanks again!

Good!!

Any new script to automate would be great.

But look at Move Plus first (Modify Tab > Translate > more > move plus).... it might be what you're thinking about.
It's an interactive point normal move. You use it by clicking and dragging with the RIGHT mouse button.

I use that for eyeball/rough moves, and Point Normal Move for precision.

samscudder
02-01-2014, 12:57 PM
Move Plus (RMB) is doing the same thing on a larger scale, but I can't figure out how to use the numeric parameters... In Point Normal Move, I managed to get the numeric input to work.

Just realized I can use about the same process to import Maya hair into LW! That *would* need to be automated though, hate to have to convert thousands of hair strand polygons into curves by hand...

Oedo 808
02-01-2014, 01:45 PM
Sorry, the 1) and 2) were confusing. I didn't mean them as steps 1 and 2. Rather method number 1 and method number 2 (now changed).
So after removing the end caps it would be the first step in that method. It's sort of a hack to weld averaging the three points at every triangle "cross section".

Don't worry it's just me being thick, I thought he had managed to get himself a network of 2-point polys trying to make a new spline, so normal move wouldn't have worked, and if he did it latterly he'd just be putting back to the centre of the offset line, which is why I was getting confused, which isn't difficult it would seem.

I'm still blaming you though :p select in edges then convert to points? That is what would have been needed if it was 2-point polies, I need a drink. :stumped:


Move Plus (RMB) is doing the same thing on a larger scale, but I can't figure out how to use the numeric parameters... In Point Normal Move, I managed to get the numeric input to work.

It can be confusing, it's the up and down motion that controls it so even though it changes numerically on a lateral axis, that number means nothing. If you manipulate it in the back or side viewport, the Y axis is what will control the movement. If you zoom right in to the orthographic viewports and operate the tool in there while keeping an eye on it in the perspective, that should give you the control you need as the zooming in will make it move in smaller increments, just give it a moment to catch up if you're moving a lot of polys at once.

spherical
02-01-2014, 03:01 PM
How about take the original extruded triangle tube > Subdivide. This creates a hexagon cross section, but it isn't regular; the intermediate points are pulled in a bit. But, Select Loop on those three point chains and Move Plus into a regular hexagon.

JoePoe
02-01-2014, 03:09 PM
How about take the original extruded triangle > Subdivide. This creates a hexagon cross section, but it isn't regular; the intermediate points are pulled in a bit. But, Select Loop on those three point chains and Move Plus into a regular hexagon.

Yup. Just as Erikals said in #3. ;)


....I'm still blaming you though :p select in edges then convert to points? That is what would have been needed if it was 2-point polies, I need a drink. :stumped:

Now I'm confused.... it is a 2-point poly chain after the merge. Keep in mind that I'm in 9.6 and can't copy edges (no, i can't use Edge Pack plug). Maybe that would be different? I'll join you for that drink. :beerchug:

spherical
02-01-2014, 03:13 PM
Yup. Just as Erikals said in #3. ;)

Shift-D doesn't translate when you aren't super used to keyboard shortcuts. Move along. Nothing to see.

JoePoe
02-01-2014, 03:17 PM
:lol:

Oedo 808
02-01-2014, 03:37 PM
Lol, I thought it was all two points before the merge, part misreading and because I have normals on in perspective, then if he wanted to select a row of points he would need to use edges, with ordinary polys I'd just go straight for points. I'm blaming sleep deprivation, because it's my right as a citizen of the 21st century, not to accept any personal responsibility!

erikals
02-01-2014, 08:00 PM
Shift-D doesn't translate when you aren't super used to keyboard shortcuts. Move along. Nothing to see.

if you don't know this one... http://erikalstad.com/backup/misc.php_files/wink.gif

spherical
02-01-2014, 08:43 PM
What are you attempting to say?

jeric_synergy
02-01-2014, 10:34 PM
Aggravation: usually when you use a LWM tool it retains the last used values, so if you want you can just invoke it again and do what it last did with APPLY.

But with MOVE PLUS? nooooooooooooooooooooooo

Another aggravating inconsistancy.

spherical
02-01-2014, 10:53 PM
What's the emoticon for dismayed?

jeric_synergy
02-01-2014, 11:04 PM
Whoever coded "Move Plus" is an idiot.


First off: in the numeric panel it says "Translate".
Doesn't retain values. (see post #19)
RMB action isn't distinguished in any way in the UI.
No Falloff options (wtf?)

P.O.C.

erikals
02-02-2014, 06:46 AM
i'll agree i never saw the point of "Move Plus"

...and several other ones

might post some YouTube videos on that...

jeric_synergy
02-02-2014, 09:36 AM
OTOH, PointNormalMove works a treat.

Is RMB Move+ doing a point normal or a poly normal move??