Guest User

Untitled

a guest
Nov 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. Vector3D Normal(Solid3D.Face face, Point3D p)
  2. {
  3. return face
  4. .Parametric
  5. .SelectMany
  6. (s => s.PointInversion( p, 1e-3, out var coord2D )
  7. ? Some((p: s.PointAt(coord2D), n: s.Normal(coord2D)))
  8. : None )
  9. .MaxBy(q => p.DistanceTo(q.p))
  10. [0].n;
  11. }
Add Comment
Please, Sign In to add comment