Update bricklayersNonPlanarInfill.py

This commit is contained in:
TenTech 2025-02-01 20:13:48 +01:00 committed by GitHub
parent 3b4d2013d0
commit 27cd61b19b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -314,7 +314,7 @@ def process_wall_shifting(lines, layer_height, extrusion_multiplier, enable_wall
def get_layer_height(gcode_lines):
"""Extract layer height from G-code header comments"""
for line in gcode_lines:
if "layer_height =" in line.lower():
if "; layer_height =" in line.lower():
match = re.search(r'layer_height = (\d*\.?\d+)', line, re.IGNORECASE)
if match:
return float(match.group(1))
@ -386,4 +386,4 @@ if __name__ == "__main__":
enable_wall_reorder=bool(args.wallReorder),
amplitude=args.amplitude,
frequency=args.frequency,
)
)