File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Source/RunActivity/Viewer3D Expand file tree Collapse file tree 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()
15081508 }
15091509 break ;
15101510 }
1511+ // Limit the number of sections to prevent overflowing the number of triangles
1512+ if ( NumSections > 250 )
1513+ NumSections = 250 ;
15111514 // Ensure an even number of sections
15121515 if ( NumSections % 2 == 1 )
15131516 NumSections ++ ;
Original file line number Diff line number Diff line change @@ -838,6 +838,9 @@ public override void LinearGen()
838838 // Very short length track, use minimum of two sections
839839 if ( NumSections == 0 )
840840 NumSections = 2 ;
841+ // Limit the number of sections to prevent overflowing the number of triangles
842+ else if ( NumSections > 250 )
843+ NumSections = 250 ;
841844 // Ensure an even number of sections
842845 if ( NumSections % 2 == 1 )
843846 NumSections ++ ;
You can’t perform that action at this time.
0 commit comments