Round-end path's outside corner shape...


I would like to know if it is possible to draw paths with round-ended like below right image.
(Outside corner's shape is round)


  • Before you rely on round path behavior, keep in mind that round path endings in gds cannot be represented in oasis and the behavior at inner path corners is tool dependent as you just experienced. And there is no way to describe the resolution of the roundness even in gds. Thats why in the rare case of having round path in chip layouts, they are usually represented as polygon.

  • Hi,

    You can achieve this by selecting the path and then: Edit > Selection > Round Corners > Outer Corner Radius = half of your path width, Inner Corner Radius = 0. It will indeed be automatically converted to a polygon.



  • Hi @tomas2004
    If I want to make it corner been trim (not circle it) .
    How to do that?

  • Draw yourself a :cutter: right triangle polygon and then
    Edit>Selection>Subtract (others from first), pne by one?

    If you make your "cutter" sit on a different layer than you
    are cutting, you get to keep and reuse it. Same layer, it'll
    go away afterward along with the "cut" region.

    I do not know of any in-built chamfer option.

  • Hi @dick_freebird
    I mean that I want to make chamfer in all the outter corner ,if that is <= 90 degree.
    I knew we have a tool named "round corner" , it is workable for all the corner (inner corner / outter corner)
    But now , I just want to make chamfer corner in outter and not round it (octagon the corner)

  • @jiunnweiyeh "round_corner" basically works, but for some reason (I don't recall) the number of points has to be at least 16 in the UI. But the core feature allows less points. You can basically use this script to use round_corner to apply chamfering:

    chamfer_corner = 0.2 # CHANGE VALUE chamfer_radius = chamfer_corner / (1.0 - Math.tan(22.5/180.0*Math::PI)) mw = RBA::Application::instance::main_window view = mw.current_view begin view.transaction("Chamfer corners") sel = view.object_selection sel.each do |s| if !s.is_cell_inst? && !s.shape.is_text? poly = s.shape.dpolygon s.shape.dpolygon = poly.round_corners(0.0, chamfer_radius, 8) end end view.object_selection = sel ensure view.commit end

    Which gives you this:

    I can basically modify the "round corners" function to accept less points if that helps.


  • @Matthias
    Got it , Thanks , I will check it.

  • @Matthias
    After check the code , that can't work.
    even I select the polygon (select it by manual) first then run this code..
    I also can puts the value #{chamfer_radius}
    my Klayout version is 0.27.3 , is it issue?

  • Sorry, it works for me. I don't think 0.27.3 is the issue.

    Are you sure you're pasting that as a Ruby macro?


  • @Matthias
    Oh , I pass it into Ruby DRC ....after pass it into Ruby macro , it is workable.

Sign In or Register to comment.