Class: PathExtensions

BIM. PathExtensions

Provides path-based elements with additional properties for extending and/or angling the start and end junctions of an open path.

Path extensions are used by elements such as walls, swept roofs, extruded structural sections and pathways which are built from open paths by either extruding a shape along it or projecting sideways by a given with.


new PathExtensions( [config])

Creates a new path extension instance.

Parameters:
Name Type Argument Description
config object <optional>

A configuration object defining path extension parameters.

Properties of config:
Name Type Argument Description
startExtend number <optional>

The extension of the start point in an open path in mm, defaults to zero.

startAzi number <optional>

The azimuth angle of the start face in an open path starts (-75deg to 75deg), defaults to zero.

startAlt number <optional>

The altitude angle of the start face in an open path starts (-75deg to 75deg), defaults to zero.

endExtend number <optional>

The extension of the end point in an open path in mm, defaults to zero.

endAzi number <optional>

The azimuth angle of the end face in an open path (-75deg to 75deg), defaults to zero.

endAlt number <optional>

The altitude angle of the end face in an open path (-75deg to 75deg), defaults to zero.

noAlt boolean <optional>

An optional flag indicating that no altitude values should be added, defaults to false.

Author:
  • drajmarsh

Members


:number

endAlt

The altitude angle of the end face in an open path (-75deg to 75deg), defaults to zero.

Type
  • number

:number

endAzi

The azimuth angle of the end face in an open path (-75deg to 75deg), defaults to zero.

Type
  • number

:number

endExtend

The extension of the end point in an open path in mm, defaults to zero.

Type
  • number

:boolean

isPathExtension <readonly>

A flag identifying this object as a path extension.

Type
  • boolean

:number

startAlt

The altitude angle of the start face in an open path starts (-75deg to 75deg), defaults to zero.

Type
  • number

:number

startAzi

The azimuth angle of the start face in an open path starts (-75deg to 75deg), defaults to zero.

Type
  • number

:number

startExtend

The extension of the start point in an open path in mm, defaults to zero.

Type
  • number

Methods


applyToPath(path)

Sets the path extension properties on the first and last junctions in each contour of an open path.

If the path is a closed, this method does nothing.

Parameters:
Name Type Description
path BIM.Path

The path to apply the extension properties to.

Returns:

Returns true if the start/end junctions were updated.

Type
boolean

checkDynamicParameter(param, group)

Checks the allowable range of path extension parameter values.

See the PD.Base#checkDynamicParameter method for more details.

Parameters:
Name Type Description
param PD.Parameter

The parameter that is being interactively changed.

group PD.ParamGroup

The group that the dynamic parameter belongs to.


fromJSON(data)

Safely copy properties from a source object.

See the PD.Base#fromJSON method for more details.

Parameters:
Name Type Description
data object

The source object containing data to copy.

Returns:

Returns this instance to support method chaining.

Type
BIM.Component

getDynamicParameters()

Provides a list of dynamic parameter groups for this extension.

See the PD.Base#getDynamicParameters method for more details.

Returns:

Returns an array of PD.ParamGroup objects.

Type
Array

toJSON( [data])

Converts the object instance to a simple POJO for JSON storage.

This method is used to copy, store and save the data for ths object, so the returned object must have all the properties required be able to rebuild this instance in its entirety when passed to the class constructor.

See the PD.Base#toJSON method for more details.

Parameters:
Name Type Argument Description
data object <optional>

An optional parent object to append this data to.

Returns:

Returns a JSON object.

Type
object

fromPath(path [, config]) <static>

Checks for a valid open path and returns a new path extensions instance or, if the path is invalid or a closed loop, returns null.

Parameters:
Name Type Argument Description
path BIM.Path

The path to check if it is not a closed loop.

config object <optional>

An optional configuration object to pass to the constructor.

Properties of config:
Name Type Argument Description
startExtend number <optional>

The extension of the start point in an open path in mm, defaults to zero.

startAzi number <optional>

The azimuth angle of the start face in an open path starts (-75deg to 75deg), defaults to zero.

startAlt number <optional>

The altitude angle of the start face in an open path starts (-75deg to 75deg), defaults to zero.

endExtend number <optional>

The extension of the end point in an open path in mm, defaults to zero.

endAzi number <optional>

The azimuth angle of the end face in an open path (-75deg to 75deg), defaults to zero.

endAlt number <optional>

The altitude angle of the end face in an open path (-75deg to 75deg), defaults to zero.

Returns:

Returns true if the start/end junctions were updated.

Type
BIM.PathExtensions | null