I use two different extrusion widths. It looks like this will work:
w1 = fc.ExtrusionGeometry(width=0.4, height=0.28, units="mm")
w2 = fc.ExtrusionGeometry(width=0.8, height=0.28, units="mm")
r.append(w2)
r += wide_geom
r.append(w1)
r += narrow_geom
I would rather not have to override w1. The best I can do in my py file is:
class Lambda:
def __init__(self, f):
self.f = f
def gcode(self, state):
self.f(state)
w2 = fc.ExtrusionGeometry(width=0.8, height=0.28, units="mm")
w1 = None
r.append(Lambda(lambda state: (w1 := state.extrusion_geometry)))
r.append(w2)
r+= wide_geom
r.append(Lambda(lambda state: setattr(state,'extrusion_geometry',w1)))
r+= narrow_geom
The duplicate Lambda, := instead of =, setattr instead of state.extrusion_geometry = w1 make this "improvement" worse than the original problem.
I use two different extrusion widths. It looks like this will work:
I would rather not have to override
w1. The best I can do in my py file is:The duplicate Lambda,
:=instead of=,setattrinstead ofstate.extrusion_geometry = w1make this "improvement" worse than the original problem.