Hi,
I am wondering how to use this class.
I would like to get the 2d representation of a 3d shape (mesh) using the LSCM method.
So I tried:
var ptsBeforeUnwrapping = GetTexturePts(meshToUnwrap);
var unwrapper = new MeshUnwrapper(meshToUnwrap);
var result = unwrapper.Unwrap(MeshUnwrapMethod.LSCM);
var ptsAfterUnwrapping = GetTexturePts(meshToUnwrap);
private List<Point3d> GetTexturePts(Mesh meshToUnwrap)
{
var tc = meshToUnwrap.TextureCoordinates;
var pts = new List<Point3d>();
foreach (var item in tc)
pts.Add(new Point3d(item.X, item.Y, 0));
return pts;
}
I see as said in the API docu that the TextureCoordinates of the given mesh object changed, executing the Unwrap method. But how can I get a 2d mesh out of these? What do the TextureCoordinates actually represent?
My expectation was to get a new mesh object that lies in a plane, and ideally the distortions on its vertices. Is there a way this class can help me achieving this?
Thank you.