Thread settings dict through EmbroideryPipeline (currently hardcoded) #76
Labels
No labels
blocked:children
blocked:depends-101
blocked:depends-103
blocked:depends-104
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:preflight
bug
chore
feature-request
in-progress
lint-cleanup
needs-decompose
performance
quality
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/easystitch#76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
EmbroideryPipeline._emit_machine_file()(insrc/main_pipeline.py) hardcodes the stitch-generation config:The
kwargsaccepted byprocess()andprocess_bytes()are ignored for stitch generation. Callers have no way to influence density, spacing, or stitch length.Goal
Plumb user-provided settings all the way through to the stitch generators.
Affected call sites
src/main_pipeline.py:_emit_machine_file()— hardcoded config dictsrc/main_pipeline.py:_generate_stitches_from_paths()— receives config but doesn't expose it as a parameter on the public APIsrc/embroidery_converter/satin_stitch_generator.py—generate_satin_stitches(path, config)src/embroidery_converter/fill_stitch_generator.py—generate_fill_stitches(path, config)src/embroidery_converter/running_stitch_generator.py—generate_running_stitches(path, config)Proposed API change
DigitizeSettingsis the dataclass introduced by thedigitize_to_stitches()issue.What to thread
fill_density_mm-> config["fill_density_mm"]satin_stitch_spacing_mm-> config["satin_stitch_spacing_mm"]running_stitch_spacing_mm-> config["running_stitch_spacing_mm"]min_stitch_length_mm-> config["min_stitch_length_mm"]max_stitch_length_mm-> config["max_stitch_length_mm"]max_colors->physical_optimizercolor reductionmachine_profile.hoop_size-> hoop-fit constraint inphysical_optimizermachine_profile.max_stitch_length_mm-> stitches-per-segment budgetAcceptance
process_bytes(data, settings=DigitizeSettings(fill_density_mm=0.8))produces measurably different stitches thanprocess_bytes(data, settings=DigitizeSettings(fill_density_mm=0.2))(test: same input, different settings, different stitch counts).process_bytes).Mark/easystitch-service#1accepts the service's settings payload and translates it toDigitizeSettings1:1.Blocks
Mark/easystitch-service#1— settings flow is the entire point of the service contract.Notes
from_rasterbranch in_emit_machine_fileusesconvert_to_stitches(paths, config)which is a stub returning every coordinate as a "normal" stitch. That's a separate bug — issue #3.