Announcement

Collapse
No announcement yet.

contour like lines on SoFaceSet

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • contour like lines on SoFaceSet

    I want to display a well curve along well track filled with color. But there are many contour like lines on the image. See the attached picture. The codes are as follows:


    SoVertexProperty *vertexproperty = new SoVertexProperty;
    for ( int i = 0; i < facenum; i ++ )
    vertexproperty->orderedRGBA.set1Value(i, colors[i].getPackedValue() );
    vertexproperty->materialBinding = SoMaterialBinding::PER_FACE;
    vertexproperty->vertex.setValues(0, facenum*4, linever ); // each face has 4 vertex

    SoFaceSet *faceset=new SoFaceSet;
    faceset->numVertices.setValues(0, facenum, numver );
    faceset->vertexProperty.setValue( vertexproperty );

    SoShapeHints *facehints = new SoShapeHints;
    if (QString::compare(postype, "RIGHT",Qt::CaseInsensitive)==0) facehints->vertexOrdering = SoShapeHints::CLOCKWISE;
    else if(QString::compare(postype, "LEFT", Qt::CaseInsensitive)==0) facehints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE;
    facehints->faceType = SoShapeHints::CONVEX;
    facehints->creaseAngle = 1.0;
    facehints->windingType = SoShapeHints::NO_WINDING_TYPE;
    Attached Files

  • #2
    Hi,
    I don't see anything obvious wrong with your code. The problem could be in the data. For example, sometimes "patterns" can be seen if the normal vectors are not consistent.
    Regards,
    Mike

    Comment

    Working...
    X