# Class T8Product<TEntityType, TUnit>

Represents a building product (element) in the T8 Client Model. Products represent physical or logical building components (walls, doors, spaces, etc.).

#### Example

    const model = readT8ClientModel(buffer);
    const wall = model.products.find(p => p.className === 'IfcWall');
    console.log(`Wall: ${wall.name}`);
    console.log(`Type: ${wall.className}`);
    console.log(`Properties:`, wall.propertySets);
    console.log(`Contains ${wall.contains.length} elements`);

#### Type Parameters

- TEntityType = T8EntityType

  The entity type (default: T8EntityType)

- TUnit = T8Unit

  The unit type (default: T8Unit)

#### Hierarchy (View Summary)

- T8Product
  - T8ProductWithGeometry

##### Index

### Constructors

constructor

### Properties

aggregates
className
computedPropertySets
contains
data
definedByType?
description
facility
facilityPart
globalId
localId
name
parent
propertySets
quantities
site
tag?

### Accessors

children
class
hasGeometry
hasStructuredRelationships
meshes
polylines
quantitySets
type

### Methods

connect
create

## Constructors

### constructor

- new T8Product<TEntityType = T8EntityType<T8Unit>, TUnit = T8Unit>(
  localId: number,
  globalId: string,
  className: string,
  data: Record<string, boolean | number | string>,
  propertySets?: Record<string, T8PropertySet<TUnit>>,
  computedPropertySets?: Record<string, T8PropertySet<TUnit>>,
  quantities?: Record<string, T8QuantitySet<TUnit>>,
  name?: string,
  description?: string,
  tag?: string,
  ): T8Product<TEntityType, TUnit>

  #### Type Parameters

  - TEntityType = T8EntityType<T8Unit>
  - TUnit = T8Unit

  #### Parameters

  - localId: number

    Local numerical identifier within the model

  - globalId: string

    Global unique identifier (GUID)

  - className: string

    Class name (e.g., 'IfcWall', 'IfcDoor')

  - data: Record<string, boolean | number | string>

    Custom data values attached to this product

  - `Optional` propertySets: Record<string, T8PropertySet<TUnit>>

    Property sets (e.g., Pset_WallCommon)

  - `Optional` computedPropertySets: Record<string, T8PropertySet<TUnit>>

    Computed property sets (e.g., Pset_Twinfinity_Aggregates)

  - `Optional` quantities: Record<string, T8QuantitySet<TUnit>>

    Quantity sets (e.g., Qto_WallBaseQuantities)

  - `Optional` name: string

    Optional name of the product

  - `Optional` description: string

    Optional description of the product

  - `Optional` tag: string

    Optional tag identifier

  #### Returns T8Product<TEntityType, TUnit>

## Properties

### `Readonly` aggregates

aggregates: readonly T8Product<TEntityType, TUnit>[]

Products that are aggregated by this product

### className

className: string

Class name (e.g., 'IfcWall', 'IfcDoor')

### computedPropertySets

computedPropertySets: Record<string, T8PropertySet<TUnit>>

Computed property sets (e.g., Pset_Twinfinity_Aggregates)

### `Readonly` contains

contains: readonly T8Product<TEntityType, TUnit>[]

Products that are contained within this product (spatial containment)

### data

data: Record<string, boolean | number | string>

Custom data values attached to this product

### `Optional` definedByType

definedByType?: TEntityType

The entity type (class) this product is an instance of

### description

description: undefined | string

Optional description of the product

### facility

facility: undefined | T8Product<TEntityType, TUnit>

### facilityPart

facilityPart: undefined | T8Product<TEntityType, TUnit>

### globalId

globalId: string

Global unique identifier (GUID)

### localId

localId: number

Local numerical identifier within the model

### name

name: undefined | string

Optional name of the product

### parent

parent: undefined | T8Product<TEntityType, TUnit>

### propertySets

propertySets: Record<string, T8PropertySet<TUnit>>

Property sets (e.g., Pset_WallCommon)

### quantities

quantities: Record<string, T8QuantitySet<TUnit>>

Quantity sets (e.g., Qto_WallBaseQuantities)

### site

site: undefined | T8Product<TEntityType, TUnit>

### `Optional` tag

tag?: string

Optional tag identifier

## Accessors

### children

- get children(): Iterable<T8Product<TEntityType, TUnit>>

  #### Returns Iterable<T8Product<TEntityType, TUnit>>

### class

- get class(): ModelProductClass

  #### Returns ModelProductClass

### hasGeometry

- get hasGeometry(): boolean

  #### Returns boolean

### hasStructuredRelationships

- get hasStructuredRelationships(): boolean

  #### Returns boolean

### meshes

- get meshes(): readonly ModelMesh[]

  #### Returns readonly ModelMesh[]

### polylines

- get polylines(): readonly ModelPolyline[]

  #### Returns readonly ModelPolyline[]

### quantitySets

- get quantitySets(): Record<string, T8QuantitySet<TUnit>>

  #### Returns Record<string, T8QuantitySet<TUnit>>

### type

- get type(): undefined | TEntityType

  #### Returns undefined | TEntityType

## Methods

### `Static` connect

- connect<TEntityType, TUnit>(
  dto: T8ClientProductConnectionsDTO<
  T8Product<TEntityType, TUnit>,
  TEntityType,
  >,
  product: T8Product<TEntityType, TUnit>,
  ): void

  #### Type Parameters

  - TEntityType
  - TUnit

  #### Parameters

  - dto: T8ClientProductConnectionsDTO<T8Product<TEntityType, TUnit>, TEntityType>
  - product: T8Product<TEntityType, TUnit>

  #### Returns void

### `Static` create

- create<TEntityType, TUnit>(
  dto: T8ClientProductDTO<TUnit>,
  ): T8Product<TEntityType, TUnit>

  #### Type Parameters

  - TEntityType
  - TUnit

  #### Parameters

  - dto: T8ClientProductDTO<TUnit>

  #### Returns T8Product<TEntityType, TUnit>