No Description

Kevin Lee eeabd4ce06 In progress origin work 11 months ago
samples eeabd4ce06 In progress origin work 11 months ago
src eeabd4ce06 In progress origin work 11 months ago
tests 65fc461f66 Initial diff 11 months ago
.gitignore 86b86d25ec Init 11 months ago
Cargo.lock 95288f698f Hatch work 11 months ago
Cargo.toml 95288f698f Hatch work 11 months ago
README.md ec248aaaad Cleanup 11 months ago
imhex.txt 95288f698f Hatch work 11 months ago

README.md

EzCAD Patcher

This tool parses and patches EZCAD files with values specified in a YAML config file. The EZCAD format as implemented in this crate was reverse engineered from sample files, so use at your own risk.

Usage

Usage: minilase.exe [OPTIONS] --input <INPUT>

Options:
  -i, --input <INPUT>    Input file to parse
  -d, --diff <DIFF>      File to diff input against
  -o, --output <OUTPUT>  Output file to write to
  -c, --config <CONFIG>  Configuration file
  -v, --verbose...       Increase logging verbosity
  -q, --quiet...         Decrease logging verbosity
  -h, --help             Print help

Configuration File

Operations defined in the configuration file are applied in order of definition.

Patching Pen

Setting values of specific fields for a given pen:

Ops: 
  - !PatchPen
    Pen: 0                  # Target pen
    # Specify one or more of the following:
    # Color: [127, 127, 127]
    # Enabled: true
    # LoopCount: 3
    # Speed: 1.234
    # Power: 10.5
    # Frequency: 10000

Cloning pen(s) (and optionally override settings):

Ops: 
  - !ClonePen
    From: 0
    To: 1
    # Specify one or more of the following:
    # Inclusive: true
    # Color: [64, 64, 64]
    # Enabled: true
    # LoopCount: 3
    # Speed: 1.234
    # Power: 10.5
    # Frequency: 10000

Incrementing a specific field by some value across a sequence of pens:

Ops: 
  - !PatternPen
    From: 1
    To: 5
    # Specify one of the following:
    # Field: !Loops 1
    # Field: !Speed 100.0
    # Field: !Power 10.0
    # Field: !Frequency 1000

Importing and Exporting Pens and Objects

Exporting a pen to a file:

Ops:
  - !ExportPen
    Index: 0
    Path: "exported_pen.bin"

Importing a pen from a file:

Ops:
  - !ImportPen
    Index: 0
    Path: "exported_pen.bin"

Exporting an object to a file:

Ops:
  - !ExportObject
    Layer: 0
    Object: 0
    Path: "exported_object.bin"

Importing an object from a file:

Ops:
  - !ImportObject
    Layer: 0
    Object: 3 # Optional, will replace specified object instead
    Path: "exported_object.bin"

Deleting and Generating Objects

Deleting all objects from a layer:

Ops:
  - !DeleteObjects
    Layer: 0
    Object: 3 # Optional, will delete specific object instead

Generating a grid of hatched rectangles with incrementing pens:

Ops:
  - !HatchArray
    Layer: 0
    Width: 10.0
    Height: 10.0
    Columns: 3
    Rows: 5
    Spacing: 0.5
    Z: 0.0
    StartingPen: 0
    Hatch:
      LineSpacing: 0.01
      # The following are optional parameters:
      # Count: 2
      # EdgeOffset: 0.0
      # StartOffset: 0.0
      # EndOffset: 0.0
      # Angle: 0.0
      # RotateAngle: 0.0
      # LineRedution: 0.0
      # LoopDistance: 0.0
      # LoopCount: 0
      # Pattern: !Bidirectional
      # FollowEdgeOnce: true
      # CrossHatch: true

Available patterns are:

  1. Directional
  2. Bidirectional
  3. Ring
  4. Continuous
  5. Gong
  6. Background (not supported)
  7. Fill
  8. Zigzag