Linear dimension
A SceneObject whose data is { "type": "linearDimension", …LinearDimensionRecord } — the tag plus every field of LinearDimensionRecord.
LinearDimensionRecord
Used by: CellType, PieceData, RenderCell.
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { LinearDimensionEntity } from "./LinearDimensionEntity.js";
export type LinearDimensionRecord = {
/**
* geometry — the linear-dimension entities.
*/
dimensions: Array<LinearDimensionEntity>, };| field | type | optional | class | doc |
|---|---|---|---|---|
dimensions | Array<LinearDimensionEntity> | no | geometry | geometry — the linear-dimension entities. |
LinearDimensionEntity
Used by: LinearDimensionRecord.
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { LinearDimensionStyle } from "./LinearDimensionStyle.js";
export type LinearDimensionEntity = {
/**
* geometry — the first measured point, mm.
*/
start: [number, number, number],
/**
* geometry — the last measured point, mm.
*/
end: [number, number, number],
/**
* geometry — the vector from the `start`–`end` line to the dimension
* line, mm; perpendicular to `end - start` (SketchUp
* `DimensionLinear#offset_vector`), it also fixes the drawing plane.
*/
offset: [number, number, number],
/**
* intent — relative weights `start`–`end` is split by, one segment
* each (`[1, 2, 1]` = quarter, half, quarter); `[1]` is one segment.
*/
ratios: Array<number>,
/**
* intent — embedded dimension style.
*/
style?: LinearDimensionStyle,
/**
* intent — replaces every segment's formatted value (`'EQ'`).
*/
text?: string,
/**
* intent — free-form record data.
*/
attributes?: Record<string, unknown>, };| field | type | optional | class | doc |
|---|---|---|---|---|
start | [number, number, number] | no | geometry | geometry — the first measured point, mm. |
end | [number, number, number] | no | geometry | geometry — the last measured point, mm. |
offset | [number, number, number] | no | geometry | geometry — the vector from the start–end line to the dimension line, mm; perpendicular to end - start (SketchUp DimensionLinear#offset_vector), it also fixes the drawing plane. |
ratios | Array<number> | no | intent | intent — relative weights start–end is split by, one segment each ([1, 2, 1] = quarter, half, quarter); [1] is one segment. |
style | LinearDimensionStyle | yes | intent | intent — embedded dimension style. |
text | string | yes | intent | intent — replaces every segment's formatted value ('EQ'). |
attributes | Record<string, unknown> | yes | intent | intent — free-form record data. |
LinearDimensionStyle
dimensionLinear's own extras — the only mark with extension lines.
Used by: LinearDimensionEntity.
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { EndpointStyle } from "./EndpointStyle.js";
/**
* `dimensionLinear`'s own extras — the only mark with extension lines.
*/
export type LinearDimensionStyle = {
/**
* intent — gap between the reference point and the extension line, mm.
*/
extensionOffset?: number,
/**
* intent — extension line length past the dimension line, mm.
*/
extensionOvershoot?: number,
/**
* intent — dimension line length past the extension lines, mm.
*/
lineOvershoot?: number,
/**
* intent — text size in points on screen (SketchUp's dimension font
* size); the text keeps that size at any zoom.
*/
fontSize?: number,
/**
* intent — how each end of the mark is drawn (SketchUp's dimension
* endpoint).
*/
endpoint?: EndpointStyle,
/**
* intent — endpoint length in points on screen; kept at any zoom.
*/
endpointSize?: number,
/**
* intent — decimal places shown.
*/
decimals?: number,
/**
* intent — rounds the measured value to this increment before display.
*/
rounding?: number,
/**
* intent — appended after the formatted value.
*/
textSuffix?: string, };| field | type | optional | class | doc |
|---|---|---|---|---|
extensionOffset | number | yes | intent | intent — gap between the reference point and the extension line, mm. |
extensionOvershoot | number | yes | intent | intent — extension line length past the dimension line, mm. |
lineOvershoot | number | yes | intent | intent — dimension line length past the extension lines, mm. |
fontSize | number | yes | intent | intent — text size in points on screen (SketchUp's dimension font size); the text keeps that size at any zoom. |
endpoint | EndpointStyle | yes | intent | intent — how each end of the mark is drawn (SketchUp's dimension endpoint). |
endpointSize | number | yes | intent | intent — endpoint length in points on screen; kept at any zoom. |
decimals | number | yes | intent | intent — decimal places shown. |
rounding | number | yes | intent | intent — rounds the measured value to this increment before display. |
textSuffix | string | yes | intent | intent — appended after the formatted value. |
EndpointStyle
How an end of a dimension or leader is drawn — SketchUp's dimension endpoints (https://help.sketchup.com/en/sketchup/adding-text-labels-and-dimensions-model; Ruby ARROW_CLOSED / ARROW_OPEN / ARROW_SLASH / ARROW_DOT / ARROW_NONE). closed and dot are filled.
Used by: DimensionStyle, Endpoint, LeaderStyle, LinearDimensionStyle.
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* How an end of a dimension or leader is drawn — SketchUp's dimension
* endpoints (https://help.sketchup.com/en/sketchup/adding-text-labels-and-dimensions-model;
* Ruby `ARROW_CLOSED` / `ARROW_OPEN` / `ARROW_SLASH` / `ARROW_DOT` /
* `ARROW_NONE`). `closed` and `dot` are filled.
*/
export type EndpointStyle = "closed" | "open" | "slash" | "dot" | "none";Values: "closed", "open", "slash", "dot", "none".
📖 2 min read