ZLayout EDA Library v1.0.0
Advanced Electronic Design Automation Layout Library with Bilingual Documentation
Loading...
Searching...
No Matches
zlayout.analysis.PolygonAnalyzer Class Reference

Public Member Functions

 __init__ (self, Optional[SpatialIndex] spatial_index=None)
int add_polygon (self, Polygon polygon)
SharpAngleResult find_sharp_angles (self, float threshold_degrees=30.0)
NarrowDistanceResult find_narrow_distances (self, float threshold_distance=1.0)
EdgeIntersectionResult find_edge_intersections (self)

Public Attributes

 spatial_index = spatial_index
list polygons = []
list polygon_ids = []

Protected Member Functions

List[Point_find_polygon_edge_intersections (self, Polygon poly1, Polygon poly2)
float _edge_to_edge_distance (self, Point p1, Point p2, Point p3, Point p4)
Tuple[Point, Point_closest_points_on_edges (self, Point p1, Point p2, Point p3, Point p4)

Detailed Description

Analyzer for polygon geometric properties and relationships.

Definition at line 105 of file analysis.py.

Constructor & Destructor Documentation

◆ __init__()

zlayout.analysis.PolygonAnalyzer.__init__ ( self,
Optional[SpatialIndex] spatial_index = None )

Definition at line 108 of file analysis.py.

Member Function Documentation

◆ _closest_points_on_edges()

Tuple[Point, Point] zlayout.analysis.PolygonAnalyzer._closest_points_on_edges ( self,
Point p1,
Point p2,
Point p3,
Point p4 )
protected
Find the closest points on two line segments.

Definition at line 287 of file analysis.py.

Here is the caller graph for this function:

◆ _edge_to_edge_distance()

float zlayout.analysis.PolygonAnalyzer._edge_to_edge_distance ( self,
Point p1,
Point p2,
Point p3,
Point p4 )
protected
Calculate minimum distance between two line segments.

Definition at line 269 of file analysis.py.

Here is the caller graph for this function:

◆ _find_polygon_edge_intersections()

List[Point] zlayout.analysis.PolygonAnalyzer._find_polygon_edge_intersections ( self,
Polygon poly1,
Polygon poly2 )
protected
Find all intersection points between edges of two polygons.

Definition at line 257 of file analysis.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_polygon()

int zlayout.analysis.PolygonAnalyzer.add_polygon ( self,
Polygon polygon )
Add a polygon for analysis.

Definition at line 113 of file analysis.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_edge_intersections()

EdgeIntersectionResult zlayout.analysis.PolygonAnalyzer.find_edge_intersections ( self)
Find all edge intersections using spatial indexing for efficiency.

Definition at line 227 of file analysis.py.

Here is the call graph for this function:

◆ find_narrow_distances()

NarrowDistanceResult zlayout.analysis.PolygonAnalyzer.find_narrow_distances ( self,
float threshold_distance = 1.0 )
Find regions where polygon edges are too close together.

Definition at line 172 of file analysis.py.

Here is the call graph for this function:

◆ find_sharp_angles()

SharpAngleResult zlayout.analysis.PolygonAnalyzer.find_sharp_angles ( self,
float threshold_degrees = 30.0 )
Find all sharp angles in all polygons.

Definition at line 123 of file analysis.py.

Member Data Documentation

◆ polygon_ids

list zlayout.analysis.PolygonAnalyzer.polygon_ids = []

Definition at line 111 of file analysis.py.

◆ polygons

zlayout.analysis.PolygonAnalyzer.polygons = []

Definition at line 110 of file analysis.py.

◆ spatial_index

zlayout.analysis.PolygonAnalyzer.spatial_index = spatial_index

Definition at line 109 of file analysis.py.


The documentation for this class was generated from the following file: