CAD Translation Pipeline

Process various CAD formats (Inventor, Fusion, STEP, IGES) for web viewing.

Workflow Overview

CAD Sources
Inventor IAM/IPT
Fusion 360
STEP/STP
IGES/IGS
SolidWorks
RAPS Upload
raps object upload
APS Storage
OSS Bucket
Model Derivative
Translation Engine
Outputs
SVF2 Viewable
Thumbnails
Metadata
InputUploadStorageTranslateOutput

CLI Approach

Step 1: Create CAD Bucket

raps bucket create --key cad-library --policy persistent --region US

Step 2: Upload CAD Files

# Inventor assembly
raps object upload cad-library assembly.iam

# Inventor part
raps object upload cad-library part.ipt

# STEP file
raps object upload cad-library model.stp

# IGES file
raps object upload cad-library legacy.igs

Step 3: Translate to SVF2

# Get URN and translate
URN=$(raps object urn cad-library assembly.iam --output plain)
raps translate start "$URN" --format svf2 --wait

Step 4: Verify Translation

# Check manifest
raps translate manifest "$URN"

# Get available views
raps derivative views "$URN" --output json

Supported Formats

FormatExtensionNotes
Inventor Assembly.iamFull assembly hierarchy
Inventor Part.iptSingle part files
STEP.stp, .stepAP203/AP214
IGES.igs, .igesLegacy format
SolidWorks.sldprt, .sldasmParts and assemblies
Fusion 360.f3dDirect from Fusion

CI/CD Pipeline

# .github/workflows/cad-translation.yml
name: CAD Translation Pipeline

on:
  push:
    paths:
      - 'cad/**/*.iam'
      - 'cad/**/*.ipt'
      - 'cad/**/*.stp'
      - 'cad/**/*.igs'

env:
  BUCKET: cad-library-${{ github.repository_id }}

jobs:
  translate-cad:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install RAPS
        run: cargo install raps

      - name: Setup bucket
        env:
          APS_CLIENT_ID: ${{ secrets.APS_CLIENT_ID }}
          APS_CLIENT_SECRET: ${{ secrets.APS_CLIENT_SECRET }}
        run: |
          raps bucket create --key "$BUCKET" --policy persistent --region US 2>/dev/null || true

      - name: Upload and translate
        env:
          APS_CLIENT_ID: ${{ secrets.APS_CLIENT_ID }}
          APS_CLIENT_SECRET: ${{ secrets.APS_CLIENT_SECRET }}
        run: |
          for file in $(git diff --name-only HEAD~1 HEAD -- 'cad/**'); do
            [ -f "$file" ] || continue

            echo "Processing: $file"
            raps object upload "$BUCKET" "$file"

            key=$(basename "$file")
            URN=$(raps object urn "$BUCKET" "$key" --output plain)
            raps translate start "$URN" --format svf2 --wait

            echo "Translated: $key"
          done

      - name: Generate translation report
        env:
          APS_CLIENT_ID: ${{ secrets.APS_CLIENT_ID }}
          APS_CLIENT_SECRET: ${{ secrets.APS_CLIENT_SECRET }}
        run: |
          echo "# CAD Translation Report" > report.md
          echo "Date: $(date)" >> report.md
          echo "" >> report.md

          raps object list "$BUCKET" --output json | jq -r '.[].key' | while read key; do
            URN=$(raps object urn "$BUCKET" "$key" --output plain)
            STATUS=$(raps translate manifest "$URN" 2>/dev/null | jq -r '.status // "pending"')
            echo "- $key: $STATUS" >> report.md
          done

      - name: Upload report
        uses: actions/upload-artifact@v4
        with:
          name: translation-report
          path: report.md

Pipeline Flow

Git Push
CAD files changed
Processing
Upload to OSS
Start Translation
Wait for Complete
Output
translation-report.md

MCP Integration

Translate Single File

User: "Upload and translate the new assembly.iam file for web viewing"
User
AI Assistant
RAPS MCP
APS Cloud
User
Translate assembly.iam
AI
aps_object_upload(bucket, file)
MCP
Upload file
APS
Upload complete
AI
aps_object_urn(bucket, key)
MCP
URN
AI
aps_translate_start(urn, format=“svf2”)
MCP
Start translation
loop: Wait for completion
AI
aps_translate_manifest(urn)
MCP
Check status
AI
Translation complete

AI Response:

assembly.iam has been uploaded and translated successfully.

Translate Multiple Formats

User: "I have STEP and IGES files from a supplier. Translate them all for review."

AI Response:

Translating 5 files from supplier folder:

FileFormatStatusTime
bracket.stpSTEPComplete45s
housing.stpSTEPComplete1m 12s
shaft.igsIGESComplete32s
gear.igsIGESComplete28s
mount.stpSTEPComplete55s

All files ready for viewing.


Format-Specific Options

STEP Translation

# Standard STEP translation
raps translate start "$URN" --format svf2 --wait

# With specific output views
raps translate start "$URN" --format svf2 --views "3d"

Inventor Assembly with References

# Upload assembly with all referenced parts
raps object upload cad-library assembly.iam
raps object upload cad-library part1.ipt
raps object upload cad-library part2.ipt

# Translate assembly (references resolved automatically)
URN=$(raps object urn cad-library assembly.iam --output plain)
raps translate start "$URN" --format svf2 --wait

ZIP Package with Root File

# Create zip with assembly and parts
zip -r model-package.zip assembly.iam *.ipt

# Upload package
raps object upload cad-library model-package.zip

# Translate with root file specified
URN=$(raps object urn cad-library model-package.zip --output plain)
raps translate start "$URN" --format svf2 --root "assembly.iam" --wait