Update bricklayersNonPlanarInfill.py

This commit is contained in:
TenTech
2025-02-01 20:13:48 +01:00
committed by GitHub
parent 3b4d2013d0
commit 27cd61b19b

View File

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