Shipbuilding production profile nesting tool. It reads the formats the yard actually produces, nests profiles onto stock bars, and writes machine output.
Supported inputs:
- pre-nested production TXT (
parser) - Cadmatic profile-report DXF (
conv 10022) - AVEVA "Profile sketch & list" CSV + LST (
conv 10510) - AVEVA marine GEN (
conv 10510gen)
Outputs are MGF for the IMG cutting machine, nested TXT, bar/nesting reports, an Excel workbook, and the remnant CSV.
go build -o moses ./cmd/moses
# or
make buildVersion, commit and build time are injected with -ldflags.
moses parser [--in DIR] [--out DIR] [--dont-rename]
moses conv 10022 --in DIR --out DIR
moses conv 10510 --in DIR --out DIR --project PROJECT
moses conv 10510gen --in DIR --out DIR --project PROJECT
moses version
Global flag: --config FILE (default config.yaml). Converter flags:
--remnants FILE (default: remnants.file from config) and --algorithm NAME
(best-fit-decreasing by default; knapsack is also available).
moses parser writes out/<project>/<section>/<nest>.mgf and
<nest>_strightcut.txt, and prefixes consumed input files with _ unless
--dont-rename is set.
Converters write, under --out:
txt/<project>-<section>_<DIM>_<QUALITY>.txt
<project>-<section>_bar.txt
<project>-<section>_nst.txt
<project>-<section>.xlsx
conv 10022 does not write Excel. Remnants are read from and written to
remnants.csv in the working directory unless overridden.
Moses uses a versioned YAML configuration. version: 2 is required; unknown
fields are rejected. Values are merged over embedded geometry defaults, so a
site config only needs its spacing/stock overrides.
version: 2
defaults:
stockLength: 12000
endcutSpacing: 5
remnants:
enabled: true
minLength: 1100
file: remnants.csv
families:
hp:
prefixes: [rp, pp]
stockLength: 12000
endcutSpacing: 5
endcuts:
"21":
profiles:
rp160x8: 8
fb:
prefixes: [fb]
ae:
prefixes: [ae]
stockLength: 11200Resolution is explicit and fails loudly:
- spacing: profile → endcut default → family default →
defaults.endcutSpacing - stock length: profile → family →
defaults.stockLength - geometry:
profiles.<type>; FB is derived from the type
A complete example is in config.example.yaml.
Benchmarks and profiling notes are in docs/PERFORMANCE.md.
make test # go test ./...
make test-race # go test -race -shuffle=on -count=1 ./...
make bench # pipeline benchmarks
make lint # go vet + golangci-lint
make lint-fix # golangci-lint --fix
make lint-config # validate .golangci.yml
make format # gofmt -w
make format-check # fail if sources are not formatted
make mod-check # fail if go.mod/go.sum are not tidy
make verify # format, mod, lint and race tests
make help # list targetsCI runs the same gates from .github/workflows/: tests and build in
test.yml, golangci-lint in lint.yml, and govulncheck in security.yml.
testdata/ contains real TXT/GEN samples and oracle MGF output. Checked-in
configuration fixtures for the pipeline tests live under
internal/config/testdata/v2.