Skip to content

[Bug]: split_bezier_intersecting_with_closedpath fails to return #27753

Closed
@setrofim

Description

@setrofim

Bug summary

It looks like, for some inputs, split_bezier_intersecting_with_closedpath never returns, as the while True: loop inside find_bezier_t_intersecting_with_closedpath fails to converge.

Code for reproduction

from matplotlib.patches import inside_circle, split_bezier_intersecting_with_closedpath

arrow_path = [(96950809781500.0, 804.7503795623779), (96950809781500.0, 859.6242585800646), (96950809781500.0, 914.4981375977513)]
in_f = inside_circle(96950809781500.0, 804.7503795623779, 0.06)
split_bezier_intersecting_with_closedpath(arrow_path, in_f)

Actual outcome

The call to split_bezier_intersecting_with_closedpath never returns.

Expected outcome

The call to split_bezier_intersecting_with_closedpath should return the split segment.

Additional information

No response

Operating system

confirmed on Arch and Ubuntu 22.04 LTS

Matplotlib Version

3.8.2

Matplotlib Backend

agg

Python version

3.11.6 (Arch) and 3.10.12 (Ubuntu)

Jupyter version

4.0.11 (note: reproducible outside jupyter)

Installation

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions