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
|
|||||||||||||||||||||||||||||||||||
| 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. |
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 pathBIM.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#checkDynamicParametermethod for more details.Parameters:
Name Type Description paramPD.Parameter The parameter that is being interactively changed.
groupPD.ParamGroup The group that the dynamic parameter belongs to.
-
fromJSON(data)
-
Safely copy properties from a source object.
See the
PD.Base#fromJSONmethod for more details.Parameters:
Name Type Description dataobject 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#getDynamicParametersmethod for more details.Returns:
Returns an array of
PD.ParamGroupobjects.- 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#toJSONmethod for more details.Parameters:
Name Type Argument Description dataobject <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 pathBIM.Path The path to check if it is not a closed loop.
configobject <optional>
An optional configuration object to pass to the constructor.
Properties of
config:Name Type Argument Description startExtendnumber <optional>
The extension of the start point in an open path in mm, defaults to zero.
startAzinumber <optional>
The azimuth angle of the start face in an open path starts (-75deg to 75deg), defaults to zero.
startAltnumber <optional>
The altitude angle of the start face in an open path starts (-75deg to 75deg), defaults to zero.
endExtendnumber <optional>
The extension of the end point in an open path in mm, defaults to zero.
endAzinumber <optional>
The azimuth angle of the end face in an open path (-75deg to 75deg), defaults to zero.
endAltnumber <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