Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormeg
    • CommentTimeJan 10th 2017
     
    Hi,
    I am trying to design gaurd rings for a silicon strip detector using python. I used the following ways but it doesn't seem to work.

    hull = [pya.Point(0/0.001,0/0.001), pya.Point(6000/0.001,0/0.001), pya.Point(6000/0.001,3000/0.001), pya.Point(0/0.001, 3000/0.001)]

    hole1 = [pya.Point(1000/0.001,1000/0.001), pya.Point(2000/0.001,1000/0.001), pya.Point(2000/0.001,2000/0.001), pya.Point(1000/0.001,2000/0.001)]

    1---->poly = pya.Polygon(hull).insert_hole(hole1)

    2----->top.region(l1).insert(pya.Polygon(hull).insert_hole(hole1))

    3------>l1.insert(pya.Polygon(hull).insert_hole(hole1))

    4------>poly = pya.Region(pya.Polygon(hull).insert_hole(hole1))
    • CommentAuthorMatthias
    • CommentTimeJan 11th 2017
     

    Hi

    the right way is

    poly = pya.Polygon(hull)
    poly.insert_hole(hole1)
    region.insert(poly)
    

    Matthias