gcode_reader.emulate.machines.baam¶
Classes¶
Factory for generating MotionSegment objects from process data. |
|
An emulation environment for a Cincinnati BAAM (Big Area Additive Manufacturing) |
Module Contents¶
- class gcode_reader.emulate.machines.baam.BAAMMotionProfile(max_jerk=None, max_accleration=None, max_velocity=None, max_velocity_z=None, max_velocity_w=None, junction_deviation=0.05)[source]¶
Bases:
gcode_reader.emulate.motion.MotionProfileFactory for generating MotionSegment objects from process data.
Holds machine-wide kinematic constraints and orchestrates a two-pass (GRBL-style) velocity planning algorithm: junction-deviation corner limiting followed by forward and backward kinematic propagation.
- Parameters:
max_jerk (float, optional) – Maximum allowed jerk (units/s³). Used only by SCurve segments. Defaults to None.
max_accleration (float, optional) – Maximum allowed acceleration (units/s²). Defaults to None.
max_velocity (float, optional) – Ceiling on all target velocities (units/s). Defaults to None.
junction_deviation (float, optional) – Junction-deviation parameter (same length units as positions). Larger values permit higher corner velocities. Defaults to 0.05.
- feed_rate_time_base_s¶
Divisor applied to feed-rate values to convert them from units/minute to units/second. Defaults to 60.0.
- Type:
- max_velocity_z = None¶
- max_veloicty_w = None¶
- class gcode_reader.emulate.machines.baam.CincinnatiBAAM(**options)[source]¶
Bases:
gcode_reader.emulate.machine.MachineAn emulation environment for a Cincinnati BAAM (Big Area Additive Manufacturing) machine.
This class extends the generic Machine to include BAAM-specific behaviors: 1. 4-Axis Coordinate System (X, Y, Z, W): It handles the W-axis,
which acts as a dynamic Z-offset for the build plate. The final Z position is calculated as Z_command - W_command.
Custom M-Codes: It processes BAAM-specific G-code commands for extruder control (M3/M5), parking (M68), etc.
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.
- process_operation(operation: gcode_reader.emulate.operations.AdditiveOperation, force=False) gcode_reader.emulate.operations.AdditiveOperation[source]¶
Fully processes an additive operation, including a second pass for extruder data.
This method extends the base Machine’s processing pipeline to accommodate the ScrewExtruder’s dependency on accurate time estimates for its calculations.
The process is as follows: 1. It first calls super().process_operation(), which runs the full
kinematic simulation and applies the motion profile. This is the critical step that calculates and populates the elapsed_time for each movement command.
It then performs a second pass, iterating through each command and its now time-aware process_data. This allows the extruder tool to use the elapsed_time to accurately calculate deposited_volume.
- Parameters:
operation (AdditiveOperation) – The additive manufacturing operation to process.
force (bool, optional) – If True, re-processes the operation even if it has been processed before. Defaults to False.
- Returns:
- The operation with fully populated process data,
including time-dependent extruder calculations.
- Return type:
- motion_profile¶
- options¶
- process_command_helpers¶
- tools¶