isVertical? isHorizontal?

I sometimes find myself chasing small errors that are the result of a planar surface, that I thought was dead vertical or horizontal, was actually not quite. Is there a command in Rhino that checks if a planar surface is vertical or horizontal? For example “isVertical” or “isHorizontal”? I realise I can switch views and eye-ball the surface, however it would be nice to have a command that performs a quick calculation and outputs a yes/no response.

Hello - that does not exist but should be easy enough to script - if no one gets to it before me, I’ll have a look. IsVertical etc. would need to ask, relative to which CPlane? , unless you always assume the active cplane or always assume the World…

@lindsay.j.toy you can try this - it checks the orientation of a planar surface relative to the world and reports back either horizontal or vertical or the angle if neither. (2.1 KB)

@lindsay.j.toy - tuned up a bit here to accept planar curves and lines as objects to check.

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"


1 Like

Hi Pascal, thanks for your reply - yes, I would assume always relative to the world.

…in which case I guess the commands could be “isVerticalToWorld” and “isHorizontalToWorld”.