Skip to content

Commit ea98fad

Browse files
committed
fix net35 issue
1 parent 3bdabfa commit ea98fad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

io/OBJWriter.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ void write_triangles_bygroup(TextWriter writer, IMesh mesh, int[] mapV, bool bNo
6464
// would there be a faster way? could construct integer-pointer-list during initial
6565
// scan, this would need O(N) memory but then write is effectively O(N) instead of O(N*k)
6666

67-
SortedSet<int> vGroups = new SortedSet<int>();
67+
HashSet<int> vGroups = new HashSet<int>();
6868
foreach (int ti in mesh.TriangleIndices())
6969
vGroups.Add(mesh.GetTriangleGroup(ti));
7070

71-
foreach ( int g in vGroups ) {
71+
List<int> sortedGroups = new List<int>(vGroups);
72+
sortedGroups.Sort();
73+
foreach ( int g in sortedGroups ) {
7274
writer.WriteLine(string.Format("g mmGroup{0}", g));
7375

7476
foreach (int ti in mesh.TriangleIndices() ) {

0 commit comments

Comments
 (0)