from ezdxf import new
# Create a new DXF document
doc = new("R2010")
# Add a modelspace to the document
msp = doc.modelspace()
# Define the dimensions of the L-Bracket
# Units assumed to be inches based on provided dimensions
# Front View
# L-shape
msp.add_line((0, 0), (3, 0)) # Bottom edge
msp.add_line((3, 0), (3, 1)) # Vertical edge up to bend
msp.add_line((3, 1), (0.25, 1)) # Horizontal edge to vertical leg
msp.add_line((0.25, 1), (0.25, 3)) # Vertical leg
msp.add_line((0.25, 3), (0, 3)) # Close the top edge
# Right View
# Outer rectangle
msp.add_line((5, 0), (8, 0)) # Bottom edge
msp.add_line((8, 0), (8, 3)) # Right edge
msp.add_line((8, 3), (5, 3)) # Top edge
msp.add_line((5, 3), (5, 0)) # Left edge
# Circular hole (center at 6,1)
msp.add_circle((6, 1), 0.5) # Radius 0.5 (Diameter 1.0)
# Chamfered edges
# Top-right chamfer
msp.add_line((8, 3), (7.75, 2.75))
msp.add_line((7.75, 2.75), (8, 2.75))
# Bottom-left chamfer
msp.add_line((5, 0), (5.25, 0.25))
msp.add_line((5.25, 0.25), (5.25, 0))
# Save the DXF file
file_path = "/mnt/data/L_Bracket.dxf"
doc.saveas(file_path)
file_path, A simplified illustration of an L-bracket design in a DXF format. Shows basic geometry including straight lines and circular hole. Used for engineering and design purposes