VXL diagonal select

Guest
Is there a way to do diagonal select instead of a rectangle select in
Virtuoso?
 
On 12 May 2006 15:54:45 -0700, rickm@galaxy.nsc.com wrote:

Is there a way to do diagonal select instead of a rectangle select in
Virtuoso?
What do you mean by "diagonal select"?

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 
select with the mouse is within a rectangle, I would like to select
things
within a triangle
 
Andrew,

My undertsanding is the capability to select shapes graphically
in a polygon area with diagonals borders instead of a rectangular area.

This feature, if existing, would be helpful indeed.

==================
Kholdoun TORKI
http://cmp.imag.fr
==================


Andrew Beckett wrote:

On 12 May 2006 15:54:45 -0700, rickm@galaxy.nsc.com wrote:


Is there a way to do diagonal select instead of a rectangle select in
Virtuoso?


What do you mean by "diagonal select"?

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 
On Mon, 15 May 2006 17:13:20 +0200, Kholdoun TORKI <Kholdoun.Torki@imag.fr>
wrote:

Andrew,

My undertsanding is the capability to select shapes graphically
in a polygon area with diagonals borders instead of a rectangular area.

This feature, if existing, would be helpful indeed.

==================
Kholdoun TORKI
http://cmp.imag.fr
==================
I wrote a solution a while ago (it's on sourcelink) to allow you to select with
a polygon rather than a rectangle. However, it works by fracturing the polygon
into a set of trapezoids, and then using the bbox of each with
dbGetTrueOverlaps. The thing is that since each selection region is then
effectively a rectangle, it's not doing it purely in a triangular area.

To support that (efficiently) would need an equivalent of dbGetTrueOverlaps with
a triangular (or polygonal, respecting non-orthogonal edges) area. There's an
enhancement PCR for that which I filed when I wrote the solution code as a
workaround.

Regards,

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 
Hi Andrew - I have that piece of code but havent had much luck with
getting it run. The are 2 sections:

CCSselectByPolygon

CCSselectByPolygonDone (win done points)

The first works but does select a rectangle. The second portion errors
saying that it needs 3 arguments but I cant figure out what it wants.
Can you please give me a brief explanation on how it works?

THANKS!!!!!
 
The first works but does select a rectangle.
Weird because it uses enterPolygon. Maybe you have this feeling because your snap mode is set to
orthogonal ?

The second portion errors
saying that it needs 3 arguments but I cant figure out what it wants.
Can you please give me a brief explanation on how it works?
That's the callback to enterPolygon : win is obviously the window to work on, done should be true
for the function to actually execute, and points is the list of points defining the polygon.

It's the first one which is supposed to be used (you may set a bindkey for it).

Stéphane
 
The selected items highlight and they are in the rectangle. Heres
steps:

1) load the code
2) enter CCSselectByPolygon() into the CIW
3) draw a triangle on layer "Y0"

If the points of triangle are 0:0 0:10 10:0 , everything is
selected in 0:0 10:10

....any thoughts?
 
If the points of triangle are 0:0 0:10 10:0 , everything is
selected in 0:0 10:10
Indeed, Andrew mentioned that :

However, it works by fracturing the polygon
into a set of trapezoids, and then using the bbox of each with
dbGetTrueOverlaps. The thing is that since each selection region is then
effectively a rectangle, it's not doing it purely in a triangular area.
That's the side-effect you are experiencing..

This explains why the function sets the snap mode to orthogonal before allowing you to do any selection.
 
Then I have to ask....what value does the routine provide if it
accomplishes the same thing as a mouse select?
 
On Mon, 15 May 2006 07:09:30 -0700, rickm wrote:

select with the mouse is within a rectangle, I would like to select
things
within a triangle

