Meshes.jl icon indicating copy to clipboard operation
Meshes.jl copied to clipboard

Idea for refactoring intersection types

Open dorn-gerhard opened this issue 5 months ago • 1 comments

I think another refactoring of IntersectionTypes might be necessary to consider intersection of objects of different dimensionality. e.g. each object has an inner part, e.g. open interval 0 < x < 1 and an outer part = boundary (segment end points, ray origin, edges of triangle, surface of 3d sphere).

**Touching**: if a subset of the outer part with no inner points equals the intersection set it should be called Touching,
**Crossing**: if a subset of inner parts with a dimensionality less than the original geometry is in the intersection set, it could be called Crossing
**Overlapping**: if a subset of inner parts with the same dimensionality as the original geometry is in the intersection set, it could be called Overlapping (I would dismiss PosOverlapping and NegOverlapping as the result is clear from the intersection object (Segment = NegOverlapping vs. Ray = PosOverlapping in Ray-Ray intersection)

Since we have two Geometries and not just one in an intersection we could have combinations of these three cases above. e.g.

OverlappingTouching: A Segment that touches the edge of a Triangle (in same plane)
OverlappingCrossing: A Segment that crosses a Triangle in plane yielding a segment
CrossingTouching: A Segment that crosses the origin of Ray (not parallel)

reason for ordering: Overlap (inner points, higher dimensionality) > Cross (inner points) > Touch (no inner points9

A Ray touching a corner of a Triangle (could be in the same plane or not in same plane) would be CrossingTouching instead of CornerTouching A Ray touching the edge of a Triangle (both not in the same plane) would also be called CrossingTouching instead of EdgeTouching A Ray overlapping with the edge of a Triangle (in the same plane) would be called OverlappingTouching

Not sure if CornerTouching and EdgeTouching is relevant for an algorithm if we fuse both to CrossingTouching

dorn-gerhard avatar Feb 06 '24 23:02 dorn-gerhard

Thank you for putting it together @dorn-gerhard , feel free to submit a PR for review. We should probably document this convention somewhere after it is settled.

juliohm avatar Feb 07 '24 10:02 juliohm