Clean up Rect set operations (union, intersect, diff, overlaps)#276
Conversation
|
https://en.wikipedia.org/wiki/Allen%27s_interval_algebra GeometryBasics.jl/src/primitives/rectangles.jl Lines 441 to 486 in 9918b18 This stuff makes sense for intervals but I fail to see how this should generalize to rectangles. For examples saying one interval is or other rotations. Also, for the edge versions, do widths need to match for the dimension that doesn't meet? This doesn't seem clear enough to have. It's been there since the dawn of GeometryTypes 11 years ago |
|
|
||
| """ | ||
| isempty(h::Rect) | ||
| isempty(h::Rect[, volumetric = true]) |
There was a problem hiding this comment.
since this is a base overload and not really self explanatory, i think this should be a kwarg.
This is something I will probably need for optimizing an SDF
volumeplots in Makie. Doesn't need to be merged/tagged until I get that near completionChanges:
volumetrickwarg toisemptyto switch between "any" and "all" widths <= 0 checksRect()including Inf in unions)bbox_diffto calculate the bounding box of the pieces left after cutting one rect out of another (without explicitly calculating the pieces)intersectif rects have no overlap (+ type promotion)overlapsbbox_diffisemptyin(using explicit rects to go through specific situations rather than results fromsplt)overlapsto cover edge casesunion(not justisa Rect)intersect(not justisa Rect)update(not justisa Rect)TODO: