Hi Jeff,
Sorry about the delay, the office moving is almost complete now.
ac_object_get_triangle_surfaces uses surface_get_triangulations so I can't only think that there may be non-poly or surfaces with < 3 vertices.
Remember that the triangulation of a surface may fail fail (you get an empty list returned).
ac_object_get_triangle_surfaces looks like this:
Code:
Prototype List *ac_object_get_triangle_surfaces(ACObject *ob) // free with ac_surfacelist_free(&result)
{
List *tri = NULL;
int n = 0;
for (List *sp = ob->surfacelist; sp != NULL; sp = sp->next, n++)
{
Surface *s = (Surface *)sp->data;
if ((s->numvert < 3) || (s->type != SURFACE_POLYGON) )
continue;
if (s->numvert > 3)
{
List *slist = (List *)surface_get_triangulations(s);
list_prepend_list(&tri, slist);
}
else
{
Surface *ns = surface_clone(s, ob);
list_add_item_head(&tri, (void *)ns);
}
} // end for all surfaces in object
return(tri);
}