I used this code from Cadence on my layout:
procedure(CCSFindShapesOutsidePrBoundary(@optional (cv geGetWindowCellView()))
let((temp_list prShapeID realShapes (finalShapes nil)(rest nil))
realShapes=cv~>shapes
prShapeID=dbCreatePolygon(cv leGetEntryLayer() cv~>prBoundary~>points)
foreach(shape realShapes
temp_list=dbLayerXor(cv leGetEntryLayer() list(shape) list(prShapeID))
if(length(temp_list)==1 then
mapcar('dbDeleteObject temp_list)
else
printf("\n shape with bBox %L is outside prBoundary object\n"
shape~>bBox)
finalShapes=cons(shape finalShapes)
mapcar('dbDeleteObject temp_list)
) ;if length
) ;foreach shape
foreach(x realShapes if(!member(x finalShapes) then rest=cons(x rest)))
foreach(x rest
if(temp_list=dbLayerAnd(cv leGetEntryLayer() list(x) list(prShapeID))
then
mapcar('dbDeleteObject temp_list)
else
printf("\n shape with bBox %L is outside prBoundary object\n"
x~>bBox)
finalShapes=cons(x finalShapes)
); if temp_list
);foreach x
dbDeleteObject(prShapeID)
finalShapes
) ;let
) ;procedure
but got the error:
*Error* dbCreatePolygon: Polygon needs at least 3 points - nil
Is there something wrong with this code ? It seems that cv~>prBoundary~>points return nil.
Please help,
Thanks,
HP