Skip to content

Small issue with booleans #74

@klayoutmatthias

Description

@klayoutmatthias

The following boolean should basically deliver a rectangle with a small cut-off upper left corner.

ep = RBA::EdgeProcessor::new
p1 = [ RBA::Polygon::new(RBA::Box::new(0, 0, 10, 10)) ]
pt1 = [ RBA::Point::new(-1, -1), RBA::Point::new(-1, 8), RBA::Point::new(2, 11), RBA::Point::new(2, -1) ]
p2 = [ RBA::Polygon::new(pt1), RBA::Polygon::new(RBA::Box::new(2, -1, 11, 11)) ]
pp = ep.boolean_p2p(p1, p2, RBA::EdgeProcessor::ModeAnd, false, false)
puts pp

Because the corner is small (1x1 DBU), it is subject to small segment elimination and will vanish. A rectangle remains.

The workaround is to use a smaller DBU so the corner will be bigger than 1 DBU. It will not be removed then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions