Question about Principal curvature lines on surfaces

rhino
grasshopper
unhandled

(Zhaolun_yang) #1

hi,everyone~

When i tried to use this method (from David Rutten&Tom Jankowski http://www.grasshopper3d.com/forum/topics/principal-curvature-lines-on) to produce principal curvature lines ,I found several lines have sharp turns. some angles between pre-vector and next-vector is nearly 90 degree ,which might cause this problems.


smooth%20principle%20curve
(Chinese means: principal curvature lines on normal nurbs surface)

`
maybe we can rotate this vectors in a slight angle to produce smooth principal curvature lines,just like this picture (following fig).so i set a point to test my thought. and i put following codes into yours,but it did work to specific curve. it cannot apply to several curves.

can anyone give me some advice?
thanks a lot!

If (Not IsNothing(PrevDir)) Then _
_ If (dir.IsParallelTo(PrevDir, 0.5 * Math.PI) < 0) Then _
_ dir.Reverse()

_ End If_
_ if (dir.IsPerpendicularTo(PrevDir,rAngle) then_
_ dir.rotate( fAngle ,crv.Normal)_
_ End If_
End If

PrincipalCurvatures.gh (41.9 KB)