chop, and select region command?

edited August 2019 in Ruby Scripting

Sorry for two more newbie questions.
1. If I select a group of objects, can I draw a rectangle to chop things off in that region?
2. If I rectangle select a region, how can I select everything in that region, including whole objects and vertices? The reason is that I want to move the selection as a group.

I couldn't find anything in the existing menu that can do this. Maybe we have to use script again? Many thanks in advance.

Comments

  • Hi,

    regarding 1.) - My suggestion was to draw a rectangle and use "Edit/Selection/Intersection - Others with first" to chop off the rest.

    for 2.) - partial mode allows selecting by rectangle including vertices or whole objects (if they are included as a whole inside the rectangle). With such a selection you can use "Edit/Selection/Move By" to move it by some numerical value or drag the selection with a mouse.

    Matthias

  • edited March 2023

    Hello, I'm trying to follow this advice (1). I take a GDS cell. For simplicity I flatten it. I draw a rectangle in an otherwise unused layer. Then I select the rectangle and go through the menus to Edit / Section / Intersection - Others with First. All that happens is the new rectangle disappears.

    My goal (I believe same as OP's) is to be able to cut through all the layers of a GDS along an edge and keep either the rectangle I drew, or everything outside the rectangle I drew, because that's far easier than having to do layer-by-layer operations for each relevant layer, or hand-editing polygons to change & delete vertices.

    Ideally I'd like to use the GUI, or if not currently possible, have a script that I can use every time this need occurs.

    Thanks.

  • @LaserJon For (1) to work, you will need to draw the blanking rectangle. Then first select the things you want to cut. Use a rectangle select, so everything you want to cut is selected in one step. Then shift+click on the blanking rectangle to make it selected as "Others". Then use Edit / Selection / Intersection Others with First.

    Another option is to use "erase" mode:

    In this mode, everything you draw is erased from existing shapes on the same layer. It is however more difficult to adjust the rectangle you want to erase.

    The easiest scripting option is to use a DRC "NOT" function between a layer and another layer holding the blank rectangle or a temporary layer generated with a specific blank rectangle. However, this will have some side effects like changing the hierarchy and turning non-polygons (paths, boxes) into polygons.

    Matthias

  • Hi, My need is no longer urgent as I solved this another way. But I did try this method of selecting as other, and got the error message "Primary selection originates from different layers - cannot compute result in this case.". My assumption then is that this command "Edit / Selection / Intersection Others With First" just works for polygons in the same layer.

    I did experiment with polygons in the same layer and in that case this behaves as expected.

    Thanks - Jon

Sign In or Register to comment.