You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ShapeElementList only supports 170 num_segments? Too little #2794
ShapeElementList, as an efficient method for drawing batches, only supports 170 num_segments, which is too few or there may be some bugs.
Source code example
This is the official code for create_ellipse_filled, num_segments is a important argument, no problem.
def create_ellipse_filled(
center_x: float,
center_y: float,
width: float,
height: float,
color: RGBA255,
tilt_angle: float = 0,
num_segments: int = 128,
) -> Shape:
Args:
center_x: X position of the center of the ellipse
center_y: Y position of the center of the ellipse
width: Width of the ellipse
height: Height of the ellipse
color: A color such as a :py:class:`~arcade.types.Color`
tilt_angle: Angle to tilt the ellipse
num_segments: Number of segments to use to draw the ellipse
Problem occurred
But, if num_segments>170, ShapeElementList (ellipse_list) will disappear, ShapeElementList.draw() will draw nothing
As shown in the following code:
ellipse_list = ShapeElementList()
ellipse = create_ellipse_filled(0, 0, 500, 500, arcade.color.SPANISH_VIOLET, 0, num_segments=170)
ellipse_list.append(ellipse)
ellipse_list.draw() # if num_segments>170, ShapeElementList will disappear
Analyze
Repeated experiments have yielded the number 170, which is a very strange number. This should be a bug, theoretically ShapeElementList should accommodate a much larger quantity of num_segments than this 170.
When I tested create_ellipse_filled(400, 300, 200, 200, arcade.color.BLUE, num_segments=171) it drew the shape. I also tried create_ellipse_filled(400, 300, 200, 200, arcade.color.BLUE, num_segments=1000) for extra verification. There was no problem. It might have been fixed during an update or a rewrite. So this is no longer an issue.
Closing as can't reproduce: on current development, ellipses with 128, 170, 171, 200 and 1000 segments in a ShapeElementList all draw correctly. Please reopen with details if it still happens for you.
Activity
Harry-LDH commentedon Mar 27, 2026
When I tested
create_ellipse_filled(400, 300, 200, 200, arcade.color.BLUE, num_segments=171)it drew the shape. I also triedcreate_ellipse_filled(400, 300, 200, 200, arcade.color.BLUE, num_segments=1000)for extra verification. There was no problem. It might have been fixed during an update or a rewrite. So this is no longer an issue.pvcraven commentedon Oct 8, 2026
Closing as can't reproduce: on current development, ellipses with 128, 170, 171, 200 and 1000 segments in a
ShapeElementListall draw correctly. Please reopen with details if it still happens for you.