How to get uv direction for surface

how to get uv direction correctly for surface, SurfaceCurvature.Direction is reverse for some surfaces.

var curvature = face.CurvatureAt(uValue, vValue);
var uDirection = curvature.Direction(0)

1 Like

Hi @shen,

Can you post a .3dm file that contains the surface in question?

Thanks,

– Dale


the black line is U, the red line is curvature.Direction(0), seems Direction(0) is not same as U

surfaceDirection.3dm (103.3 KB)

any idea?

You should look at the first derivatives, not the curvature.

int numberOfDerivatives = 1;
face.Evaluate(uValue, vValue, numberOfDerivatives , out Point3d pt, out Vector3d[] derivatives);
var uDirection = derivatives[0];
var vDirection = derivatives[1];

thanks Menno.