mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-29 01:14:35 +02:00
Smooth bug (#740)
* Smoothing function: provide ability to keep horizontal/vertical lines (important for cut lines) * Introducting API compatibility macros for generic plugins.
This commit is contained in:
Vendored
+3
@@ -289,6 +289,9 @@ class DBPolygonTests(unittest.TestCase):
|
||||
p = pya.Polygon( [ pya.Point.new(0, 0), pya.Point.new(10, 50), pya.Point.new(0, 100), pya.Point.new(200, 100), pya.Point.new(200, 0) ])
|
||||
self.assertEqual(str(p.smooth(5)), "(0,0;10,50;0,100;200,100;200,0)")
|
||||
self.assertEqual(str(p.smooth(15)), "(0,0;0,100;200,100;200,0)")
|
||||
p = pya.Polygon( [ pya.Point.new(0, 0), pya.Point.new(10, 50), pya.Point.new(10, 100), pya.Point.new(200, 100), pya.Point.new(200, 0) ])
|
||||
self.assertEqual(str(p.smooth(15, False)), "(0,0;10,100;200,100;200,0)")
|
||||
self.assertEqual(str(p.smooth(15, True)), "(0,0;10,50;10,100;200,100;200,0)")
|
||||
|
||||
# Ellipse constructor
|
||||
p = pya.Polygon.ellipse( pya.Box(-10000, -20000, 30000, 40000), 200 )
|
||||
|
||||
Reference in New Issue
Block a user