ManimCommunity / ManimCommunity/manim
Cleaning up geometry module: New Tipable module
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Enhancement proposal
### New Module
The `geometry` module is extremely crowded (2558 lines, 39 classes).
Therefor I suggest moving the classes connected to arrows to a now module, which could be named `tipable.py`.
This should includes the following:
- TipableVMobject
- Arrow
- Vector
- DoubleArrow
- CurvedArrow
- CurvedDoubleArrow
- ArrowTip
- ArrowCircleFilledTip
- ArrowCircleTip
- ArrowSquareFilledTip
- ArrowSquareTip
- ArrowTriangleFilledTip
- ArrowTriangleTip
### Combining classes
The number of classes is quite a bit over the top in my opinion. I feel like adding an aditional parameter wold be a better choice in many cases:
- Giving Arrow two parameters `double` and `curved` both defaulting to `False` would deprecate DoubleArrow, CurvedArrow and CurvedDoubleArrow (Imo whether CurvedArrow should be deprecated is debatable).
- The ArrowTip should get a parameter `filled` defaulting to `False`. This would deprecate the three filled variant classes.
### Class renamings:
The (remaining) arrow tip classes ought to be renamed:
- ArrowCircleTip => CircleArrowTip
- ArrowSquareTip => SquareArrowTip
- ArrowTriangleTip => TriangleArrowTip, however it might also be a good idea to combine TriangleArrowTip and ArrowTip in ArrowTip.
### Edit: Total Tippable breakdown
After having a chat with @XorUnison I might as well deprecate Tipable and the differnt ArrowTip subclasses all together - we'll see how that turns out :D
## Additional comments
Please add a comment if you want to work on this issue, as it may well be I already started doing so :)
Contributor guide
Assessment
This issue has not been assessed yet.