Index: src_plugins/io_hyp/tests/gensamp =================================================================== --- src_plugins/io_hyp/tests/gensamp (revision 8071) +++ src_plugins/io_hyp/tests/gensamp (revision 8072) @@ -269,6 +269,14 @@ print " }" return +def mkpolyvoid (id, x0, y0, w, h): + print " {POLYVOID ID=%i X=%f Y=%f" % (id, x0, y0) + print " (LINE X=%f Y=%f)" % (x0+w, y0) + print " (LINE X=%f Y=%f)" % (x0+w, y0+h) + print " (LINE X=%f Y=%f)" % (x0, y0+h) + print " (LINE X=%f Y=%f)" % (x0, y0) + print " }" + return x1 = 11.0 x2 = x0 + w / 4.0 @@ -301,6 +309,20 @@ print " (SEG X1=%f Y1=%f X2=%f Y2=%f W=0.04 L=component)" % (x1, y0+h/2.0+s, x1, y0+h/2.0+2*s) print "}" +# test nesting of polygons + +x0 = 14.0 +y0 = 5.0 +s = 0.25 +print "{NET=nesting_poly_1 PS=0.05" +mkpolygon("POUR", 7, x0, y0, 8*s, 8*s) +mkpolyvoid(7, x0+1*s, y0+1*s, 6*s, 6*s) +print "}" +print "{NET=nesting_poly_2 PS=0.05" +mkpolygon("POUR", 8, x0+2*s, y0+2*s, 4*s, 4*s) +mkpolyvoid(8, x0+3*s, y0+3*s, 2*s, 2*s) +print "}" + print "{END}" # not truncated Index: src_plugins/io_hyp/tests/samp.hyp =================================================================== --- src_plugins/io_hyp/tests/samp.hyp (revision 8071) +++ src_plugins/io_hyp/tests/samp.hyp (revision 8072) @@ -258,4 +258,32 @@ (SEG X1=13.000000 Y1=5.250000 X2=13.000000 Y2=6.250000 W=0.04 L=component) (SEG X1=13.000000 Y1=6.250000 X2=13.000000 Y2=7.250000 W=0.04 L=component) } +{NET=nesting_poly_1 PS=0.05 + {POLYGON L=component T=POUR W=0.1 ID=7 X=14.000000 Y=5.000000 + (LINE X=16.000000 Y=5.000000) + (LINE X=16.000000 Y=7.000000) + (LINE X=14.000000 Y=7.000000) + (LINE X=14.000000 Y=5.000000) + } + {POLYVOID ID=7 X=14.250000 Y=5.250000 + (LINE X=15.750000 Y=5.250000) + (LINE X=15.750000 Y=6.750000) + (LINE X=14.250000 Y=6.750000) + (LINE X=14.250000 Y=5.250000) + } +} +{NET=nesting_poly_2 PS=0.05 + {POLYGON L=component T=POUR W=0.1 ID=8 X=14.500000 Y=5.500000 + (LINE X=15.500000 Y=5.500000) + (LINE X=15.500000 Y=6.500000) + (LINE X=14.500000 Y=6.500000) + (LINE X=14.500000 Y=5.500000) + } + {POLYVOID ID=8 X=14.750000 Y=5.750000 + (LINE X=15.250000 Y=5.750000) + (LINE X=15.250000 Y=6.250000) + (LINE X=14.750000 Y=6.250000) + (LINE X=14.750000 Y=5.750000) + } +} {END}