Normal to a TIN surface at a point

Hi all!
Does anyone know a way to get the normal to a triangulation surface at a point?
As far as I understand, the node in the picture works with a different type of surface

Hi,
the TIN geometry must be converted to Dynamo geometry first. I did not find direct solution, but here is one.
acad_maVX392m4x
SurfaceNormalAtPoint.DYN (24.6 KB)

1 Like

Merci!!

This bit of Python will get the normal without having to do any geometry conversion, and returns the surface directly:

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

tinSrf = IN[0].InternalDBObject
dynPnt = IN[1]
tri = tinSrf.FindTriangleAtXY (dynPnt.X,dynPnt.Y)
xyzSet = [tri.Vertex1.Location, tri.Vertex2.Location,tri.Vertex3.Location]
pnts = [Point.ByCoordinates(i.X,i.Y,i.Z) for i in xyzSet]
srf = Surface.ByPatch(Polygon.ByPoints(pnts))
norm = Surface.NormalAtParameter(srf,0.5,0.5)
OUT = norm, srf
2 Likes