Skip to content

OGC validity of intersection touching shapes #47

Description

@plooney

Summary

For two touching rectangles with OGC validity on the intersection would be the touching edge

Steps to reproduce

use i_overlay::core::fill_rule::FillRule;
use i_overlay::core::overlay_rule::OverlayRule;
use i_overlay::float::overlay::{FloatOverlay, OverlayOptions};

fn main() {
    let subj = vec![vec![[1.0, 0.0], [0.0, 0.0], [0.0, 1.0], [1.0, 1.0]]];
    let clip = vec![vec![[2.0, 0.0], [1.0, 0.0], [1.0, 1.0], [2.0, 1.0]]];

    let options = OverlayOptions::<f64>::ocg();
    let mut overlay =
        FloatOverlay::with_subj_and_clip_custom(&subj, &clip, options, Default::default());
    let result = overlay.overlay(OverlayRule::Intersect, FillRule::EvenOdd);
    println!("{:?}", result.to_vec());
}

Expected behavior

Return a line where they touch

Actual behavior

returns empty list

Environment

  • iOverlay version: 4.2.2
  • Rust version: 2024
  • OS: Max Tahoe 26.2

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions