diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-07-01 17:13:58 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-07-01 17:13:58 +0000 |
| commit | f19bf822a0c2a44ff6201e7d24c4646e2e98e4ed (patch) | |
| tree | 5459b5d6238a6788582d1fe944dedb300f0ee5d9 /src/libavoid/tests/inlineoverlap01.cpp | |
| parent | Merge branch 'master' of gitlab.com:inkscape/inkscape (diff) | |
| parent | Merge branch 'master' of gitlab.com:inkscape/inkscape (diff) | |
| download | inkscape-f19bf822a0c2a44ff6201e7d24c4646e2e98e4ed.tar.gz inkscape-f19bf822a0c2a44ff6201e7d24c4646e2e98e4ed.zip | |
Merge branch 'master' of gitlab.com:Frigory33/inkscape
Diffstat (limited to 'src/libavoid/tests/inlineoverlap01.cpp')
| -rw-r--r-- | src/libavoid/tests/inlineoverlap01.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libavoid/tests/inlineoverlap01.cpp b/src/libavoid/tests/inlineoverlap01.cpp new file mode 100644 index 000000000..ff4a3090f --- /dev/null +++ b/src/libavoid/tests/inlineoverlap01.cpp @@ -0,0 +1,25 @@ +#include "libavoid/libavoid.h" +using namespace Avoid; +int main(void) { + Router *router = new Router(OrthogonalRouting); + router->setRoutingPenalty(segmentPenalty); + router->setRoutingPenalty(fixedSharedPathPenalty); + router->setRoutingParameter(idealNudgingDistance, 20); + Rectangle rect335855988(Point(51140, 50190), Point(51510, 50885)); + new ShapeRef(router, rect335855988, 335855988); + Rectangle rect548374163(Point(51915, 50415), Point(52285, 50885)); + new ShapeRef(router, rect548374163, 548374163); + Rectangle rect942733064(Point(51771, 50790), Point(51829, 50885)); + new ShapeRef(router, rect942733064, 942733064); + ConnEnd srcPt100850179(Point(51925, 50800), 4); + ConnEnd dstPt100850179(Point(51500, 50650), 8); + new ConnRef(router, srcPt100850179, dstPt100850179, 100850179); + ConnEnd srcPt240732432(Point(51925, 50650), 4); + ConnEnd dstPt240732432(Point(51800, 50800), 1); + new ConnRef(router, srcPt240732432, dstPt240732432, 240732432); + router->processTransaction(); + router->outputDiagram("output/inlineoverlap01"); + bool overlap = router->existsOrthogonalTouchingPaths(); + delete router; + return (overlap) ? 1 : 0; +}; |
