gcode_reader.emulate.machines.electroimpact¶
Classes¶
Represents the ElectroImpact AFP machine configured for large-scale additive manufacturing. |
|
Represents the custom extruder on the ElectroImpact AFP/LFAM machine. |
Module Contents¶
- class gcode_reader.emulate.machines.electroimpact.ElectroImpact(**options)[source]¶
Bases:
gcode_reader.emulate.machine.MachineRepresents 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.
- Parameters:
tools (Tuple[Tool, ...], optional) – A tuple of Tool instances for the machine to use. Defaults to None.
parser (GcodeParser, optional) – An instance of a GcodeParser. Defaults to a new GcodeParser().
exporter (GcodeExporter, optional) – An instance of a GcodeExporter. Defaults to a new GcodeExporter().
**options – Keyword arguments passed to the constructor of the machine’s MachineOptions type.
- gcode_file_to_operation(filepath: str, operation_type=AdditiveOperation)[source]¶
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.
- Parameters:
- Returns:
A new, processed Operation instance.
- Return type:
- Raises:
ValueError – If operation_type is not a valid subclass of Operation.
- options¶
- class gcode_reader.emulate.machines.electroimpact.ElectroImpactExtruder(options=None)[source]¶
Bases:
gcode_reader.emulate.extruders.ExtruderRepresents 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”]).
- last_extrusion_distance¶
Cumulative extrusion distance at the last processed command, used to compute delta per move.
- Type:
Initializes a new Extruder instance.
- Parameters:
options (MachineOptions) – Configuration settings for the machine and this tool.
- process_command(command, process_data: gcode_reader.emulate.operations.AdditiveProcessData)[source]¶
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.
- Parameters:
command (Command) – The command to process.
process_data (AdditiveProcessData) – The data object to populate with post-processing information.
- Returns:
The updated AdditiveProcessData object.
- on = False¶