Importing and mapping AutoCAD line segments to Anylogic Paths - bezier

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:
A more complex line:
Another line. The orange arrows show the connection between the visible points and the resulting XML:

Related

Graphic editor for FIT file editing

I'm searching for a graphic editor to move lon/lat points in FIT file.
Isn't there a software for graphic editing of the lon/lat points recorded in FIT file as can be done easily with GPX files? I searched a lot but couldn't find anything satisfactory. Is there no way to simply change the position of the points by dragging them on a map base (see attached image)? I found a conversation where someone suggested that it couldn't be done because the number of heartbeat recordings (present in the .FIT file) did not correspond to the number of GPS recordings... Exporting my .FIT file in CSV format I realized that it's not like that at all and the file I get is exactly identical to a GPX exported in CSV with the "heartbeat" column added.
Could anyone help me? thank you!
P.S.: there is maybe a solution based on txc file use?

How to extract Bezier curve equation from font with no "thickness"?

[EDIT]
I am working on a path-following problem where the path is described by the geometric path of letters from a font. Bezier curves will solve my problem of a predefined geometric path in terms of an equation, but I can't seem to find a tool that enables me to generate Bezier curves of each letter from a font, with a weight of 0. The figure below illustrates what I want to achieve.
Weighted 'a' to non-weighted 'a':
The path-following problem that I need to solve will be present in a robot with a control system (Constrained Model Predictive Control for non-linear path-following) that will write these letters with a pen. I simply need a tool that could extract a Bezier curve(s) from each letter of an existing font. Fontforge (windows) shows the Bezier curve control points from where an outline of a glyph is constructed. The problem with Fontforge is that fonts are defined to have some sort of "thickness", which in turn results in a need to fill the character. My robot should only write the letters like a human would do (no-filling). A partial solution to this problem will also help.
Note: I am not sure whether this is possible using Fontforge (Windows), and changing the weight attribute of a glyph gives errors.
Reference to a similar robot: Bond│ HANDWRITING│ writing robot.

Draw Graph inside word document using vb.net

I'm trying to draw graph inside word document using VB.net.
I'm having the X-axis and Y-axis points and I need to draw a line graph according to these points.
Also next time when I run this tool and pass the document file, the tool is supposed to read the previous data points and draw another graph with the appended data of the previous points.
Thanks a lot

How to measure different coordinates from a PDF file on Windows?

I am looking for a way to measure the coordinates of different rectangles on a PDF file?
Mainly I do have to perform some overprinting on an existing PDF and I need to know the x,y,w,h on where I am supposed to write the texts.
It seems that Preview.app on Mac has this ability but so far I wasn't able to find anything on Windows that does the same.
Please do not confuse this feature with the Measuring Tools from Adobe Reader which are used to measure distance in printed construction stuff, not the PDF page itself.
It seems that the default using of measure is point, so I need something that would allow to select a rectangle and that will tell me the coordinates.
Please do not suggest on exporting as a imagine and using something else to measure the pixels on the image.
Update: http://legacy.activepdf.com/support/knowledgebase/view.cfm?tk=rl&kb=11866 -- PDF Units, that's what I am looking for, something to measure the PDF coordinates in PDF units.
Disclaimer: I work for Atalasoft.
I know you said not to suggest this, but honestly, it's the easiest approach:
If you mean "sweep out a rectangle in the UI and report the coordinates", that's pretty straight forward, but it's going to be a build-your-own type of thing. What you will need are:
A PDF rasterizer (GhostScript, Acrobat, FoxIt, Atalasoft) to get you an image at a specific resolution.
A tool to display that image in a window and let you sweep out a rectangle (this is straight forward winforms type code for .NET, but we have a control that does this out of the box - combining 1 & 2 into one step).
A tool that can look at the structure of a PDF page and report back the crop box (if any) and the media box for each page (iText, DotPdf).
A tool/understanding of matrix transformations to build the matrix that goes from display space into PDF space (and/or vice versa, probably in iText, definitely in DotPdf)
The code flow becomes something like:
For each page:
Open document, pull out crop and media box, rasterize page, build transformation matrix.
Display image, build/hook into event for selection changing.
Push the image viewer rectangle coordinates through the transformation matrix.
Profit.
From a coding point of view (assuming 0 prior knowledge of this, but a decent understanding of linear algebra), from 3 days to a 2 weeks. If I were to write it, it would probably take on the order of a few hours, but I wrote most of our PDF tools and this is pretty easy.
If your goal is to intuit where rectangles are on the page and report back those coordinates, that's also doable, but it decidedly non-trivial in comparison. You need to write code that can rip through a PDF display list and interpret the contents correctly. That means being able to handle all the cumulative matrix transformations, the graphics state changes, the gstate object use, Form XObject placement, and so on. You need to answer the question "what is a rectangle?" because in PDF placement, it could be an re operator, a set of degenerate beziers, a set of lines, an image of a rectangle or (surprise!) a combination of all of the above. Honestly, intuiting anything about the content on a PDF page is a Herculean task.

3D vector graphics into PDF

I'm looking for any kind of technology that will let me draw dashed curves in 3D (see attachment) and export it into PDF with a guarantee that dashed lines are still paths in PDF file (not a collection of single little lines!).
I tried Processing, but see no option there to export it correctly.
In theory you can do this if you have the set of Beziers that describe each line and then set set the dash pattern for the line. The dash pattern will be non-uniform and specified to cover the entire length of each path.
The problem I think you will run into is that line thickness cannot vary over the length of a single path, so you can't really get the effect of perspective in the change of line thickness.
How to do this without line thickness change - project the 3D path of each curve onto 2D, measure the projected dash and gap lengths and construct the corresponding PDF path.