i sometimes have polysufaces with surfaces that aren’t planar when they should/can be. i’m not talking about large deviations. kind of around the 1/16th to 1/32 deviation. keeping in mind that they are part of a closed solid. i realize i may have to extract the surface, make it planar then reedit the polysurface to make it solid again. project to cplane doesn’t quite get it cause i want the averaged plane.
Hello - I’d extract the face, Mesh
it, Set a plane through the mesh (PlaneThroughPt
) and then trim that, or use it to set a cplane, and ProjectToCPlane
the original…
-Pascal
Extend the surface and trim it with a plane
nice, i always forget that i can use mesh tools for surface operations. thank you.
@kleerkoat - see if this does anything useful to automate this - currently it leaves the original in place.
FlattenSrf.py (1.2 KB)
To use the Python script use RunPythonScript
, or a macro:
_-RunPythonScript "Full path to py file inside double-quotes"
-Pascal
Pascal beat me to it here, but I adapted a previous script that only worked on curves to take both curves and surfaces… let me know how it works for you.
PlanarizeCurvesSrfs.py (3.8 KB)
I use gumball to flatten stuff. click the appropriate handle then enter zero and hit enter.
Yeah, the limitation there is that it flattens to the Gumball orientation and location - the idea here is to get a best fit plane from the input and flatten to that.
-Pascal
i got yours to work once and then i started getting this error
i’m not sure how/what i’m picking, lol. i just did default and it’s not coming back as planar
Hm - wow we’re batting 1000 - post an example… I’ll have a look.
-Pascal
stupid me, i didn’t make my alias for it yet and i ran flattensrf
oops.
If it ran once, I probably messed something up on the sticky storing of options or reporting. It was late. Will check/fix tomorrow.
OK, yeah, just a stupid typo in the line for retrieving previous choices from the sticky dictionary. Fixed, please re-download from the link in the post above.