SetEdgeVisibility (C++)


I wrote a modifier plugin that will set the visibility of edges on trimesh. my question is how I can find border edges and exclude them from this change? In other word I want to keep border edges untouched. This is my function that my thought was should work, but I don’t know why it’s not working as expected:

void ModifyTriObject(TimeValue t, ModContext &mc, TriObject *tobj)
   Interval iv = FOREVER;
   int i, j;
   Mesh &mesh = tobj->GetMesh();
   BitArray openEdges;
   for (i = 0; i < mesh.numFaces; i++)
      for (j = 0; j < 3; j++)
         mesh.faces[i].setEdgeVis(j, openEdges[i*j]);
   tobj->UpdateValidity(GEOM_CHAN_NUM, iv);





Thank You!