gumyr / build123d

A python CAD programming library
Apache License 2.0
402 stars 75 forks source link

2D Export of Arcs #285

Closed gumyr closed 1 year ago

gumyr commented 1 year ago

There appears to be a problem with the export of 2D arcs as shown below:

from build123d import *
from ocp_vscode import *

cylinder = Plane.XZ * Cylinder(10, 50)

visible, hidden = cylinder.project_to_viewport((100, -100, 100))
show_object(visible, name="v")
show_object(hidden, name="h")
exporter = ExportSVG(scale=1)
exporter.add_layer("Visible")
exporter.add_layer("Hidden", line_color=(99, 99, 99), line_type=LineType.ISO_DOT)
exporter.add_shape(visible, layer="Visible")
exporter.add_shape(hidden, layer="Hidden")
exporter.write(f"test_circle.svg")

image image

jrmobley commented 1 year ago

Calculation of the ellipse rotation was reversed. Fixed by d62f898.

jrmobley commented 1 year ago

Pics, or it didn't happen.

fixed-ellipses