Flatten a slightly twisted four-cornered surface automatically


#1

See attached file… I’d really like to do this automatically. Is there already a way to do this? I have a ton of SrfPt surfaces (four corners) that I’d like to find the average flat for. I think the file makes it clear what I need to do… any method that works is fine, as long as I end up with a four-cornered SrfPt that is totally flat based upon the “center” of the original surface. Make sense? Thanks!

flatten_automate.3dm


#2

Hi Heath
You might try this… It’s a Python script (so much more elegant to write in this case than Rhinoscript). If you need a vb Rhinoscript script let me know. This one’s not drag 'n drop, but I can make it so if you need.

–Mitch

Planarize4SideSrfs.py


#3

Thanks… never used a python script before. Is there some secret to it? Thanks a bunch.


#4

Hang on, let me set it up better for you then…


#5

OK, worse than I thought, looks like I can’t set it up as drag 'n drop because Python scripts can’t be loaded as startup scripts… :disappointed: (or else I don’t know how)

I always run this stuff from toolbar buttons, manually added aliases or from the Python editor itself… Looks like the system needs improvement…

Just to test to see if it’s doing what you want (before I re-write it in vb) try the following: Type EditPythonScript at the command line, and then from inside the editor, use File>Open, browse to the script location and load it into the editor. Then press the green arrow to run the script.

If the result is what you’re expecting, I’ll write a vb Rhinoscript equivalent.

–Mitch


#6

@heath OK, attached is a drag 'n drop vb version…

Planarize4SideSrfs.rvb


#7

You. Are. Awesome. Thank you so much. :smile: