I'm a bit rusty on TreeView objects, but as far as I know and recall; You would need one main for loop and a set of if statements each with a secondary. It would be best focus on keeping track of the object's parent rather than it's child since naturally all objects can have only one parent, by many children.

Something like:
[pascal]for i := lower(List.Items) to upper(List.Items) do
begin
if (List.Items[i].StructureType = stGroup) then
begin
for j := lower(List.Items) to upper(List.Items) do
{find parent in List, if any, and stick it inside that one}
end;
if (List.Items[i].StructureType = stPolyhedron) then
begin
for j := lower(List.Items) to upper(List.Items) do
{find parent in List and stick it inside that one}
end;
if (List.Items[i].StructureType = stFace) then
begin
for j := lower(List.Items) to upper(List.Items) do
{find parent in List and stick it inside that one}
end;
{etc...}
end;[/pascal]

I believe you get the point right? This is the most straitforward way to do it, I think. There may be a better way to do it, but if someone can correct me, I'd be most interested. This is the way I've always done this type of structure listing.