Explode a polyline by angle?


#1

Is there a way to explode a polyline only at points sharper than a certain angle? In other words, explode a polyline, but leave the segments joined when the angle is more open than 120* (or some other amount I determine). So the polyline would become unjoined at every joint that was sharp, and stay joined where the change in degree was shallow. Hope that’s clear enough…


Ofsetting closed curve fails
(Pascal Golay) #2

Hi Heath- I dug this up- SplitAtAngle - unzip, then drag and drop for SplitAtAngle as an alias. See if that is what you need- it’s old and probably not well tested… =)

-Pascal


#3

Almost perfect!

I knew a script like this was posted at some point, but as we all know, the old newsgroup is virtually impossible to search. Glad for this change.

One problem: this works on one polyline at a time. I need to do hundreds… doing them all at once would be a massive bonus.


(Pascal Golay) #4

OK, hang on a bit.


#5

You rock. I expect it on my desk when I get back from lunch. :wink:


(Pascal Golay) #6

Heath, I replaced the file on my Google drive- see if poking the original link gets you a new version… just curious. I’ll make another link in case: Here


#7

Here’s one from my library, I just quickly modded an existing similar function.
----H


#8

Thanks to you both! Works like a charm. I had a ton of lines that I received that had segments that should have been arcs but were lots of little polylines. Exploding out just the hard angles, I was able to rebuild as 3 points, degree 2, just the sections that were lots of little polylines (leaving them joined) and got it all cleaned up. Saved me a ton of work. :smile:


#9

Oh, then you might have actually wanted this one, which is the original script I modified, or this one, which is similar…


#10

Even more super-super awesomeness. Thanks!


#11

@pascal, @Helvetosaur,

i’ve relinked this thread from another thread, however all the scripts posted here seem to either cause a dropbox error (Mitch) or show a CRC when extracting the zip file (Pascal). Please re-upload if possible.

thanks,
c.


#12

There are a lot of good scripts posted here which get buried over time with the other posts. A general repository (a huge library) would be very welcomed, I think. Or at least tell us where do you keep them all :slight_smile:


#13

would be a nice idea!


(Pascal Golay) #14

Hi Clement, thanks, I see that file is bogus - I do not see an original that I can get to here, but I’ll check on the office machine on Monday.

-Pascal


(Nathan 'jesterKing' Letwory) #15

food4rhino.com