Class: TrackCollinear

BIM.Relation. TrackCollinear

A relationship where the position of the host virtual junction tracks another junction in a different path if it remains on a given path segment.

This relationship is stored by both the virtual junction and the tracked junction so that it can update the virtual junction when its position changes.

                  Space 1
         +-----------------------+
         |                       |
         |                       |
         |                       |
         |         +-------------x <-- linkedJunction
         |         | +-----------o--------+
         |         | |           ^        |
         |         | |        virtual     |
         +---------x o <--   Junctions    |
                  /  |                    |
   linkedJunction    +--------------------+
                            Space 2

new TrackCollinear(element, hostJunction, linkedJunction)

Creates a new relationship between a virtual junction and the junction that it tracks along a path segment.

Parameters:
Name Type Description
element BIM.Element

The element whose path contains the virtual junction.

hostJunction BIM.Junction

The host virtual junction that is tracking the given junction.

linkedJunction BIM.Junction

The junction being tracked by the virtual junction.

Author:
  • drajmarsh
Throws:

Throws an error if either junction is not a valid junction.

Type
Error

Extends

Members


:BIM.Element

hostElement

The element hosting the items in the relationship.

Type
Inherited From:
Overrides:

:BIM.Junction

hostJunction

The host virtual junction that is tracking the other junction.

Type

:boolean

isActive

Whether or not the relationship is active.

Type
  • boolean
Inherited From:
Overrides:

:boolean

isRelation <readonly>

A flag identifying this object as a relationship.

Type
  • boolean
Inherited From:
Overrides:

:BIM.Junction

linkedJunction

The junction being tracked by the host virtual junction.

Type

:number

type

The type of relationship.

Type
  • number
Inherited From:
Overrides:

Methods


stillValid()

Checks that the relationship is still valid.

Inherited From:
Overrides:
Returns:

Returns true if the relationship is still valid.

Type
boolean

update(element [, junction])

Updates the relationship.

Any party to the relationship should be able to update the relationship by calling this method with itself as the argument.

Parameters:
Name Type Argument Description
element BIM.Element

The element that is updating the relationship.

junction BIM.Junction <optional>

An optional junction that is updating the relationship.

Inherited From:
Overrides:
Returns:

Returns true if something changed and needs updating.

Type
boolean