Triangle, Edge and Boundary

Nov 28, 2012 at 3:45 PM

Hallo,

is there a way to get the Boundary information from the three edges of a Triangle ?

i will hide the edges not lie on the boundary -- glEdgeFlag

Coordinator
Nov 28, 2012 at 8:15 PM
Edited Nov 28, 2012 at 8:18 PM

I will add a method to the ITriangle interface

public Segment GetSegment(int index)

so you will be able to check if the triangle has a boundary/constrained edge.

If it's just for rendering the geometry outline: have you considered using the mesh.Segments collection and GL_LINES.

Nov 29, 2012 at 11:32 AM
Edited Nov 29, 2012 at 3:33 PM

hallo,

this will be very nice.

public Segment GetSegment(int index)

index is index of Edge ??
Segment is != null if Edge is on the boundary or ??

 

http://img201.imageshack.us/img201/2385/bildschirmfoto46.png

http://img829.imageshack.us/img829/4853/bildschirmfoto47d.png

it should looks like geomview without the lines in planes - the outerbounds black and the inner in filled red.

If it's just for rendering the geometry outline: have you considered using the mesh.Segments collection and GL_LINES.

 

    glPolygonMode(GL_FRONT, GL_FILL);
    glPolygonMode(GL_BACK, GL_FILL);
    glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, gray);
    glMaterialfv(GL_FRONT, GL_SPECULAR, black);
    glMaterialf(GL_FRONT, GL_SHININESS, 0.0);
    glEnable(GL_LIGHTING);
    glEnable(GL_LIGHT0);
    glEnable(GL_POLYGON_OFFSET_FILL);
    glPolygonOffset(1.0, 1.0);
    glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);

    for(ii=1;ii<=iGLAnz;ii++) {

      glCallList(ii);
    }
    glDisable(GL_POLYGON_OFFSET_FILL);

    glDisable(GL_LIGHTING);
    glDisable(GL_LIGHT0);
    glColor3f (0.0, 0.0, 0.0);
    glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);


    for(ii=1;ii<=iGLAnz;ii++) {
      glCallList(ii);
    }
    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);

Coordinator
Nov 29, 2012 at 3:37 PM
Edited Dec 22, 2012 at 10:06 AM

The updated source code is now online. Take a look at the Topology page to see how the ITriangle data can be used. I've also created a small app which might help you: Triangle Explorer.

Nov 29, 2012 at 3:45 PM

you are the best !!!!!!!!!!!!