Created
November 27, 2013 16:53
-
-
Save yasushisakai/7679119 to your computer and use it in GitHub Desktop.
deletes short crap curves
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscriptsyntax as rs | |
threshold = 5 # curves under this length will be deleted | |
cnt = 0 | |
for o in rs.AllObjects(): | |
crv = rs.coercecurve(o) | |
if crv is not None: | |
length = rs.CurveLength(o) | |
if length < threshold: | |
rs.DeleteObject(o) | |
cnt += 1 | |
print '...deleted %d short curves' % cnt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment