I’m looking for a way to calculate the angle between a surface and the WorldXYPlane. Does anything exist where one could either select the surface or pass it’s GUID to a function that returns the angle between it and the WorldXYPlane?
I’m looking to build a function that will lay the plane flat against the WorldXYPlane. The object will only be rotated on one axis and will not be parallel to the plane. Goal is to rotate it parallel.
The main issue here is that with a planar surface, you are never sure of the orientation of the X and Y axes of the surface’s plane. So, it’s it perfectly possible to determine the angle between the plane surface’s normal and the World Z vector and rotate the surface so its normal is parallel to world Z, but I don’t know how the other axes will be oriented…
Here is a quick sketch in Python:
import rhinoscriptsyntax as rs
import scriptcontext as sc
def plSrf_filt(rhino_object, geometry, component_index):
msg="Select planar surfaces to rotate"
if not srf_ids: return
for srf_id in srf_ids: