scaleAlignment
Function in @bimworks/viewercommon.
API catalogue · @bimworks/viewercommon · Function
TypeScript#
function scaleAlignmentMembers#
| Member | Kind | Description |
|---|---|---|
| scaleAlignment | Method | The alignment that makes the line from p to q (raw model mm of the drawing, before its alignment) measure lengthMm, scaled about p so p stays where it is sho… |
scaleAlignment#
TypeScript#
scaleAlignment(alignment: ArrayLike<number> | null, p: ArrayLike<number>, q: ArrayLike<number>, lengthMm: number): DrawingScaleResult & { shownLength: number } | nullThe alignment that makes the line from p to q (raw model mm of the drawing, before its alignment) measure lengthMm, scaled about p so p stays where it is shown; a turn and position of the alignment are kept. null when the points coincide or the length is not a positive number
Parameters#
| Name | Type | Description |
|---|---|---|
alignment |
ArrayLike<number> | null |
The drawing's alignment now; null for none |
p |
ArrayLike<number> |
|
q |
ArrayLike<number> |
|
lengthMm |
number |