# nyc.noirot.cad.defs

> Published by [franknoirot.co](https://lexicon.garden/identity/did:plc:5dwcnpy3p6afki4rwv7gqegd)

✓ This is the authoritative definition for this NSID.

## Description

Shared definitions for CAD project records in the noirot.nyc prototype namespace.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:5dwcnpy3p6afki4rwv7gqegd/nyc.noirot.cad.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:5dwcnpy3p6afki4rwv7gqegd/nyc.noirot.cad.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:5dwcnpy3p6afki4rwv7gqegd/nyc.noirot.cad.defs/examples)

## Definitions

### `nyc.noirot.cad.defs#tag`

**Type**: `object`

A short user-supplied project tag.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `value` | `string` | Yes |  |

### `nyc.noirot.cad.defs#license`

**Type**: `object`

License metadata for project files.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `url` | `string` (uri) | No |  |
| `name` | `string` | No |  |
| `spdxId` | `string` | No | SPDX license identifier, when applicable. |

### `nyc.noirot.cad.defs#point3d`

**Type**: `object`

A point in three-dimensional model space.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `x` | `ref` → `#quantity` | No |  |
| `y` | `ref` → `#quantity` | No |  |
| `z` | `ref` → `#quantity` | No |  |

### `nyc.noirot.cad.defs#quantity`

**Type**: `object`

Decimal quantity encoded as a string because atproto records do not use floating point numbers.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `unit` | `string` | Yes |  |
| `value` | `string` | Yes | Decimal value without the unit. |

### `nyc.noirot.cad.defs#projectRef`

**Type**: `object`

A versioned reference to a CAD project or release record.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes | CID of the referenced project or release record version. |
| `uri` | `string` (at-uri) | Yes | AT URI of the referenced project or release record. |

### `nyc.noirot.cad.defs#sourceFile`

**Type**: `object`

One file or artifact associated with a CAD project.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | No | CID for this file, if content-addressed. |
| `name` | `string` | No | Display filename, if different from the path basename. |
| `path` | `string` | Yes | Path within a project archive or source tree. |
| `role` | `string` | No | Role this file plays in the CAD project. |
| `sha256` | `string` | No | Lowercase hex SHA-256 digest of the file bytes. |
| `mimeType` | `string` | No |  |
| `createdAt` | `string` (datetime) | No | Source creation time, if known. |
| `sizeBytes` | `integer` | No | Size of this file in bytes. |

### `nyc.noirot.cad.defs#boundingBox`

**Type**: `object`

Axis-aligned bounding box dimensions for a CAD model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `xLength` | `ref` → `#quantity` | No |  |
| `yLength` | `ref` → `#quantity` | No |  |
| `zLength` | `ref` → `#quantity` | No |  |

### `nyc.noirot.cad.defs#fileManifest`

**Type**: `object`

Manifest of files associated with a project or release.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `files` | `array` | Yes |  |
| `archiveCid` | `string` (cid) | No | CID of the complete project archive, if available. |
| `rootSha256` | `string` | No | Lowercase hex SHA-256 digest representing the normalized manifest. |
| `generatedAt` | `string` (datetime) | No |  |

### `nyc.noirot.cad.defs#zooProjectRef`

**Type**: `object`

Reference to a project managed by the Zoo API.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | Zoo project identifier. |
| `shareUrl` | `string` (uri) | No | Share-link URL for the project, when available. |
| `publicUrl` | `string` (uri) | No | Public Zoo URL for the project, when available. |
| `visibility` | `string` | No | Zoo visibility or publication state when mirrored. |
| `thumbnailUrl` | `string` (uri) | No | Zoo-hosted thumbnail URL, when available. |

### `nyc.noirot.cad.defs#analysisFinding`

**Type**: `object`

A derived analysis finding that is not itself a moderation label.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `kind` | `string` | Yes |  |
| `name` | `string` | Yes |  |
| `summary` | `string` | No |  |
| `severity` | `string` | No |  |

### `nyc.noirot.cad.defs#geometryMetrics`

**Type**: `object`

Derived geometry and physical metrics for a CAD model.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `mass` | `ref` → `#quantity` | No |  |
| `volume` | `ref` → `#quantity` | No |  |
| `density` | `ref` → `#quantity` | No |  |
| `boundingBox` | `ref` → `#boundingBox` | No |  |
| `surfaceArea` | `ref` → `#quantity` | No |  |
| `centerOfMass` | `ref` → `#point3d` | No |  |

### `nyc.noirot.cad.defs#moderationContext`

**Type**: `object`

Author-supplied moderation hints. Labeler decisions should still be published as labels.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `selfLabels` | `array` | No |  |

## Raw Schema

