File tree 2 files changed +6
-0
lines changed
Source/RunActivity/Viewer3D
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1508,6 +1508,9 @@ public virtual void CircArcGen()
1508
1508
}
1509
1509
break ;
1510
1510
}
1511
+ // Limit the number of sections to prevent overflowing the number of triangles
1512
+ if ( NumSections > 250 )
1513
+ NumSections = 250 ;
1511
1514
// Ensure an even number of sections
1512
1515
if ( NumSections % 2 == 1 )
1513
1516
NumSections ++ ;
Original file line number Diff line number Diff line change @@ -838,6 +838,9 @@ public override void LinearGen()
838
838
// Very short length track, use minimum of two sections
839
839
if ( NumSections == 0 )
840
840
NumSections = 2 ;
841
+ // Limit the number of sections to prevent overflowing the number of triangles
842
+ else if ( NumSections > 250 )
843
+ NumSections = 250 ;
841
844
// Ensure an even number of sections
842
845
if ( NumSections % 2 == 1 )
843
846
NumSections ++ ;
You can’t perform that action at this time.
0 commit comments