I am facing some problem while using dbLayerOr and dbLayerAndNot. I wrote the following script to remove the overlapping part between two shapes. It workes nicely for any regular polygons. But, when I want to use it for removing overlapping content from a circular/arc shape object, the resultant layout is not circular anymore. It becomes a polygon (see the attached snapshot). I tried to use x_numVertices as 10000. But, it seems it does not work beyond a certain value.
If you have any idea about how to fix this, that will be a great help for me.
; Remove ONLY any overlapping regions from ovlplist
procedure( RK_removeoverlaps(wg_list ovlplist @key (cellview nil) )
let( ( shapelist layer shape ) when( cellview == nil cellview = geGetEditCellView() ; dbOpenCellViewByType("RK_compLib" "test" "layout" "" "a") ) shapelist = nil foreach( shape wg_list shapelist = dbLayerOr(cellview "tempLay0" list(shape) shapelist) ) foreach( shape ovlplist layer = shape~>layerName dbLayerAndNot(cellview layer list(shape) shapelist) dbDeleteObject(shape) )
); end let); end procedure
Unfortunately there's no publicly supported way of controlling the number of sides that will be used when converting the circle to a polygon (which has to be done here). The number of vertices is actually the maximum number for complex shapes before it splits into multiple shapes, so it's not related to the number of sides in the conversion.
You'd have to use dbConvertEllipseToPolygon first on the circle and then you can control the number of sides used during the conversion.