gcode_reader.emulate.machines.baam ================================== .. py:module:: gcode_reader.emulate.machines.baam Classes ------- .. autoapisummary:: gcode_reader.emulate.machines.baam.BAAMMotionProfile gcode_reader.emulate.machines.baam.CincinnatiBAAM Module Contents --------------- .. py:class:: BAAMMotionProfile(max_jerk=None, max_accleration=None, max_velocity=None, max_velocity_z=None, max_velocity_w=None, junction_deviation=0.05) Bases: :py:obj:`gcode_reader.emulate.motion.MotionProfile` Factory 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. :param max_jerk: Maximum allowed jerk (units/s³). Used only by SCurve segments. Defaults to None. :type max_jerk: float, optional :param max_accleration: Maximum allowed acceleration (units/s²). Defaults to None. :type max_accleration: float, optional :param max_velocity: Ceiling on all target velocities (units/s). Defaults to None. :type max_velocity: float, optional :param junction_deviation: Junction-deviation parameter (same length units as positions). Larger values permit higher corner velocities. Defaults to 0.05. :type junction_deviation: float, optional .. attribute:: 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: float .. py:attribute:: max_velocity_z :value: None .. py:attribute:: max_veloicty_w :value: None .. py:class:: CincinnatiBAAM(**options) Bases: :py:obj:`gcode_reader.emulate.machine.Machine` An 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`. 2. **Custom M-Codes:** It processes BAAM-specific G-code commands for extruder control (M3/M5), parking (M68), etc. 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:: clear_history() Clears history and resets BAAM-specific state. .. 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:method:: process_operation(operation: gcode_reader.emulate.operations.AdditiveOperation, force=False) -> gcode_reader.emulate.operations.AdditiveOperation 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. 2. 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`. :param operation: The additive manufacturing operation to process. :type operation: AdditiveOperation :param force: If True, re-processes the operation even if it has been processed before. Defaults to False. :type force: bool, optional :returns: The operation with fully populated process data, including time-dependent extruder calculations. :rtype: AdditiveOperation .. py:attribute:: motion_profile .. py:attribute:: options .. py:attribute:: process_command_helpers .. py:attribute:: tools