<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RoomPlan",
  "identifier" : "/documentation/RoomPlan/CapturedRoom/ModelProvider",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RoomPlan"
    ],
    "preciseIdentifier" : "s:8RoomPlan08CapturedA0V13ModelProviderV"
  },
  "title" : "CapturedRoom.ModelProvider"
}
-->

# CapturedRoom.ModelProvider

A structure that assigns detailed 3D models to captured objects for an export.

```
struct ModelProvider
```

## Overview

This structure provides a way for your app to assign detailed shape to specific areas within a captured room.

RoomPlan approximates the size and shape of objects it observes in a scan by using bounding boxes. In iOS 17 and later, the framework categorizes those objects that it recognizes by tagging them with specific attributes ([Captured Object Attributes](/documentation/RoomPlan/captured-object-attributes)).

`ModelProvider` enables your app to export the categorized objects with unique 3D models. For example, you can assign a specific 3D model to a combination of attributes, such as all `.stool` objects with a `.star` base.

## Topics

### Creating a model provider

[`init()`](/documentation/RoomPlan/CapturedRoom/ModelProvider/init())

Creates a model provider.

### Managing models

[`var modelFileURLs: [URL]`](/documentation/RoomPlan/CapturedRoom/ModelProvider/modelFileURLs)

An array of URLs to 3D models for all categories and attributes.

[`func modelFileURL(for: CapturedRoom.Object.Category) throws -> URL?`](/documentation/RoomPlan/CapturedRoom/ModelProvider/modelFileURL(for:)-9irqx)

Provides a URL to the 3D model for the given category.

[`func modelFileURL(for: CapturedRoom.Object) throws -> URL?`](/documentation/RoomPlan/CapturedRoom/ModelProvider/modelFileURL(for:)-96rvb)

Provides a URL to a 3D model based on the given object’s attributes or category.

[`func modelFileURL(for: [any CapturedRoomAttribute]) throws -> URL?`](/documentation/RoomPlan/CapturedRoom/ModelProvider/modelFileURL(for:)-58ykp)

Provides a URL to the 3D model for the given attributes.

[`func setModelFileURL(URL?, for: [any CapturedRoomAttribute]) throws`](/documentation/RoomPlan/CapturedRoom/ModelProvider/setModelFileURL(_:for:)-8xio)

Associates a URL to the given attributes.

[`func setModelFileURL(URL?, for: CapturedRoom.Object.Category) throws`](/documentation/RoomPlan/CapturedRoom/ModelProvider/setModelFileURL(_:for:)-4law9)

Associates a URL to the given object category.

### Handling errors

[`enum Error`](/documentation/RoomPlan/CapturedRoom/ModelProvider/Error)

Errors that can occur when managing 3D model association with categories and attributes.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)