'Importing and mapping AutoCAD line segments to Anylogic Paths

I have an excel file containing AutoCAD line data that I wish to map to AnyLogic Path constructs. To do this I am trying to edit the XML file and adding in path objects with the requisite points. The AutoCAD data I have provides a center x,y, start x,y, end x,y, and angle for arc segments, and the standard points for lines. I can't seem to figure out how anylogic draws paths, though. I do not believe they are Bezier Curves, because every path contains 5 points as far as I can tell. For the straight line segments, it's easy enough to map, but for curves I cannot equate my Autocad ARC data with the Anylogic Path construct because I don't actually know how AnyLogic Paths are represented internally.

I tried a Bezier Curve which did not work. Tried adding in the center point of the arc segment as the fourth point but this did not work. Looked at B-Splines, doesn't seem to be this either.

Format examples from AnyLogic

To give more information about thow AnyLogic stores path information internally, here are some examples of the conversion the other way round, from the AnyLogic editor to the AnyLogic XML source file. There are (poly-) lines drawn in the AnyLogic editor and the coordinates of the corresponding end points in the AnyLogic point table and finally the respective XML AnyLogic source file representing the same line.

A simple straight line:

Straight line

A more complex line:

Shaped Line

Another line. The orange arrows show the connection between the visible points and the resulting XML:

Shaped Line with Annotations



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source