Settings
Printer
__init__
__init__(
name: str,
light_engines: list[LightEngine],
xy_stage_available: bool = False,
vacuum_available: bool = False,
default_position_settings: PositionSettings = PositionSettings(),
)
Initialize a Printer object.
Parameters:
- name: Name of the printer.
- light_engines: List of LightEngine objects.
- xy_stage_available: Whether the printer has an XY stage.
- vacuum_available: Whether the printer supports vacuum printing.
- default_position_settings: Default position settings for the printer.
from_file
classmethod
from_file(file_path: str | Path) -> Printer
Load a printer configuration from a JSON file.
get_light_engine_by_name
get_light_engine_by_name(name: str) -> LightEngine | None
Return the light engine matching the given name, or None if not found.
save
save(file_path: str | Path)
Save printer configuration to a JSON file.
LightEngine
__init__
__init__(
name: str = "visitech",
px_size: float = 0.0076,
px_count: tuple[int, int] = (2560, 1600),
wavelengths: list[int] = [365],
default_exposure_settings: list[ExposureSettings] = [
ExposureSettings()
],
grayscale_available: list[bool] = [False],
settle_time_ms: float = 0.0,
stitched_px_overlap=(0, 0),
x_offset_limits: tuple[(int, float), (int, float)] = (
0,
0,
),
y_offset_limits: tuple[(int, float), (int, float)] = (
0,
0,
),
)
Initialize a LightEngine object.
Parameters:
- name: Name of the light engine.
- px_size: Pixel size in mm.
- px_count: Tuple of (width, height) pixel count.
- wavelengths: List of supported wavelengths in nm (first wavelength is the default).
- grayscale_available: List of booleans indicating if grayscale is available for each wavelength.
- default_exposure_settings: List of default exposure settings for each wavelength.
- settle_time_ms: Extra wait time in milliseconds for the first exposure after switching to this light engine.
- x_offset_limits: Tuple of (min_x, max_x) exposure position offset limits in microns.
- y_offset_limits: Tuple of (min_y, max_y) exposure position offset limits in microns.
- stitched_px_overlap: Tuple of (x_overlap, y_overlap) in pixels for stitched workspaces.
ResinType
__init__
__init__(
bulk_exposure: float,
exposure_offset: float = 0.0,
monomer: list[tuple[str, float]] = [("PEG", 100)],
uv_absorbers: list[tuple[str, float]] = [("NPS", 2.0)],
initiators: list[tuple[str, float]] = [("IRG", 1.0)],
additives: list[tuple[str, float]] = [],
)
Initialize the resin formulation.
Parameters:
- bulk_exposure: Base exposure time for bulk polymerization in milliseconds.
- exposure_offset: Optional exposure offset before polymerization begins in milliseconds. Used to adjust for polymerization delay from oxygen inhibition or other added inhibitors.
- monomer: List of tuples (name, percentage) for monomers.
- uv_absorbers: List of tuples (name, percentage) for UV absorbers.
- initiators: List of tuples (name, percentage) for photoinitiators.
- additives: List of tuples (name, percentage) for additives.
Resin naming convention:
- Use 3 letter abbreviations for materials.
- Follow with a dash and the percent amount of the material
- If it's a monomer or oligimer, the percent is the fraction of total monomer/oligimer
- If it's an absorber, photoinitiator, or additive, the percent is a w/w fraction of the total resin mass
- When there are multiple materials in a category, separate them with a single underscore, _
- Separate categories of materials with two underscores, __
- Schema: MoA-XX_MoB-XX__AbA-XX_AbB-XX__PIA-XX_PIB_XX__AdA-XX_AdB-XX
- where:
- MoA, MoB - monomers A and B
- AbA, AbB - absorbers A and B
- PIA, PIB - photoinitiators A and B
- AdA, AdB - additives A and B
- XX - number
from_file
classmethod
from_file(file_path: str | Path) -> ResinType
Load a resin formulation from a JSON file.
save
save(file_path: str | Path)
Save resin formulation to a JSON file.
PositionSettings
__init__
__init__(
distance_up: float = None,
initial_wait: float = None,
up_speed: float = None,
up_acceleration: float = None,
up_wait: float = None,
down_speed: float = None,
down_acceleration: float = None,
final_wait: float = None,
special_layer_techniques: list[
SpecialLayerTechniques
] = [],
)
Initialize position settings for layer movement.
Parameters:
- distance_up: Distance to move up in mm.
- initial_wait: Initial wait time in milliseconds.
- up_speed: Speed to move up in mm/sec.
- up_acceleration: Acceleration to move up in mm/sec^2.
- up_wait: Wait time after moving up in milliseconds.
- down_speed: Speed to move down in mm/sec.
- down_acceleration: Acceleration to move down in mm/sec^2.
- final_wait: Final wait time in milliseconds.
- special_layer_techniques: List of SpecialLayerTechniques to apply.
Default Values:
- distance_up: float = 1.0,
- initial_wait: float = 0.0,
- up_speed: float = 25.0,
- up_acceleration: float = 50.0,
- up_wait: float = 0.0,
- down_speed: float = 20.0,
- down_acceleration: float = 50.0,
- final_wait: float = 0.0,
copy
copy()
Create a copy of the position settings.
ExposureSettings
__init__
__init__(
grayscale_correction: bool = None,
bulk_exposure_multiplier: float = None,
power_setting: int = None,
wavelength: int = None,
relative_focus_position: float = None,
wait_before_exposure: float = None,
wait_after_exposure: float = None,
special_image_techniques: list[
SpecialImageTechniques
] = [],
**kwargs
)
Initialize exposure settings for layer exposure.
Parameters:
- grayscale_correction: Whether to apply grayscale correction.
- bulk_exposure_multiplier: Multiplier applied to resin bulk exposure.
- power_setting: Power setting of the light engine in percentage.
- wavelength: Wavelength of the light engine in nm.
- relative_focus_position: Relative focus position in microns.
- wait_before_exposure: Wait time before exposure in milliseconds.
- wait_after_exposure: Wait time after exposure in milliseconds.
- special_image_techniques: List of SpecialImageTechniques to apply.
Default Values:
- grayscale_correction: bool = False,
- bulk_exposure_multiplier: float = 1.0,
- power_setting: int = 100,
- wavelength: int = 365,
- relative_focus_position: float = 0.0,
- wait_before_exposure: float = 0.0,
- wait_after_exposure: float = 0.0,
copy
copy()
Create a copy of the exposure settings.
MembraneSettings
__init__
__init__(
exposure_settings: ExposureSettings = ExposureSettings(),
max_membrane_thickness_um: float = 0.0,
dilation_px: int = 0,
scan_for_membrane: bool = True,
)
Initialize membrane settings for membrane exposure.
Parameters:
- exposure_settings: ExposureSettings object for membrane exposure.
- max_membrane_thickness_um: Maximum membrane thickness in microns.
- dilation_px: Membrane dilation in pixels
- scan_for_membrane: Whether to scan slices for membranes or use masks directly.
copy
copy()
Create a copy of the membrane settings.
SecondaryDoseSettings
__init__
__init__(
edge_bulk_exposure_multiplier: float = None,
edge_erosion_px: int = 0,
edge_dilation_px: int = 0,
roof_bulk_exposure_multiplier: float = None,
roof_erosion_px: int = 0,
roof_layers_above: int = 0,
)
Initialize secondary dose settings for edges and roofs.
Parameters:
- edge_bulk_exposure_multiplier: Multiplier applied to resin bulk exposure for edge features.
- edge_erosion_px: Erosion in pixels
- edge_dilation_px: Dilation in pixels
- roof_bulk_exposure_multiplier: Multiplier applied to resin bulk exposure for roof features.
- roof_erosion_px: Erosion in pixels
- roof_layers_above: Number of layers above roof features to apply secondary dose.
copy
copy()
Create a copy of the secondary dose settings.