Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector3D Normal(Solid3D.Face face, Point3D p)
- {
- return face
- .Parametric
- .SelectMany
- (s => s.PointInversion( p, 1e-3, out var coord2D )
- ? Some((p: s.PointAt(coord2D), n: s.Normal(coord2D)))
- : None )
- .MaxBy(q => p.DistanceTo(q.p))
- [0].n;
- }
Add Comment
Please, Sign In to add comment