Replies: 2 comments 9 replies
-
This works for me: from build123d import *
from ocp_vscode import show_all
import ezdxf
a = CenterArc((0, 0), 1, 0, 90)
exporter = ExportDXF(unit=Unit.MM, line_weight=0.5)
exporter.add_layer("Layer 1")
exporter.add_shape(a, layer="Layer 1")
exporter.write("output.dxf")
doc = ezdxf.readfile("output.dxf")
# Iterate over all entities in the modelspace and print their types
for entity in doc.modelspace():
if entity.dxftype() == "ARC":
# Display ARC-specific attributes
print("ARC found:")
print(f" Center: {entity.dxf.center}")
print(f" Radius: {entity.dxf.radius}")
print(f" Start Angle: {entity.dxf.start_angle}")
print(f" End Angle: {entity.dxf.end_angle}")
else:
print(entity.dxftype())
show_all()
How were the DXF files generated? |
Beta Was this translation helpful? Give feedback.
6 replies
-
Did you look at using If you do: visible = section(shaft.part, Plane.XY).edges() you'll get: |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm finding that when entities (fillets, slots etc) are projected to dxf and should be arcs, in dxf they come out as some polylines that can't be dimensioned as radii.
Is there any workaround for this?
Beta Was this translation helpful? Give feedback.
All reactions