merge all shapes on a specific layer

M

Marcel Preda

Guest
Hi there,

I have an av_extracted on which I must do some distances checking
between different nets.
And I need to have all the shapes on the same layer merged, especially
on "net" purpose.
So, before starting the main script I run a code like
/*-----------------------------------*/
layersToMerge = list(
list(lay1 purpose1)
list(lay2 purpose2)
....
)

foreach(lppX cv->lpps
if( exists(lx layersToMerge lppX->layerName == car(lx) &&
lppX->purpose == cadr(lx)) then
info("Start merge %L/%L, %L shapes, %L \n" lppX-
layerName lppX->purpose lppX->nShapes getCurrentTime())
leMergeShapes(lppX->shapes)
info("After merge %L/%L, %L shapes, %L \n" lppX-
layerName lppX->purpose lppX->nShapes getCurrentTime())
)
)

/*------------------------------------------*/

It seems to be very slow, especially when the purpose is "net".
What is funy is that even if I run the code twice it is still slow.
E.g. at 1st run some shapes were merged, and at the 2nd run when no
shapes were merged I still spend lot of time , here is some output:


\o Start merge "active"/"drawing", 8215 shapes, "Jun 8 09:36:47
2011"
\o After merge "active"/"drawing", 8215 shapes, "Jun 8 09:36:49
2011"
\o Start merge "topmetal"/"net", 89 shapes, "Jun 8 09:36:49 2011"
\o After merge "topmetal"/"net", 89 shapes, "Jun 8 09:36:49 2011"
\o Start merge "poly"/"net", 11680 shapes, "Jun 8 09:36:49 2011"
\o After merge "poly"/"net", 11680 shapes, "Jun 8 09:40:13 2011"
\o Start merge "metal1"/"net", 10426 shapes, "Jun 8 09:40:13 2011"
\o After merge "metal1"/"net", 10426 shapes, "Jun 8 09:50:18 2011"

See the poly/net and metal1/net cases, even there are no merge
operation the time spent is big.


The question: is other other possibility to merge the shapes on the
same layer ? (some external command is also fine)
Or is there any parameter for assura extracted view to increase the
max number of vertices from 200 to something bigger?


Thank you,
Marcel
 
Marcel Preda wrote, on 06/08/11 09:26:
Hi there,

I have an av_extracted on which I must do some distances checking
between different nets.
And I need to have all the shapes on the same layer merged, especially
on "net" purpose.
So, before starting the main script I run a code like
/*-----------------------------------*/
layersToMerge = list(
list(lay1 purpose1)
list(lay2 purpose2)
....
)

foreach(lppX cv->lpps
if( exists(lx layersToMerge lppX->layerName == car(lx)&&
lppX->purpose == cadr(lx)) then
info("Start merge %L/%L, %L shapes, %L \n" lppX-
layerName lppX->purpose lppX->nShapes getCurrentTime())
leMergeShapes(lppX->shapes)
info("After merge %L/%L, %L shapes, %L \n" lppX-
layerName lppX->purpose lppX->nShapes getCurrentTime())
)
)

/*------------------------------------------*/

It seems to be very slow, especially when the purpose is "net".
What is funy is that even if I run the code twice it is still slow.
E.g. at 1st run some shapes were merged, and at the 2nd run when no
shapes were merged I still spend lot of time , here is some output:


\o Start merge "active"/"drawing", 8215 shapes, "Jun 8 09:36:47
2011"
\o After merge "active"/"drawing", 8215 shapes, "Jun 8 09:36:49
2011"
\o Start merge "topmetal"/"net", 89 shapes, "Jun 8 09:36:49 2011"
\o After merge "topmetal"/"net", 89 shapes, "Jun 8 09:36:49 2011"
\o Start merge "poly"/"net", 11680 shapes, "Jun 8 09:36:49 2011"
\o After merge "poly"/"net", 11680 shapes, "Jun 8 09:40:13 2011"
\o Start merge "metal1"/"net", 10426 shapes, "Jun 8 09:40:13 2011"
\o After merge "metal1"/"net", 10426 shapes, "Jun 8 09:50:18 2011"

See the poly/net and metal1/net cases, even there are no merge
operation the time spent is big.


The question: is other other possibility to merge the shapes on the
same layer ? (some external command is also fine)
Or is there any parameter for assura extracted view to increase the
max number of vertices from 200 to something bigger?


Thank you,
Marcel
Hi Marcel,

Quick answer. I have found in the past that dbLayerOr is quicker than
leMergeShapes. It has an argument to control the maximum number of vertices -
and in OA-enabled versions this can be set pretty high (in CDB-based versions,
there is a limit of 4000 vertices in the database).

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top