Class: TrackSegmentXY

BIM.Relation. TrackSegmentXY

A relationship where one junction lies on the XY path segment of another.

This relationship is used by the junctions of fixtures and furnishings that lie on the boundary of their enclosing space, allowing them to maintain position when the host space is interactively edited.

        \                          |
         o-------------------------o---------------+
         | +-----------------------+               |
         | |        Cupboards      |               |
         | |    +------------------+               |
         | |    |                                  |
         | |    |                                  |
         | |    |                                  |
         | |    |                                  |
      -- o +----+                                  |
         |                                         |
         +-----------------------------------------+

new TrackSegmentXY(element, follower, leader)

Creates a new tracking relationship between two junctions.

Parameters:
Name Type Description
element BIM.Element

The element the follower junction belongs to.

follower BIM.Junction

The hostJunction that lies on the path segment of the leader.

leader BIM.Junction

The linkedJunction defining the path segment of the bounding space.

Author:
  • drajmarsh
Throws:

Throws an error if the follower or leader junctions are not valid.

Type
Error

Extends

Members


:number

distance

The distance from closest end of the segment.

Type
  • number

:BIM.Element

hostElement

The element hosting the items in the relationship.

Type
Inherited From:
Overrides:

:BIM.Junction

hostJunction

The host junction that tracks the position of the leader.

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:

:boolean

isTrackSegmentXY <readonly>

A flag identifying this object as a TrackSegmentXY relationship.

Type
  • boolean

:BIM.Junction

linkedJunction

The junction whose position is tracked on the space boundary.

Type

:number

type

The type of relationship.

Type
  • number
Inherited From:
Overrides:

:number

u

Where in the segment the junction lies.

This is a fractional value between 0 and 1 based on the current length of the segment.

Type
  • number

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>

The junction that is updating the relationship, if any - not used in this relationship.

Inherited From:
Overrides:
Returns:

Returns true if something changed and needs updating.

Type
boolean