Skip to content

Ruby/Python binding for "unround" feature #2

@klayoutmatthias

Description

@klayoutmatthias

The "unround" feature is the basis of the capability to "edit" corner radii of polygons. The C++ function is "extract_rad" from dbPolygonTools.h. A Ruby/Python binding is asked to make this function accessible to scripts.

The proposed binding is:

polygon = ... # some RBA::Polygon or RBA::DPolygon
(new_polygon, outer_radius, inner_radius, n) = polygon.extract_rad

The result will be:

  • new_polygon: a polygon representing the "unrounded" (corner rounding removed) version of the original polygon.
  • outer_radius: the outer radius detected from the polygon
  • inner_radius: the inner corner radius detected from the polygon
  • n: the number of vertex points per full circle detected from the original polygon

So basically

new_polygon.round_corners(outer_radius, inner_radius, n)

will (more or less) render the original polygon.

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