refactor chamfer-tools.py example
@@ -21,7 +21,7 @@ def chamfer_tool():
for angle in range(-165, 180, 15):
points = Vec3.list([(-100, 0), (0, 0), Vec3.from_deg_angle(angle, 100)])
p = chamfer(points, length=3.0)
- msp.add_lwpolyline(p.flattening(0))
+ msp.add_polyline3d(p.flattening(0))
doc.saveas(CWD / "chamfer.dxf")
@@ -33,7 +33,7 @@ def chamfer2_tool():
for angle in range(-165, 180, 15):
points = Vec3.list([(-100, 0), (0, 0), Vec3.from_deg_angle(angle, 100)])
p = chamfer2(points, a=3, b=6)
- msp.add_lwpolyline(p.flattening(0))
+ msp.add_polyline3d(p.flattening(0))
doc.saveas(CWD / "chamfer2.dxf")
@@ -43,9 +43,11 @@ def fillet_tool():
msp = doc.modelspace()
for angle in range(-165, 180, 15):
- points = Vec3.list([(-100, 0), (0, 0), Vec3.from_deg_angle(angle, 100)])
- p = fillet(points, radius=3.0)
- msp.add_lwpolyline(p.flattening(0.1))
+ points = Vec3.list(
+ [(-100, 0), (0, 0), Vec3.from_deg_angle(angle, 100)]
+ )
+ p = fillet(points, radius=10.0)
+ msp.add_polyline3d(p.flattening(0.1))
doc.saveas(CWD / "fillet.dxf")
