KLayout Manual: Main Index » Class Index » API reference - Class EdgeProcessorAPI reference - Class EdgeProcessorNotation used in Ruby API documentation Description: The edge processor (boolean, sizing, merge)
The edge processor implements the boolean and edge set operations (size, merge). Because the edge processor might allocate resources which can be reused in later operations, it is implemented as an object that can be used several times. Public constructors
Public methods
Public static methods and constants
Deprecated methods (protected, public, static, non-static and constructors)
Detailed description[static] int ModeANotBDescription: boolean method's mode value for A NOT B operation [static] int ModeAndDescription: boolean method's mode value for AND operation [static] int ModeBNotADescription: boolean method's mode value for B NOT A operation [static] int ModeOrDescription: boolean method's mode value for OR operation [static] int ModeXorDescription: boolean method's mode value for XOR operation [const] void assign(const EdgeProcessor other)Description: Assign the contents of another object to self This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content. Edge[] boolean(Polygon[] a,Polygon[] b,int mode)Description: Boolean operation for a set of given polygons, creating edges
This method is deprecated. Use method 'boolean_p2e' instead Edge[] boolean(Edge[] a,Edge[] b,int mode)Description: Boolean operation for a set of given edges, creating edges
This method is deprecated. Use method 'boolean_e2e' instead Edge[] boolean_e2e(Edge[] a,Edge[] b,int mode)Description: Boolean operation for a set of given edges, creating edges
This method computes the result for the given boolean operation on two sets of edges. The input edges must form closed contours where holes and hulls must be oriented differently. The input edges are processed with a simple non-zero wrap count rule as a whole. The result is presented as a set of edges forming closed contours. Hulls are oriented clockwise while holes are oriented counter-clockwise. Prior to version 0.21 this method was called 'boolean'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] boolean_e2p(Edge[] a,Edge[] b,int mode,bool resolve_holes,bool min_coherence)Description: Boolean operation for a set of given edges, creating polygons
This method computes the result for the given boolean operation on two sets of edges. The input edges must form closed contours where holes and hulls must be oriented differently. The input edges are processed with a simple non-zero wrap count rule as a whole. This method produces polygons on output and allows to fine-tune the parameters for that purpose. Prior to version 0.21 this method was called 'boolean_to_polygon'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Edge[] boolean_p2e(Polygon[] a,Polygon[] b,int mode)Description: Boolean operation for a set of given polygons, creating edges
This method computes the result for the given boolean operation on two sets of polygons. The result is presented as a set of edges forming closed contours. Hulls are oriented clockwise while holes are oriented counter-clockwise. This is a convenience method that bundles filling of the edges, processing with a Boolean operator and puts the result into an output vector. Prior to version 0.21 this method was called 'boolean'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] boolean_p2p(Polygon[] a,Polygon[] b,int mode,bool resolve_holes,bool min_coherence)Description: Boolean operation for a set of given polygons, creating polygons
This method computes the result for the given boolean operation on two sets of polygons. This method produces polygons on output and allows to fine-tune the parameters for that purpose. This is a convenience method that bundles filling of the edges, processing with a Boolean operator and puts the result into an output vector. Prior to version 0.21 this method was called 'boolean_to_polygon'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] boolean_to_polygon(Polygon[] a,Polygon[] b,int mode,bool resolve_holes,bool min_coherence)Description: Boolean operation for a set of given polygons, creating polygons
This method is deprecated. Use method 'boolean_p2p' instead Polygon[] boolean_to_polygon(Edge[] a,Edge[] b,int mode,bool resolve_holes,bool min_coherence)Description: Boolean operation for a set of given edges, creating polygons
This method is deprecated. Use method 'boolean_e2p' instead void createDescription: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. void destroyDescription: Explicitly destroy the object Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing. [const] bool destroyed?Description: Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. [const] EdgeProcessor dupDescription: Creates a copy of self [const] bool is_const_object?Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. Edge[] merge(Polygon[] in,unsigned int min_wc)Description: Merge the given polygons
This method is deprecated. Use method 'merge_p2e' instead Edge[] merge_p2e(Polygon[] in,unsigned int min_wc)Description: Merge the given polygons
In contrast to "simple_merge", this merge implementation considers each polygon individually before merging them. Thus self-overlaps are effectively removed before the output is computed and holes are correctly merged with the hull. In addition, this method allows to select areas with a higher wrap count which allows to compute overlaps of polygons on the same layer. Because this method merges the polygons before the overlap is computed, self-overlapping polygons do not contribute to higher wrap count areas. The result is presented as a set of edges forming closed contours. Hulls are oriented clockwise while holes are oriented counter-clockwise. Prior to version 0.21 this method was called 'merge'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] merge_p2p(Polygon[] in,unsigned int min_wc,bool resolve_holes,bool min_coherence)Description: Merge the given polygons
In contrast to "simple_merge", this merge implementation considers each polygon individually before merging them. Thus self-overlaps are effectively removed before the output is computed and holes are correctly merged with the hull. In addition, this method allows to select areas with a higher wrap count which allows to compute overlaps of polygons on the same layer. Because this method merges the polygons before the overlap is computed, self-overlapping polygons do not contribute to higher wrap count areas. This method produces polygons and allows to fine-tune the parameters for that purpose. Prior to version 0.21 this method was called 'merge_to_polygon'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] merge_to_polygon(Polygon[] in,unsigned int min_wc,bool resolve_holes,bool min_coherence)Description: Merge the given polygons
This method is deprecated. Use method 'merge_p2p' instead [static] int mode_andDescription: boolean method's mode value for AND operation This method is deprecated. Use method 'ModeAnd' instead [static] int mode_anotbDescription: boolean method's mode value for A NOT B operation This method is deprecated. Use method 'ModeANotB' instead [static] int mode_bnotaDescription: boolean method's mode value for B NOT A operation This method is deprecated. Use method 'ModeBNotA' instead [static] int mode_orDescription: boolean method's mode value for OR operation This method is deprecated. Use method 'ModeOr' instead [static] int mode_xorDescription: boolean method's mode value for XOR operation This method is deprecated. Use method 'ModeXor' instead [static] EdgeProcessor newDescription: Creates a new object of this class Edge[] simple_merge(Polygon[] in)Description: Merge the given polygons in a simple "non-zero wrapcount" fashion
This method is deprecated. Use method 'simple_merge_p2e' instead Edge[] simple_merge(Polygon[] in,int mode)Description: Merge the given polygons and specify the merge mode
This method is deprecated. Use method 'simple_merge_p2e' instead Edge[] simple_merge(Edge[] in)Description: Merge the given edges in a simple "non-zero wrapcount" fashion
This method is deprecated. Use method 'simple_merge_e2e' instead Edge[] simple_merge(Edge[] in,int mode)Description: Merge the given polygons and specify the merge mode
This method is deprecated. Use method 'simple_merge_e2e' instead Edge[] simple_merge_e2e(Edge[] in)Description: Merge the given edges in a simple "non-zero wrapcount" fashion
The egdes provided must form valid closed contours. Contours oriented differently "cancel" each other. Overlapping contours are merged when the orientation is the same. The result is presented as a set of edges forming closed contours. Hulls are oriented clockwise while holes are oriented counter-clockwise. This is a convenience method that bundles filling of the edges, processing with a SimpleMerge operator and puts the result into an output vector. Prior to version 0.21 this method was called 'simple_merge'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Edge[] simple_merge_e2e(Edge[] in,int mode)Description: Merge the given polygons and specify the merge mode
The egdes provided must form valid closed contours. Contours oriented differently "cancel" each other. Overlapping contours are merged when the orientation is the same. The result is presented as a set of edges forming closed contours. Hulls are oriented clockwise while holes are oriented counter-clockwise. This is a convenience method that bundles filling of the edges, processing with a SimpleMerge operator and puts the result into an output vector. This method has been added in version 0.22. The mode specifies the rule to use when producing output. A value of 0 specifies the even-odd rule. A positive value specfies the wrap count threshold (postive only). A negative value specifies the threshold of the absolute value of the wrap count (i.e. -1 is non-zero rule). Polygon[] simple_merge_e2p(Edge[] in,bool resolve_holes,bool min_coherence)Description: Merge the given edges in a simple "non-zero wrapcount" fashion into polygons
The egdes provided must form valid closed contours. Contours oriented differently "cancel" each other. Overlapping contours are merged when the orientation is the same. This method produces polygons and allows to fine-tune the parameters for that purpose. This is a convenience method that bundles filling of the edges, processing with a SimpleMerge operator and puts the result into an output vector. Prior to version 0.21 this method was called 'simple_merge_to_polygon'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] simple_merge_e2p(Edge[] in,bool resolve_holes,bool min_coherence,int mode)Description: Merge the given polygons and specify the merge mode
The egdes provided must form valid closed contours. Contours oriented differently "cancel" each other. Overlapping contours are merged when the orientation is the same. This method produces polygons and allows to fine-tune the parameters for that purpose. This is a convenience method that bundles filling of the edges, processing with a SimpleMerge operator and puts the result into an output vector. This method has been added in version 0.22. The mode specifies the rule to use when producing output. A value of 0 specifies the even-odd rule. A positive value specfies the wrap count threshold (postive only). A negative value specifies the threshold of the absolute value of the wrap count (i.e. -1 is non-zero rule). Edge[] simple_merge_p2e(Polygon[] in)Description: Merge the given polygons in a simple "non-zero wrapcount" fashion
The wrapcount is computed over all polygons, i.e. overlapping polygons may "cancel" if they have different orientation (since a polygon is oriented by construction that is not easy to achieve). The other merge operation provided for this purpose is "merge" which normalizes each polygon individually before merging them. "simple_merge" is somewhat faster and consumes less memory. The result is presented as a set of edges forming closed contours. Hulls are oriented clockwise while holes are oriented counter-clockwise. This is a convenience method that bundles filling of the edges, processing with a SimpleMerge operator and puts the result into an output vector. Prior to version 0.21 this method was called 'simple_merge'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Edge[] simple_merge_p2e(Polygon[] in,int mode)Description: Merge the given polygons and specify the merge mode
The wrapcount is computed over all polygons, i.e. overlapping polygons may "cancel" if they have different orientation (since a polygon is oriented by construction that is not easy to achieve). The other merge operation provided for this purpose is "merge" which normalizes each polygon individually before merging them. "simple_merge" is somewhat faster and consumes less memory. The result is presented as a set of edges forming closed contours. Hulls are oriented clockwise while holes are oriented counter-clockwise. This is a convenience method that bundles filling of the edges, processing with a SimpleMerge operator and puts the result into an output vector. This method has been added in version 0.22. The mode specifies the rule to use when producing output. A value of 0 specifies the even-odd rule. A positive value specfies the wrap count threshold (postive only). A negative value specifies the threshold of the absolute value of the wrap count (i.e. -1 is non-zero rule). Polygon[] simple_merge_p2p(Polygon[] in,bool resolve_holes,bool min_coherence)Description: Merge the given polygons in a simple "non-zero wrapcount" fashion into polygons
The wrapcount is computed over all polygons, i.e. overlapping polygons may "cancel" if they have different orientation (since a polygon is oriented by construction that is not easy to achieve). The other merge operation provided for this purpose is "merge" which normalizes each polygon individually before merging them. "simple_merge" is somewhat faster and consumes less memory. This method produces polygons and allows to fine-tune the parameters for that purpose. This is a convenience method that bundles filling of the edges, processing with a SimpleMerge operator and puts the result into an output vector. Prior to version 0.21 this method was called 'simple_merge_to_polygon'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] simple_merge_p2p(Polygon[] in,bool resolve_holes,bool min_coherence,int mode)Description: Merge the given polygons and specify the merge mode
The wrapcount is computed over all polygons, i.e. overlapping polygons may "cancel" if they have different orientation (since a polygon is oriented by construction that is not easy to achieve). The other merge operation provided for this purpose is "merge" which normalizes each polygon individually before merging them. "simple_merge" is somewhat faster and consumes less memory. This method produces polygons and allows to fine-tune the parameters for that purpose. This is a convenience method that bundles filling of the edges, processing with a SimpleMerge operator and puts the result into an output vector. This method has been added in version 0.22. The mode specifies the rule to use when producing output. A value of 0 specifies the even-odd rule. A positive value specfies the wrap count threshold (postive only). A negative value specifies the threshold of the absolute value of the wrap count (i.e. -1 is non-zero rule). Polygon[] simple_merge_to_polygon(Polygon[] in,bool resolve_holes,bool min_coherence)Description: Merge the given polygons in a simple "non-zero wrapcount" fashion into polygons
This method is deprecated. Use method 'simple_merge_p2p' instead Polygon[] simple_merge_to_polygon(Polygon[] in,bool resolve_holes,bool min_coherence,int mode)Description: Merge the given polygons and specify the merge mode
This method is deprecated. Use method 'simple_merge_p2p' instead Polygon[] simple_merge_to_polygon(Edge[] in,bool resolve_holes,bool min_coherence)Description: Merge the given edges in a simple "non-zero wrapcount" fashion into polygons
This method is deprecated. Use method 'simple_merge_e2p' instead Polygon[] simple_merge_to_polygon(Edge[] in,bool resolve_holes,bool min_coherence,int mode)Description: Merge the given polygons and specify the merge mode
This method is deprecated. Use method 'simple_merge_e2p' instead Edge[] size(Polygon[] in,int dx,int dy,unsigned int mode)Description: Size the given polygons
This method is deprecated. Use method 'size_p2e' instead Edge[] size(Polygon[] in,int d,unsigned int mode)Description: Size the given polygons (isotropic)
This method is deprecated. Use method 'size_p2e' instead Edge[] size_p2e(Polygon[] in,int dx,int dy,unsigned int mode)Description: Size the given polygons
This method sizes a set of polygons. Before the sizing is applied, the polygons are merged. After that, sizing is applied on the individual result polygons of the merge step. The result may contain overlapping contours, but no self-overlaps. dx and dy describe the sizing. A positive value indicates oversize (outwards) while a negative one describes undersize (inwards). The sizing applied can be choosen differently in x and y direction. In this case, the sign must be identical for both dx and dy. The 'mode' parameter describes the corner fill strategy. Mode 0 connects all corner segments directly. Mode 1 is the 'octagon' strategy in which square corners are interpolated with a partial octagon. Mode 2 is the standard mode in which corners are filled by expanding edges unless these edges form a sharp bend with an angle of more than 90 degree. In that case, the corners are cut off. In Mode 3, no cutoff occures up to a bending angle of 135 degree. Mode 4 and 5 are even more aggressive and allow very sharp bends without cutoff. This strategy may produce long spikes on sharply bending corners. The result is presented as a set of edges forming closed contours. Hulls are oriented clockwise while holes are oriented counter-clockwise. Prior to version 0.21 this method was called 'size'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Edge[] size_p2e(Polygon[] in,int d,unsigned int mode)Description: Size the given polygons (isotropic)
This method is equivalent to calling the anisotropic version with identical dx and dy. Prior to version 0.21 this method was called 'size'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] size_p2p(Polygon[] in,int dx,int dy,unsigned int mode,bool resolve_holes,bool min_coherence)Description: Size the given polygons into polygons
This method sizes a set of polygons. Before the sizing is applied, the polygons are merged. After that, sizing is applied on the individual result polygons of the merge step. The result may contain overlapping polygons, but no self-overlapping ones. Polygon overlap occures if the polygons are close enough, so a positive sizing makes polygons overlap. dx and dy describe the sizing. A positive value indicates oversize (outwards) while a negative one describes undersize (inwards). The sizing applied can be choosen differently in x and y direction. In this case, the sign must be identical for both dx and dy. The 'mode' parameter describes the corner fill strategy. Mode 0 connects all corner segments directly. Mode 1 is the 'octagon' strategy in which square corners are interpolated with a partial octagon. Mode 2 is the standard mode in which corners are filled by expanding edges unless these edges form a sharp bend with an angle of more than 90 degree. In that case, the corners are cut off. In Mode 3, no cutoff occures up to a bending angle of 135 degree. Mode 4 and 5 are even more aggressive and allow very sharp bends without cutoff. This strategy may produce long spikes on sharply bending corners. This method produces polygons and allows to fine-tune the parameters for that purpose. Prior to version 0.21 this method was called 'size_to_polygon'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] size_p2p(Polygon[] in,int d,unsigned int mode,bool resolve_holes,bool min_coherence)Description: Size the given polygons into polygons (isotropic)
This method is equivalent to calling the anisotropic version with identical dx and dy. Prior to version 0.21 this method was called 'size_to_polygon'. Is was renamed to avoid ambiguities for empty input arrays. The old version is still available but deprecated. Polygon[] size_to_polygon(Polygon[] in,int dx,int dy,unsigned int mode,bool resolve_holes,bool min_coherence)Description: Size the given polygons into polygons
This method is deprecated. Use method 'size_p2p' instead Polygon[] size_to_polygon(Polygon[] in,int d,unsigned int mode,bool resolve_holes,bool min_coherence)Description: Size the given polygons into polygons (isotropic)
This method is deprecated. Use method 'size_p2p' instead |