vpype_gscrib.renderer.beds

Machine work area management.

This module provides implementations for controlling the machine’s bed, which serves as the foundational surface for machining or printing operations. It may include G-code generation for various bed-related functions, such as:

  • Temperature control (heating and cooling)

  • Work-holding mechanisms (e.g., vacuum, clamps)

  • Bed leveling and compensation

It does not manage toolhead positioning during machining or printing operations. Such motion is handled by the head component.

class vpype_gscrib.renderer.beds.BaseBed

Bases: ABC

Base class for controlling machine bed/table.

This abstract base class defines the interface for controlling bed-related functionalities such as heating, cooling, material holding, and leveling. It provides methods to prepare the bed and manage its state during operation.

abstractmethod turn_off(ctx: GContext)

Deactivate the bed system.

Generates G-code commands to stop the bed.

Parameters:

ctx (GContext) – The G-code generation context

abstractmethod turn_on(ctx: GContext)

Activate the bed system.

Generates G-code commands to prepare the bed.

Parameters:

ctx (GContext) – The G-code generation context

class vpype_gscrib.renderer.beds.BedFactory

Bases: object

A factory for creating bed managers.

This factory creates specialized bed managers that handle the control of machine beds/tables.

classmethod create(bed_type: BedType) BaseBed

Create a new bed manger instance.

Parameters:

bed_type (BedType) – Bed type.

Returns:

Bed manger instance.

Return type:

BaseBed

Raises:

KeyError – If type is not valid.

class vpype_gscrib.renderer.beds.HeatedBed

Bases: BaseBed

Heated bed implementation.

This class handles the functionality for heated beds. It sets the bed target temperature when the bed is turned on and waits for the target to be reached. Sets the temperature to zero when turned off.

turn_off(ctx: GContext)

Deactivate the bed system.

Generates G-code commands to stop the bed.

Parameters:

ctx (GContext) – The G-code generation context

turn_on(ctx: GContext)

Activate the bed system.

Generates G-code commands to prepare the bed.

Parameters:

ctx (GContext) – The G-code generation context

class vpype_gscrib.renderer.beds.NoBed

Bases: BaseBed

No-op machine bed implementation.

This class does not perform any bed operations, effectively disabling bed control.

turn_off(ctx: GContext)

Deactivate the bed system.

Generates G-code commands to stop the bed.

Parameters:

ctx (GContext) – The G-code generation context

turn_on(ctx: GContext)

Activate the bed system.

Generates G-code commands to prepare the bed.

Parameters:

ctx (GContext) – The G-code generation context