17 int len = 0, len2 = 0;
23 for( i = elems.
begin(); i != elem_begin; ++i )
25 rval =
iface.get_coords( &*i, 1, coords.
array() );
33 std::vector< EntityHandle > dum_vector;
34 for( i = elem_begin; i != poly_begin; ++i )
36 rval =
iface.get_connectivity( *i, conn, len,
true, &dum_vector );
39 rval =
iface.get_coords( conn, len, &( coordverts[0][0] ) );
41 for(
int j = 0; j < len; ++j )
53 for( i = poly_begin; i != set_begin; ++i )
55 rval =
iface.get_connectivity( *i, conn, len,
true );
58 for(
int j = 0; j < len; ++j )
60 rval =
iface.get_connectivity( conn[j], conn2, len2 );
62 rval =
iface.get_coords( conn2, len2, &( coordverts[0][0] ) );
64 for(
int k = 0; k < len2; ++k )
74 for( i = set_begin; i != elems.
end(); ++i )
77 rval =
iface.get_entities_by_handle( *i, tmp_elems );
79 rval = box.
update(
iface, tmp_elems, spherical, radius );
93 double in_plane_positions[20];
94 for(
int i = 0; i < len && i < 10; i++ )
98 double oriented_area2 = 0;
101 for(
int i = 0; i < len; i++ )
103 int i1 = ( i + 1 ) % len;
105 double ax = in_plane_positions[2 * i], ay = in_plane_positions[2 * i + 1];
106 double bx = in_plane_positions[2 * i1], by = in_plane_positions[2 * i1 + 1];
109 double alfa = ay / ( ay - by );
110 double xintx = ax + alfa * ( bx - ax );
117 double alfa = ax / ( ax - bx );
118 double yintx = ay + alfa * ( by - ay );
123 oriented_area2 += ( ax * by - ay * bx );
125 if( fabs( oriented_area2 ) >
R *
R * 1.e-6 )