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
When using the method scale(k, scale_stroke=True)on a VGroup, the submobjects stroke_width are all set to the one of the VGroup (default 4) and then rescaled, even if they were having different stroke_width before.
Expected behavior
When applying the method scale(k, scale_stroke=True) to a VGroup, the submobjects should have their stroke_width rescale proportionally to their initial individualstroke_width. Especially, scale(1.0, scale_stroke=True) shouldn't change the submobjects (see code example)
Environment is the official Manim docker image used as a devcontainer on MacOS 15.4.1 (Sequoia)
Additional comments
When calling scale(k, scale_stroke=True) the method scale calls the method set_stroke with the value abs(scale_factor) * self.get_stroke_width() computed on the current MObject (the VGroup).
Description of bug / unexpected behavior
When using the method
scale(k, scale_stroke=True)
on aVGroup
, the submobjectsstroke_width
are all set to the one of theVGroup
(default4
) and then rescaled, even if they were having differentstroke_width
before.Expected behavior
When applying the method
scale(k, scale_stroke=True)
to aVGroup
, the submobjects should have theirstroke_width
rescale proportionally to their initial individualstroke_width
. Especially,scale(1.0, scale_stroke=True)
shouldn't change the submobjects (see code example)How to reproduce the issue
See code example.
Code for reproducing the problem
System specifications
System Details
Environment is the official Manim docker image used as a devcontainer on MacOS 15.4.1 (Sequoia)
Additional comments
When calling
scale(k, scale_stroke=True)
the methodscale
calls the methodset_stroke
with the valueabs(scale_factor) * self.get_stroke_width()
computed on the current MObject (theVGroup
).manim/manim/mobject/types/vectorized_mobject.py
Lines 524 to 531 in f304bd9
But because the current MObject is a
VGroup
, this value is then propagated to all submobjects:manim/manim/mobject/types/vectorized_mobject.py
Lines 331 to 333 in f304bd9
The text was updated successfully, but these errors were encountered: