{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bitbybit-dev/json-schema/bitbybit-dev-step-to-gltf-with-draco-body-schema.json",
  "title": "StepToGltfWithDracoBody",
  "description": "Convert a STEP file to Draco-compressed glTF with default settings. Upload the STEP file first, then pass its ID here.",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bitbybit-dev-openapi.json#/components/schemas/StepToGltfWithDracoBody",
  "type": "object",
  "properties": {
    "stepFileId": {
      "type": "string",
      "minLength": 1,
      "description": "ID of the previously uploaded STEP file (returned by the file upload endpoint)"
    },
    "meshPrecision": {
      "description": "Mesh linear deflection. When meshRelative is true (default), this is a fraction of each edge's length (e.g. 0.005 = 0.5%). When false, it is an absolute value in model units (mm for STEP).",
      "$ref": "#/$defs/MeshPrecision"
    },
    "meshAngle": {
      "description": "Angular deflection in radians for mesh tessellation - controls curvature approximation. Smaller values produce smoother curved surfaces.",
      "$ref": "#/$defs/MeshAngle"
    },
    "meshRelative": {
      "description": "Use size-aware relative deflection per face. When true, meshPrecision is a fraction of each edge's length. Set to false for absolute deflection in model units.",
      "type": "boolean"
    },
    "internalVerticesMode": {
      "description": "Add interior vertices for better curved face fidelity (slower, set false for speed).",
      "type": "boolean"
    },
    "controlSurfaceDeflection": {
      "description": "Extra post-pass refining triangles that bulge beyond the deflection (slower, set false for speed).",
      "type": "boolean"
    },
    "draco": {
      "description": "Draco compression options. If omitted, sensible defaults are used (level 7, 14/10/12/8/12 bits).",
      "$ref": "#/$defs/DracoCompressionOptions"
    }
  },
  "required": [
    "stepFileId"
  ],
  "additionalProperties": false,
  "$defs": {
    "DracoCompressionOptions": {
      "type": "object",
      "properties": {
        "useDraco": {
          "description": "Apply Draco geometry compression to the glTF output. Defaults to true for the *-with-draco endpoints.",
          "type": "boolean"
        },
        "dracoCompressionLevel": {
          "description": "Draco compression level (0 = fastest/largest, 10 = slowest/smallest). Typical good default is 7.",
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        },
        "dracoQuantizePositionBits": {
          "description": "Quantization bits for vertex positions (higher = more precise, larger file). Typical: 14.",
          "type": "integer",
          "minimum": 0,
          "maximum": 31
        },
        "dracoQuantizeNormalBits": {
          "description": "Quantization bits for normal vectors. Typical: 10.",
          "type": "integer",
          "minimum": 0,
          "maximum": 31
        },
        "dracoQuantizeTexcoordBits": {
          "description": "Quantization bits for texture coordinates. Typical: 12.",
          "type": "integer",
          "minimum": 0,
          "maximum": 31
        },
        "dracoQuantizeColorBits": {
          "description": "Quantization bits for vertex colors. Typical: 8.",
          "type": "integer",
          "minimum": 0,
          "maximum": 31
        },
        "dracoQuantizeGenericBits": {
          "description": "Quantization bits for generic vertex attributes. Typical: 12.",
          "type": "integer",
          "minimum": 0,
          "maximum": 31
        },
        "dracoUnifiedQuantization": {
          "description": "Use unified quantization across all meshes (better when meshes share a coordinate frame).",
          "type": "boolean"
        }
      },
      "additionalProperties": false,
      "description": "Draco geometry compression options applied during glTF export."
    },
    "MeshAngle": {
      "type": "number",
      "minimum": 0.01,
      "maximum": 3.141592653589793,
      "description": "Mesh angular deflection in radians. Range: [0.01, π]"
    },
    "MeshPrecision": {
      "type": "number",
      "minimum": 0.0001,
      "maximum": 10,
      "description": "Mesh tessellation precision (lower = finer). Range: [0.0001, 10]"
    }
  }
}