D
D
domanskiy2021-02-20 18:17:10
Python
domanskiy, 2021-02-20 18:17:10

How to draw an arc in SVG, knowing one radius and start and end points?

I am making a CF2 to SVG CAD file format converter using PYTHON
The problem is that CF2 only supports lines, text and arches
There are no problems with the line
But with the arch, there is an
arch code in CF2

A,2,1,0,-0.000000,-0.000000,90.000000,-0.000000,45.000000,-20.000000,+1,0,0.000000

Specification:
A, p, t, at, sx, sy, ex, ey, cx, cy, =/-1, nbridges, wbridges
A us the capital letter A.
P is the pointage in points (1/72 inches).
t is the common file linetype
at is the common file auxiliary linetype
sx, sy is the start coordinate of the arc.
ex, ey is the end coordinate of the arc.
cx, cy coordinates of the center of the circle
nbridges is the number of bridges in the arc.
wbridges is the width of the bridges in the arc in mm.

In the specification for SVG, I did not find only ARC from an ellipse, along two radii.

Can you tell me how to calculate the data necessary for SVG from CF2 data?
You can just detailed formulas. I’ll translate it into Python myself ... probably

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
domanskiy, 2021-02-21
@domanskiy

Something I stormed. This is a simple task to find the hypotenuse by coordinates.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question