@huukhanhnguyen/types / objects/linearDimension
objects/linearDimension
LinearDimension
LinearDimension = {
direction?:Vector;linePoint:Point;references:Point[]; }
A distance measured between marks, drawn on a dimension line.
references is a CHAIN, not a bag: N+1 marks give N measured segments, so a single dimension is a chain of one and needs no separate type, and a running / chained dimension needs no second type either. Every element has the SAME role.
linePoint is a point the dimension LINE passes through: the offset from the references is geometry, not a number to guess a sign for.
direction absent means measure ALONG the references (the ordinary case). Present, it measures the projection onto that direction.
direction?
optionaldirection?:Vector
linePoint
linePoint:
Point
references
references:
Point[]
LinearDimensionData
LinearDimensionData = {
dimensions:LinearDimensionEntity[]; }
Object-tier linear-dimension datablock.
dimensions
dimensions:
LinearDimensionEntity[]
LinearDimensionEntity
LinearDimensionEntity =
LinearDimension& {attributes?:Record<string,unknown> |null;curves:PolyCurve[];label?:Text;style:string;text?:string;textPoint?:Point; }
One linear dimension in a LinearDimensionData bag: the measured geometry plus the style it is drawn with, the drawn form, and the two overrides a drafter reaches for. Never a stored value — the measurement is a function of the geometry's own points.
LinearDimensionInstance
LinearDimensionInstance =
BaseInstance& {material?:string; }
LinearDimensionObject
LinearDimensionObject =
BaseObject& {data:LinearDimensionData;instances:LinearDimensionInstance[];type:"linearDimension"; }
An object whose data is linear dimensions and nothing else.
Linear measure has two anchors and a direction. The three dimension kinds are different mathematical arities and cannot share one object kind.