What about this:
1. Create the bounding box of the selection polygon/triangle, which will be larger than the triangle.
2. Get the overlaps of the shapes with the bbox, which will be a superset of the overlaps you want.
3. Create a polygon shape on a temporary layer representing the actual selection triangle/polygon.
4. For each shape in the overlap set, do a layer AND with the selection polygon.
5. If the AND produces a non-empty set, then the shape actually overlaps the selection polygon.

I haven't written any SKILL in awhile, and I don't know how this works if
there is layout hierarchy, but it's a different approach to the problem.

Frank
 
On 17 May 2006 09:35:19 -0700, rickm@galaxy.nsc.com wrote:

Then I have to ask....what value does the routine provide if it
accomplishes the same thing as a mouse select?
If you read the comments at the top of the code, it points out this limitation.

The usefulness is that you can draw a more complex (orthogonal) polygon, drawing
a line around the shapes you want to select. You could do the same thing by
doing a sequence of shift-drag-left-mouse area selects to add to the selected
set, but drawing a polygon is more convenient in some cases.

Frank's suggestion of doing a dbLayerAnd with the original triangle is not a bad
one, although the code at the moment has the benefit of handling both partial
and full selection - it would be harder to support that. I suppose that if in
partial mode, it could check if any of the resulting and-ed polygon has any
vertices which exist in the original shape in the bBox, it could select just
those.

It's a bit more complicated, and if I have a moment sometime (not likely for a
couple of weeks), I might try extending my existing solution to handle
non-orthogonal regions.

Regards,

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 
Hi Andrew - a full select diagonal solution would be fine and you would
be a hero for many people!
 
Frank E. Gennari wrote:
1. Create the bounding box of the selection polygon/triangle, which will be larger than the triangle.
2. Get the overlaps of the shapes with the bbox, which will be a superset of the overlaps you want.
3. Create a polygon shape on a temporary layer representing the actual selection triangle/polygon.
4. For each shape in the overlap set, do a layer AND with the selection polygon.
5. If the AND produces a non-empty set, then the shape actually overlaps the selection polygon.
That would probably work with shapes, but I believe that the layer-AND operation wouldn't work for
instances.

But I guess one could create a temporary shape the size of the instance to handle that.


Stéphane
 
On Wed, 17 May 2006 21:24:13 +0100, Andrew Beckett
<andrewb@DcEaLdEeTnEcTe.HcIoSm> wrote:

On 17 May 2006 09:35:19 -0700, rickm@galaxy.nsc.com wrote:

Then I have to ask....what value does the routine provide if it
accomplishes the same thing as a mouse select?

If you read the comments at the top of the code, it points out this limitation.

The usefulness is that you can draw a more complex (orthogonal) polygon, drawing
a line around the shapes you want to select. You could do the same thing by
doing a sequence of shift-drag-left-mouse area selects to add to the selected
set, but drawing a polygon is more convenient in some cases.

Frank's suggestion of doing a dbLayerAnd with the original triangle is not a bad
one, although the code at the moment has the benefit of handling both partial
and full selection - it would be harder to support that. I suppose that if in
partial mode, it could check if any of the resulting and-ed polygon has any
vertices which exist in the original shape in the bBox, it could select just
those.

It's a bit more complicated, and if I have a moment sometime (not likely for a
couple of weeks), I might try extending my existing solution to handle
non-orthogonal regions.

Regards,

Andrew.
In fact, thinking about this a bit more, I think it would probably be better to
do the following for the triangular pieces of the fractured selection area:

1. Find the shapes overlapping the bounding box of the triangular piece.
2. For each shape, find the vertices which are within the triangle (not too
difficult to do such a check). If in full selection mode, select the object
if all vertices were within the triangle; if in partial selection mode,
select those vertices which were within the triangle.
3. For instances check whether all four corners
of the bounding box are within the triangle, and select if they are.

For the rectangular pieces of the fractured selection area, continue to
use geSelectArea.

Actually I've just thought of cases where this wouldn't work either. Better
leave this one mulling away for a bit longer! (not that I've got time to write
it now anyway...)

Andrew.
--
Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top