[v8i mdl] mdlMesh_newPolyfaceFromExpandedXYTriangulation Problems

Problem Image: http://imgur.com/Bfe978i 

For some reason when I try to mesh these points, the meshing API is connecting one side to the other instead of connecting to the nearest vertex.  The points are all laid out at approx 5 foot intervals.

I have tried all sorts of values for the expansionFraction, I have also tried the basic mdlMesh_newPolyfaceFromXYTriangulation call, same results.

MSElementDescrP mesh = NULL;

if(meshPoints.size() >= 3){

if (SUCCESS != mdlMesh_newPolyfaceFromExpandedXYTriangulation(&mesh, &meshPoints.at(0), meshPoints.size(), 0.1, true))
{
     return;
 }

}

Any ideas?

Parents
  • This is a 2D triangulation applied on a 3D dataset. This is what "XY" in function name conveys.

    It will only work if your point set is distributed close to a planar, possibly undulating surface.

    There is no telling how your dataset looks like when looking in direction which is parallell to Z-axis (because this is exactly how the triangulating engine "sees" your points, cheerfully disregarding their z-coordinates).

    If you want to triangulate a point set which looks crazy in such direction, you may rotate it prior to triangulating and unrotate the result afterwards.

    Cheers,

    /Chris Z.

Reply
  • This is a 2D triangulation applied on a 3D dataset. This is what "XY" in function name conveys.

    It will only work if your point set is distributed close to a planar, possibly undulating surface.

    There is no telling how your dataset looks like when looking in direction which is parallell to Z-axis (because this is exactly how the triangulating engine "sees" your points, cheerfully disregarding their z-coordinates).

    If you want to triangulate a point set which looks crazy in such direction, you may rotate it prior to triangulating and unrotate the result afterwards.

    Cheers,

    /Chris Z.

Children