Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geometry_Engine: BooleanDifference(List<Line>, List<Line>) and BooleanIntersection(List<Line>, List<Line>) modify input collections #3320

Closed
pawelbaran opened this issue Mar 12, 2024 · 0 comments · Fixed by #3319
Assignees
Labels
type:bug Error or unexpected behaviour

Comments

@pawelbaran
Copy link
Member

Description:

As in the title, happens due to refLines being processed instead of refLeft:

foreach (var cluster in lines.ClusterCollinear(tolerance))
{
List<Line> toIntersect = new List<Line>();
for (int i = refLines.Count - 1; i >= 0; i--)
{
if (refLines[i].IsCollinear(cluster[0]))
{
toIntersect.Add(refLines[i]);
refLines.RemoveAt(i);
}
}

List<Line> toCull = new List<Line>();
for (int i = refLines.Count - 1; i >= 0; i--)
{
if (refLines[i].IsCollinear(cluster[0]))
{
toCull.Add(refLines[i]);
refLines.RemoveAt(i);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant