Skip to content

Geometry_Engine: useInfiniteLines argument is ambiguous. #281

Open
@pawelbaran

Description

@pawelbaran

The useInfiniteLines argument used in intersection methods is currently applied in two different ways:

In case of Line.PlaneIntersection (the first intersection method that had been implemented), it is used as: useInfiniteLine &= line.Infinite; which means that the line is considered infinite only when both the Infinite property of the object is switched to true and the useInfiniteLines argument is true.

In case of Curve.LineIntersection (the methods written later on): Line l = line.Clone(); l.Infinite |= useInfiniteLine; which can be expressed as the line being infinite either when its Infinite property is true or useInfiniteLine argument is true (all lines automatically become infinite in this case).

First of all, these are two different approaches. Secondly, it seems that in both cases the useInfiniteLine argument could be removed as it somehow doubles the information stored in Line.Infinite.

Personally I see no need for keeping useInfiniteLine in the first case, where it is actually an overhead (one needs to first switch Line.Infinite and then pass useInfiniteLine, why?). On the other hand, I believe that in the second case it has a lot of sense as one does not need to bother about switching Line.Infinite (but still can do it if needed, e.g. in case of intersecting a finite line with an infinite one).

Therefore, I would suggest applying a general principle of l.Infinite |= useInfiniteLine;.

What do you think?

Metadata

Metadata

Labels

severity:mediumSlows progress, but workaround is possibletype:bugError or unexpected behaviourtype:user-experienceIssues and changes relating to improving the overall User Experience (UX) of the tools

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions