gcode_reader.emulate.machines.electroimpact =========================================== .. py:module:: gcode_reader.emulate.machines.electroimpact Classes ------- .. autoapisummary:: gcode_reader.emulate.machines.electroimpact.ElectroImpact gcode_reader.emulate.machines.electroimpact.ElectroImpactExtruder Module Contents --------------- .. py:class:: ElectroImpact(**options) Bases: :py:obj:`gcode_reader.emulate.machine.Machine` Represents the ElectroImpact AFP machine configured for large-scale additive manufacturing. Handles ElectroImpact-specific M-codes: M9: Pellet head on. S code is layer number. M301: Enable extruder lanes. S code specifies lane count (1-4). M38: Load part offsets. M22: Load head offsets. Initializes a new Machine instance. :param tools: A tuple of Tool instances for the machine to use. Defaults to None. :type tools: Tuple[Tool, ...], optional :param parser: An instance of a GcodeParser. Defaults to a new GcodeParser(). :type parser: GcodeParser, optional :param exporter: An instance of a GcodeExporter. Defaults to a new GcodeExporter(). :type exporter: GcodeExporter, optional :param \*\*options: Keyword arguments passed to the constructor of the machine's `MachineOptions` type. .. py:method:: gcode_file_to_operation(filepath: str, operation_type=AdditiveOperation) Parses a G-code file and returns a processed Operation. This method uses the machine's configured parser to read a G-code file into a list of commands, wraps them in the specified `operation_type`, and then processes the operation to populate its process data. :param filepath: The path to the G-code file. :type filepath: str :param operation_type: The class of Operation to create (e.g., `Operation`, `AdditiveOperation`). Defaults to `Operation`. :type operation_type: type, optional :returns: A new, processed Operation instance. :rtype: Operation :raises ValueError: If `operation_type` is not a valid subclass of `Operation`. .. py:attribute:: options .. py:class:: ElectroImpactExtruder(options=None) Bases: :py:obj:`gcode_reader.emulate.extruders.Extruder` Represents the custom extruder on the ElectroImpact AFP/LFAM machine. Deposited volume is computed from the bead cross-sectional area (J parameter, stored as extrusion_rate) and the change in cumulative extrusion distance (K parameter, stored in command.settings["extrusion_length"]). .. attribute:: on Whether the extruder head is active. :type: bool .. attribute:: last_extrusion_distance Cumulative extrusion distance at the last processed command, used to compute delta per move. :type: float Initializes a new Extruder instance. :param options: Configuration settings for the machine and this tool. :type options: MachineOptions .. py:method:: process_command(command, process_data: gcode_reader.emulate.operations.AdditiveProcessData) Processes a command to update the extruder's state. If the command is an `commands.Extrude` command, this method dispatches to the appropriate `_calc_*` method to update the tool's state based on the extrusion model implemented by the subclass. :param command: The command to process. :type command: Command :param process_data: The data object to populate with post-processing information. :type process_data: AdditiveProcessData :returns: The updated AdditiveProcessData object. .. py:method:: reset_history() .. py:attribute:: last_extrusion_distance :type: float :value: 0.0 .. py:attribute:: on :value: False