Compiler-like pipeline to parse Desmos 3D JSON, classify expressions, generate geometry, and export USDZ.
- Phase 1 audit/classification pipeline in Python (in progress)
- Swift USDZ exporter scaffold created (implementation follows after Python bridge export)
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -e ".[dev]"python3 -m pytest -qpython3 -m desmos3d_pipeline.cli audit --input JSONreference.json --out artifacts/auditUse --input-glob twice so pathlib matches both JSON*.json and names that start with a literal [4B] (square brackets must be escaped as [[] / []] in the pattern).
python3 -m desmos3d_pipeline.cli audit --input-glob "JSON*.json" --input-glob '[[]4B[]]*.json' --out artifacts/auditReports are written to artifacts/audit:
*.audit.json(per-input audit reports)batch_summary.json(aggregate summary across all processed files)
PYTHONPATH=src python3 -m desmos3d_pipeline.cli export-bridge --input-glob "JSON*.json" --input-glob '[[]4B[]]*.json' --out artifacts/bridgeSome curriculum graphs only expose a hidden reference plane (e.g. z=0 with a small domain). By default those are skipped so construction geometry stays out of USDZ; add --include-hidden on export-bridge (and the same flag on coverage) to mesh them anyway.
This writes:
artifacts/bridge/<file>/meshes/*.objartifacts/bridge/<file>/manifest.jsonartifacts/bridge/bridge_summary.json
cd swift-usdz-exporter
swift build
swift run usdz-exporter --manifest ../artifacts/bridge/JSONLondon/manifest.json --output ../artifacts/usdz/JSONLondon.usdzFor another file, swap JSONLondon with JSONreference, JSONCali, or JSONAkashi.
Rolls up ExpressionFamily × ClassificationStatus for every non-hidden expression that is not SUPPORTED (same globs as audit):
PYTHONPATH=src python3 -m desmos3d_pipeline.cli family-inventory \
--input-glob "JSON*.json" --input-glob '[[]4B[]]*.json' \
--out artifacts/family_inventory/unsupported_families.jsonOutput: artifacts/family_inventory/unsupported_families.json (by_family_and_status, non_supported_by_family, non_supported_by_status).
This generates fingerprint-grouped reports of expressions that are not currently meshed (plus a small markdown summary per file):
cd /Users/careylai/Desktop/python-swift-usdz && PYTHONPATH=src python3 -m desmos3d_pipeline.cli coverage --input-glob "JSON*.json" --input-glob '[[]4B[]]*.json' --out artifacts/coverageOutputs:
artifacts/coverage/<file>.coverage.jsonartifacts/coverage/<file>.coverage.mdartifacts/coverage/coverage_summary.json
Includes JSON*.json samples and [[]4B[]]*.json curriculum files (see §4 for why the bracket pattern is written that way).
cd /Users/careylai/Desktop/python-swift-usdz && \
PYTHONPATH=src python3 -m pytest -q && \
PYTHONPATH=src python3 -m desmos3d_pipeline.cli audit \
--input-glob "JSON*.json" --input-glob '[[]4B[]]*.json' --out artifacts/audit && \
PYTHONPATH=src python3 -m desmos3d_pipeline.cli family-inventory \
--input-glob "JSON*.json" --input-glob '[[]4B[]]*.json' --out artifacts/family_inventory/unsupported_families.json && \
PYTHONPATH=src python3 -m desmos3d_pipeline.cli export-bridge \
--input-glob "JSON*.json" --input-glob '[[]4B[]]*.json' --out artifacts/bridge && \
cd swift-usdz-exporter && \
mkdir -p ../artifacts/usdz && \
for manifest in ../artifacts/bridge/*/manifest.json; do \
name="$(basename "$(dirname "$manifest")")"; \
swift run usdz-exporter --manifest "$manifest" --output "../artifacts/usdz/${name}.usdz"; \
done && \
cd .. && \
PYTHONPATH=src python3 -m desmos3d_pipeline.cli coverage \
--input-glob "JSON*.json" --input-glob '[[]4B[]]*.json' --out artifacts/coverage