```json
{
  "id": "nyc.noirot.cad.defs",
  "defs": {
    "tag": {
      "type": "object",
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "type": "string",
          "maxLength": 320,
          "maxGraphemes": 32
        }
      },
      "description": "A short user-supplied project tag."
    },
    "license": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "name": {
          "type": "string",
          "maxLength": 1024,
          "maxGraphemes": 128
        },
        "spdxId": {
          "type": "string",
          "maxLength": 128,
          "description": "SPDX license identifier, when applicable."
        }
      },
      "description": "License metadata for project files."
    },
    "point3d": {
      "type": "object",
      "properties": {
        "x": {
          "ref": "#quantity",
          "type": "ref"
        },
        "y": {
          "ref": "#quantity",
          "type": "ref"
        },
        "z": {
          "ref": "#quantity",
          "type": "ref"
        }
      },
      "description": "A point in three-dimensional model space."
    },
    "quantity": {
      "type": "object",
      "required": [
        "value",
        "unit"
      ],
      "properties": {
        "unit": {
          "type": "string",
          "maxLength": 32,
          "knownValues": [
            "g",
            "kg",
            "mm",
            "cm",
            "m",
            "mm2",
            "cm2",
            "m2",
            "mm3",
            "cm3",
            "m3"
          ]
        },
        "value": {
          "type": "string",
          "maxLength": 64,
          "description": "Decimal value without the unit."
        }
      },
      "description": "Decimal quantity encoded as a string because atproto records do not use floating point numbers."
    },
    "projectRef": {
      "type": "object",
      "required": [
        "uri",
        "cid"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "CID of the referenced project or release record version."
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT URI of the referenced project or release record."
        }
      },
      "description": "A versioned reference to a CAD project or release record."
    },
    "sourceFile": {
      "type": "object",
      "required": [
        "path"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "CID for this file, if content-addressed."
        },
        "name": {
          "type": "string",
          "maxLength": 2048,
          "description": "Display filename, if different from the path basename.",
          "maxGraphemes": 256
        },
        "path": {
          "type": "string",
          "maxLength": 2048,
          "description": "Path within a project archive or source tree."
        },
        "role": {
          "type": "string",
          "maxLength": 64,
          "description": "Role this file plays in the CAD project.",
          "knownValues": [
            "source",
            "archive",
            "thumbnail",
            "preview",
            "derived",
            "metadata"
          ]
        },
        "sha256": {
          "type": "string",
          "maxLength": 64,
          "minLength": 64,
          "description": "Lowercase hex SHA-256 digest of the file bytes."
        },
        "mimeType": {
          "type": "string",
          "maxLength": 256
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "Source creation time, if known."
        },
        "sizeBytes": {
          "type": "integer",
          "minimum": 0,
          "description": "Size of this file in bytes."
        }
      },
      "description": "One file or artifact associated with a CAD project."
    },
    "boundingBox": {
      "type": "object",
      "properties": {
        "xLength": {
          "ref": "#quantity",
          "type": "ref"
        },
        "yLength": {
          "ref": "#quantity",
          "type": "ref"
        },
        "zLength": {
          "ref": "#quantity",
          "type": "ref"
        }
      },
      "description": "Axis-aligned bounding box dimensions for a CAD model."
    },
    "fileManifest": {
      "type": "object",
      "required": [
        "files"
      ],
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "ref": "#sourceFile",
            "type": "ref"
          },
          "maxLength": 512
        },
        "archiveCid": {
          "type": "string",
          "format": "cid",
          "description": "CID of the complete project archive, if available."
        },
        "rootSha256": {
          "type": "string",
          "maxLength": 64,
          "minLength": 64,
          "description": "Lowercase hex SHA-256 digest representing the normalized manifest."
        },
        "generatedAt": {
          "type": "string",
          "format": "datetime"
        }
      },
      "description": "Manifest of files associated with a project or release."
    },
    "zooProjectRef": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "maxLength": 256,
          "description": "Zoo project identifier."
        },
        "shareUrl": {
          "type": "string",
          "format": "uri",
          "description": "Share-link URL for the project, when available."
        },
        "publicUrl": {
          "type": "string",
          "format": "uri",
          "description": "Public Zoo URL for the project, when available."
        },
        "visibility": {
          "type": "string",
          "maxLength": 64,
          "description": "Zoo visibility or publication state when mirrored.",
          "knownValues": [
            "private",
            "draft",
            "published",
            "unlisted"
          ]
        },
        "thumbnailUrl": {
          "type": "string",
          "format": "uri",
          "description": "Zoo-hosted thumbnail URL, when available."
        }
      },
      "description": "Reference to a project managed by the Zoo API."
    },
    "analysisFinding": {
      "type": "object",
      "required": [
        "kind",
        "name"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "maxLength": 64,
          "knownValues": [
            "geometry",
            "archive",
            "metadata",
            "render",
            "security"
          ]
        },
        "name": {
          "type": "string",
          "maxLength": 1024,
          "maxGraphemes": 128
        },
        "summary": {
          "type": "string",
          "maxLength": 4096,
          "maxGraphemes": 512
        },
        "severity": {
          "type": "string",
          "maxLength": 64,
          "knownValues": [
            "info",
            "warning",
            "error"
          ]
        }
      },
      "description": "A derived analysis finding that is not itself a moderation label."
    },
    "geometryMetrics": {
      "type": "object",
      "properties": {
        "mass": {
          "ref": "#quantity",
          "type": "ref"
        },
        "volume": {
          "ref": "#quantity",
          "type": "ref"
        },
        "density": {
          "ref": "#quantity",
          "type": "ref"
        },
        "boundingBox": {
          "ref": "#boundingBox",
          "type": "ref"
        },
        "surfaceArea": {
          "ref": "#quantity",
          "type": "ref"
        },
        "centerOfMass": {
          "ref": "#point3d",
          "type": "ref"
        }
      },
      "description": "Derived geometry and physical metrics for a CAD model."
    },
    "moderationContext": {
      "type": "object",
      "properties": {
        "selfLabels": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 128,
            "knownValues": [
              "weapon",
              "regulated-part",
              "unsafe-manufacture",
              "ip-risk",
              "malware-archive",
              "spam",
              "needs-review"
            ]
          },
          "maxLength": 16
        }
      },
      "description": "Author-supplied moderation hints. Labeler decisions should still be published as labels."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "Shared definitions for CAD project records in the noirot.nyc prototype namespace."
}
```
