@huukhanhnguyen/model / nodeMethods/annotation
nodeMethods/annotation
BUILTIN_ANNOTATION_STYLE
constBUILTIN_ANNOTATION_STYLE:AnnotationStyle
BUILTIN_TEXT_STYLE
constBUILTIN_TEXT_STYLE:TextStyle
centerMark()
centerMark(
center,style?,styles?):CurveData
The cross at a circle's centre. NOT a dimension: it measures nothing, which is why it is plain linework sized by the style's centerMarkSize (DXF's own DIMCEN) rather than a fourth dimension type — that mistake is what forced value/text optional on every dimension until 2026-08-16.
Parameters
center
style?
string = "standard"
styles?
Returns
dimensionAngular()
dimensionAngular(
vertex,point1,point2,arcPoint,style?,text?,styles?):AngularDimensionData
Parameters
vertex
point1
point2
arcPoint
style?
string = "standard"
text?
string = ""
styles?
Returns
dimensionLinear()
dimensionLinear(
point1,point2,linePoint,style?,text?,styles?):LinearDimensionData
Parameters
point1
point2
linePoint
style?
string = "standard"
text?
string = ""
styles?
Returns
dimensionRadial()
dimensionRadial(
curve,angle?,style?,text?,styles?):RadialDimensionData
Parameters
curve
ObjectData | ObjectData[]
angle?
number = 45
style?
string = "standard"
text?
string = ""
styles?
Returns
drawAngularDimension()
drawAngularDimension(
geometry,styles,override?): {curves:PolyCurve[];labels:TextEntity[]; }
Parameters
geometry
styles
override?
text?
string
textPoint?
Returns
{ curves: PolyCurve[]; labels: TextEntity[]; }
curves
curves:
PolyCurve[]
labels
labels:
TextEntity[]
drawLeader()
drawLeader(
geometry,styles,text): {curves:PolyCurve[];labels:TextEntity[]; }
Parameters
geometry
landing
targets
Point[]
styles
text
string
Returns
{ curves: PolyCurve[]; labels: TextEntity[]; }
curves
curves:
PolyCurve[]
labels
labels:
TextEntity[]
drawLinearDimension()
drawLinearDimension(
geometry,styles,override?): {curves:PolyCurve[];labels:TextEntity[]; }
The drawn form of a linear dimension.
The dimension LINE is the line through linePoint along the measuring direction; each reference drops a perpendicular onto it. That is why linePoint replaced a signed offset number: the offset's sign only ever meant "which side", which a point states without a convention to remember.
Parameters
geometry
styles
override?
text?
string
textPoint?
Returns
{ curves: PolyCurve[]; labels: TextEntity[]; }
curves
curves:
PolyCurve[]
labels
labels:
TextEntity[]
drawRadialDimension()
drawRadialDimension(
geometry,styles,override?): {curves:PolyCurve[];labels:TextEntity[]; }
Parameters
geometry
styles
override?
text?
string
textPoint?
Returns
{ curves: PolyCurve[]; labels: TextEntity[]; }
curves
curves:
PolyCurve[]
labels
labels:
TextEntity[]
imageEntity()
imageEntity(
url,at?,width?,height?):ObjectData|undefined
Parameters
url
string
at?
Point = ...
width?
number = 80
height?
number = 0
Returns
ObjectData | undefined
leader()
leader(
target,landing,text,style?,styles?):LeaderData
Parameters
target
landing
text
string
style?
string = "standard"
styles?
Returns
resolveStyles()
resolveStyles(
name,annotationStyles,textStyles):AnnotationStyles
Resolve a style NAME against the document's lanes, falling back to the builtin of the same name. Throws on a name that is neither — a mark drawn with a style nobody declared is a broken drawing, not a default one.
Parameters
name
string
annotationStyles
AnnotationStyle[] | undefined
textStyles
TextStyle[] | undefined
Returns
resolveStylesForMethod()
resolveStylesForMethod(
method,name,annotationStyles,textStyles):AnnotationStyles
What the wiring hands a producer. text and centerMark name only ONE of the two lanes, so the other side falls back to its builtin rather than demanding a record the author never had to write.
Parameters
method
string
name
string
annotationStyles
AnnotationStyle[] | undefined
textStyles
TextStyle[] | undefined
Returns
resolveTextStyle()
resolveTextStyle(
name,textStyles):TextStyle
Parameters
name
string
textStyles
TextStyle[] | undefined
Returns
textEntity()
textEntity(
position,content,width?,style?,styles?):TextData
Text in the XY plane — the authored case. A mark on another plane is produced by transforming this one, which maps normal/xAxis with it.
Parameters
position
content
string
width?
number = 0
style?
string = "standard"
styles?
Returns
formatDimension
Re-exports formatDimension