I am writing a code where i needed to fracture layers vertically and horiontally. I used dbLayerTile to fracture them vertically and I created my own version that fracture layers horiontally since I could not find anything in the documantation that do this job. My problem is I wanted to boost the performance of the code so my first thought is to rotate them by 90deg and then execute dbLayerTile a second time then bring them altogether to their original position. But how to write this in a code in a simplest way still puzzles me.
You probably could use 'leChopShape', if you are not going to use it within a PCell.leChopShape( d_shapeId l_points g_closed [ g_remove ] [ x_sides ] ) => l_newShapes | nilCuts the shape d_shapeId using the chop shape l_points.
In reply to Bernd:
Thanks Bernd for the quick reply.
Yes you were right, this is exactly what i have done in my code. Now I have already discarded to used dbLayerTile in my code, instead I made a sub routine that fractures a target dbobj both horizontal and vertical using leChopShape. now my code looks much simplier.
by the way, we are both from unterhaching, I'm from fasanenpark.
In reply to lrl1skdev:
Is there any comamnd in skill which splits a polygon into max of 2 rectangles.
I am writing a skill code which needs stretch all the poly gates by fixed distance and hence entire layout should move accordingly maintaining others shapes like contacts lengts/widths as constant..can anyone help me of how to go with this?
Thanks & Regards,
In reply to prandi:
What's wrong with dbLayerTile? Obviously if the polygon is not rectangular or L-shaped, it can't be fractured into only two rectangles, but apart from that, surely that does what you want?
In reply to Andrew Beckett:
In few cases, poly is getting fractured into more than two rectangles and all the polys(specially polys of "polygon" lpp) are not getting stretched by same length(say 0.015),I dont know how to overcome this and make my code work properly.
It's not that clear to me why you need to fracture it or precisely what you're trying to do - maybe some pictures would help (you can upload a picture via the "Options" tab at the top).
Alternatively there are various easily found algorithms for fracturing or decomposing a polygon into rectangles - do a google search for "algorithm to tile polygon with rectangles". However, this is almost certainly overkill if it's an L-shaped polygon - you should be able to detect that reasonably easily and split it yourself. Off the top of my head, without thinking about it enough to be sure that this is correct, I'd say you could do something like this:
This is all relatively straightforward to solve.
Finally,I am writing a skill code which increases poly length by 0.015 for the picture attached.
polys=setof(sh cv~>shapes sh~>lpp==list("poly" "drawing"))
dblayerTile(cv "active" polys)
but all the polys are getting increased by 0.015,in few cases there is an increase of 0.01(which is double)
so,I dont know how to go about it.
Wouldn't it be easier to find the bBox of all the poly, widen that bBox a bit, use dbLayerSize to increase the size of the poly by a certain amount and then And it with the enlarged bBox (to chop off any oversizing at the top and bottom)?
Something like that?
And using dbLayerAnd?..ilooks like dbLAyerAnd ts not working out/expected result..
dbLayerAnd should work fine - that was what I meant by "And".
The code you've posted would appear to me to oversize the gates a little (by 0.5nm), and then and those shapes with the original gate, and then delete the original gate. The result of the dbLayerAnd would be the same as the original gates, so I can't see what you're doing here. You'd have both the oversized gates and copy of the gates (the result of the And). I can't see how "active is being formed" since there's no mention of active here.
Your code doesn't look correct from what you've posted - but I suspect it's only a small bit of the code and not enough detail for anyone to figure out what you're doing.