Home
Reply
Contributor
thomasyong12
Posts: 13

Checking an edge is bounded by 2 vertice

How do I check whether an edge is bounded by 2 vertice?

I want to know is there an edge connecting the 2 vertice I created using ACIS function and not graphic display.

 

Thank you.

Regular Contributor
Vi2
Posts: 55

Re: Checking an edge is bounded by 2 vertice

 

EDGE* bound_by_2_vertice(const VERTEX* v1, const VERTEX* v2)
{
	ENTITY_LIST v1edgelist, v2edgelist;
	api_q_edges_around_vertex(v1, &v1edgelist);
	api_q_edges_around_vertex(v2, &v2edgelist);

	ENITITY* e;

	v1edgelist.init();
	while( (e = v1edgelist.next()) != NULL )
	{
		if (v2edgelist.lookup(e) >= 0)
			break;
	}
return e;
}