From fd733201b82f39655488a286c89142f321ef9dc9 Mon Sep 17 00:00:00 2001 From: Sylvain Chiron Date: Sat, 1 Jul 2017 13:36:41 +0200 Subject: Updated libs from the Adaptagrams project: libavoid, libcola and libvspc; changed the code to match the new API Signed-off-by: Sylvain Chiron --- src/libavoid/tests/infinity.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/libavoid/tests/infinity.cpp (limited to 'src/libavoid/tests/infinity.cpp') diff --git a/src/libavoid/tests/infinity.cpp b/src/libavoid/tests/infinity.cpp new file mode 100644 index 000000000..1fbf683a3 --- /dev/null +++ b/src/libavoid/tests/infinity.cpp @@ -0,0 +1,26 @@ +#include "libavoid/libavoid.h" +using namespace Avoid; +int main(void) { + Router *router = new Router(OrthogonalRouting); + router->setRoutingPenalty(segmentPenalty, 50); + router->setRoutingParameter(idealNudgingDistance, 10); + Rectangle rect47(Point(51145, 50195), Point(51145+360, 50195+685)); + new ShapeRef(router, rect47); + Rectangle rect46(Point(51920, 49770), Point(51920+360, 49770+310)); + new ShapeRef(router, rect46); + Rectangle rect45(Point(51151, 49770), Point(51151+360, 49770+310)); + new ShapeRef(router, rect45); + ConnEnd srcPt53(Point(51150,49850), 4); + ConnEnd dstPt53(Point(51500,50350), 8); + new ConnRef(router, srcPt53, dstPt53); + ConnEnd srcPt52(Point(52275,49850), 8); + ConnEnd dstPt52(Point(51150,49925), 4); + new ConnRef(router, srcPt52, dstPt52); + ConnEnd srcPt6(Point(51150,50500), 4); + ConnEnd dstPt6(Point(51925,50000), 4); + new ConnRef(router, srcPt6, dstPt6, 6); + router->processTransaction(); + router->outputDiagram("output/infinity"); + delete router; + return 0; +}; -- cgit v1.2.3