I found two ways to get the normal vector of a surface. One is working from the sample library however I do not understand the second one from the forum. Clement refers to “
Normal.Z” however I cannot find in the Rhino Common docs.
i would like to measure the normal-vector of a plane before and after rotation.
I only want those surfaces of a brep, which normal-vector in z-dir is -1 and lie at z=0:
for face in brep.Faces:
plane_of_face = face.TryGetPlane()
if int(plane_of_face.Normal) == -1 and plane_of_face.OriginZ == 0:
brepface_znormal1 = face
So my variable “brepface_znormal1” is the one which normal-vector I want to observe after rotation (user rotates and quits with “ESC”).
Nathan, can you help me how I can set multiple type of objects in the filter? I would like to select Surface and Brep as well.
gs.GeometryFilter = Rhino.DocObjects.ObjectType.Surface (I put 24 but got syntax error)
You can OR them together like here:
another thing that I already have code to get the surface and I need to reference.
I have found a GetOneObject with Objref. Can I use that class and connect with NormalAt method?