PDA

View Full Version : Alternate edge removal LS



3DBob
04-06-2010, 12:07 PM
Hi all,

I wonder if anyone knows of an LS that will merge pairs of polys around an open cylinder such that say a 20 sided cylinder would become a 10 sided one with effectively the alternate edges removed?

Much appreciated if anyone can help me on this. What would work is the following

- User selects an edge, script then does the following:-

1. Selects edge ring
2. select Nth with settings n:2 and offset:1
3. using the dissolve tool - it removes the edge
4. selects all points with only one poly attached
5. delete the selected points

this does what I want - but at the moment I have to run the various commands.

3DBob

LightFreeze
04-06-2010, 02:24 PM
try this, might do what you want, select an edge and run

3DBob
04-06-2010, 02:38 PM
Hi LightFreeze

Right - I see, it works if you select a poly rather than an edge

This is BRILLIANT and wayyy faster than what I had done

Thanks LOADS

3DBob

3DBob
04-06-2010, 02:45 PM
OK - seemed to work

However - produces 1 clean end (See End1.png) - with the other choosing different points so doesn't create a clean reduce (See End2.png).


3DBob

LightFreeze
04-06-2010, 03:46 PM
it does this if you give it an edge.

Selects a loop (using Modelers Loop Selection which doesnt always work)

gets the selected points

moves the nth+1 point onto the nth point all the way along the loop

merges the selected points

3DBob
04-06-2010, 04:11 PM
Ah that is where Its not working - I need to select a longitudinal edge and then do edge ring rather than edge loop and merge both ends of a one segment cylinder at the same time in the correspnding order. That way I can merge adjacent pairs of polys on multiple cylinders just by selecting an edge on each one.

This is nearly that

3DBOB

LightFreeze
04-06-2010, 04:27 PM
select the top and bottom edge at the same time? (I think thats what you mean)

3DBob
04-06-2010, 04:37 PM
Whilst this may work ( not at computer to check ) it involves two matched clicks per cylinder rather than one and is difficult to do on very long off- axis cylinders like the ones in my screen grab.

So I mean to select a single edge on the side of the cylinder not any on the open edge - doing this and using "edge ring" selects stuff in right order

3DBob

LightFreeze
04-06-2010, 05:24 PM
try this one, if its no good will need to wait till tomorrow

3DBob
04-07-2010, 03:11 AM
Hi Steven,

Ok, that does exactly what I want, thanks so much, I owe you one - it even works on multiple cylinder selections and with a "select loop" first, it works on piping - Nice. Check out the animated gifs below. This will be really handy for optimising geometry in a controlled and desirable manner.

There are two minor issues - it leaves some things selected at the end (minor workflow issue) and see the error message (non critical).

An interpretation of this idea might be one that would have a user definable angle, it would remove all edges around say an open "box" like tube that fell below this angle.

Thanks again. You are a genius!

3DBob

probiner
04-07-2010, 03:20 AM
good job

zardoz
04-07-2010, 03:51 AM
amazing script. really. some minor issues, but amazing. Thanks for this.

geo_n
04-07-2010, 04:33 AM
cool. could it do it in reverse? adding extra edges but predicting contour.
max calls it flow connect

3DBob
04-07-2010, 04:39 AM
I was thinking about that too, would be very nice, but more complex.... Needs to work out angle and so forth or split poly and then move points to intersection of projected poly tangents and poly plane. though I may be making this more complex than it need be.

Might be taking the mick to ask LightFreeze to come up with that.

3DBob

LightFreeze
04-07-2010, 11:48 AM
Sorry guys, its just luck that it works on pipes with a select loop, it was designed for Bobs specific query and is actually very simple.

The additional features requests would mean a very different and complex script.

That said this version should fix the mentioned errors

3DBob
04-07-2010, 11:55 AM
Actually LightFreeze, I discovered you don't have to use select loop - It does the reduction anyway!!

Cudos, and thanks for the update.

3DBob

LightFreeze
04-07-2010, 12:35 PM
no problem, caught me in a curious mode :devil:

3DBob
04-07-2010, 02:24 PM
New one is much faster - so once again, thanks.

Let me know when you are curious again

3DBob

daforum
04-08-2010, 03:53 AM
Thanks for the script LightFreeze. Used it this morning and works very well:thumbsup: