Skip to content
ParaShape

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>, };
fieldtypeoptionalclassdoc
dimensionsArray<LinearDimensionEntity>nogeometrygeometry — 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>, };
fieldtypeoptionalclassdoc
start[number, number, number]nogeometrygeometry — the first measured point, mm.
end[number, number, number]nogeometrygeometry — the last measured point, mm.
offset[number, number, number]nogeometrygeometry — 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.
ratiosArray<number>nointentintent — relative weights start–end is split by, one segment each ([1, 2, 1] = quarter, half, quarter); [1] is one segment.
styleLinearDimensionStyleyesintentintent — embedded dimension style.
textstringyesintentintent — replaces every segment's formatted value ('EQ').
attributesRecord<string, unknown>yesintentintent — 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, };
fieldtypeoptionalclassdoc
extensionOffsetnumberyesintentintent — gap between the reference point and the extension line, mm.
extensionOvershootnumberyesintentintent — extension line length past the dimension line, mm.
lineOvershootnumberyesintentintent — dimension line length past the extension lines, mm.
fontSizenumberyesintentintent — text size in points on screen (SketchUp's dimension font size); the text keeps that size at any zoom.
endpointEndpointStyleyesintentintent — how each end of the mark is drawn (SketchUp's dimension endpoint).
endpointSizenumberyesintentintent — endpoint length in points on screen; kept at any zoom.
decimalsnumberyesintentintent — decimal places shown.
roundingnumberyesintentintent — rounds the measured value to this increment before display.
textSuffixstringyesintentintent — 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