vpype_gscrib.renderer.fans

Machine fan speed and control

This module provides implementations for controlling the machine’s fans.

class vpype_gscrib.renderer.fans.BaseFan

Bases: ABC

Base class for controlling machine fans.

abstractmethod turn_off(ctx: GContext)

Deactivate the fan system.

Generates G-code commands to stop the fans.

Parameters:

ctx (GContext) – The G-code generation context

abstractmethod turn_on(ctx: GContext)

Activate the fan system.

Generates G-code commands to turn on the fans.

Parameters:

ctx (GContext) – The G-code generation context

class vpype_gscrib.renderer.fans.CoolingFan

Bases: BaseFan

Provides basic fan control

turn_off(ctx: GContext)

Deactivate the fan system.

Generates G-code commands to stop the fans.

Parameters:

ctx (GContext) – The G-code generation context

turn_on(ctx: GContext)

Activate the fan system.

Generates G-code commands to turn on the fans.

Parameters:

ctx (GContext) – The G-code generation context

class vpype_gscrib.renderer.fans.FanFactory

Bases: object

A factory for creating fan managers.

classmethod create(fan_type: FanType) BaseFan

Create a new fan manger instance.

Parameters:

fan_type (FanType) – Fan type.

Returns:

Fan manger instance.

Return type:

BaseFan

Raises:

KeyError – If type is not valid.

class vpype_gscrib.renderer.fans.NoFan

Bases: BaseFan

No-op machine fan implementation.

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

turn_off(ctx: GContext)

Deactivate the fan system.

Generates G-code commands to stop the fans.

Parameters:

ctx (GContext) – The G-code generation context

turn_on(ctx: GContext)

Activate the fan system.

Generates G-code commands to turn on the fans.

Parameters:

ctx (GContext) – The G-code generation context