@mlightcad/data-model 1.7.28 → 1.7.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/data-model.cjs +4 -4
  2. package/dist/data-model.js +2805 -2126
  3. package/dist/dxf-parser-worker.js +325 -304
  4. package/lib/converter/AcDbDxfConverter.d.ts +1 -0
  5. package/lib/converter/AcDbDxfConverter.d.ts.map +1 -1
  6. package/lib/converter/AcDbDxfConverter.js +20 -1
  7. package/lib/converter/AcDbDxfConverter.js.map +1 -1
  8. package/lib/converter/AcDbEntitiyConverter.d.ts.map +1 -1
  9. package/lib/converter/AcDbEntitiyConverter.js +18 -42
  10. package/lib/converter/AcDbEntitiyConverter.js.map +1 -1
  11. package/lib/converter/AcDbObjectConverter.d.ts.map +1 -1
  12. package/lib/converter/AcDbObjectConverter.js +30 -11
  13. package/lib/converter/AcDbObjectConverter.js.map +1 -1
  14. package/lib/database/AcDbBlockTableRecord.d.ts.map +1 -1
  15. package/lib/database/AcDbBlockTableRecord.js +1 -0
  16. package/lib/database/AcDbBlockTableRecord.js.map +1 -1
  17. package/lib/database/AcDbDatabase.d.ts +38 -0
  18. package/lib/database/AcDbDatabase.d.ts.map +1 -1
  19. package/lib/database/AcDbDatabase.js +193 -27
  20. package/lib/database/AcDbDatabase.js.map +1 -1
  21. package/lib/database/AcDbSysVarManager.d.ts.map +1 -1
  22. package/lib/database/AcDbSysVarManager.js +28 -1
  23. package/lib/database/AcDbSysVarManager.js.map +1 -1
  24. package/lib/database/AcDbSystemVariables.d.ts +7 -1
  25. package/lib/database/AcDbSystemVariables.d.ts.map +1 -1
  26. package/lib/database/AcDbSystemVariables.js +6 -0
  27. package/lib/database/AcDbSystemVariables.js.map +1 -1
  28. package/lib/entity/AcDbMLeader.d.ts +200 -7
  29. package/lib/entity/AcDbMLeader.d.ts.map +1 -1
  30. package/lib/entity/AcDbMLeader.js +456 -25
  31. package/lib/entity/AcDbMLeader.js.map +1 -1
  32. package/lib/entity/AcDbMLine.d.ts +548 -0
  33. package/lib/entity/AcDbMLine.d.ts.map +1 -1
  34. package/lib/entity/AcDbMLine.js +986 -24
  35. package/lib/entity/AcDbMLine.js.map +1 -1
  36. package/lib/misc/AcDbConstants.d.ts +14 -0
  37. package/lib/misc/AcDbConstants.d.ts.map +1 -1
  38. package/lib/misc/AcDbConstants.js +14 -0
  39. package/lib/misc/AcDbConstants.js.map +1 -1
  40. package/lib/misc/AcDbMLeaderStyleColorCodec.d.ts +59 -0
  41. package/lib/misc/AcDbMLeaderStyleColorCodec.d.ts.map +1 -0
  42. package/lib/misc/AcDbMLeaderStyleColorCodec.js +101 -0
  43. package/lib/misc/AcDbMLeaderStyleColorCodec.js.map +1 -0
  44. package/lib/misc/index.d.ts +1 -0
  45. package/lib/misc/index.d.ts.map +1 -1
  46. package/lib/misc/index.js +1 -0
  47. package/lib/misc/index.js.map +1 -1
  48. package/lib/object/AcDbMLeaderStyle.d.ts +9 -8
  49. package/lib/object/AcDbMLeaderStyle.d.ts.map +1 -1
  50. package/lib/object/AcDbMLeaderStyle.js +11 -9
  51. package/lib/object/AcDbMLeaderStyle.js.map +1 -1
  52. package/lib/object/AcDbMlineStyle.d.ts +5 -4
  53. package/lib/object/AcDbMlineStyle.d.ts.map +1 -1
  54. package/lib/object/AcDbMlineStyle.js +12 -18
  55. package/lib/object/AcDbMlineStyle.js.map +1 -1
  56. package/package.json +5 -5
@@ -7,60 +7,137 @@ import { AcDbEntityProperties } from './AcDbEntityProperties';
7
7
  * Defines MLINE justification relative to the style element offsets.
8
8
  */
9
9
  export declare enum AcDbMLineJustification {
10
+ /**
11
+ * Places all style elements below or on the reference path.
12
+ */
10
13
  Top = 0,
14
+ /**
15
+ * Centers style elements around the reference path.
16
+ */
11
17
  Zero = 1,
18
+ /**
19
+ * Places all style elements above or on the reference path.
20
+ */
12
21
  Bottom = 2
13
22
  }
14
23
  /**
15
24
  * Bit flags used by MLINE entities.
16
25
  */
17
26
  export declare enum AcDbMLineFlags {
27
+ /**
28
+ * Indicates the MLINE currently contains at least one segment vertex.
29
+ */
18
30
  HasVertex = 1,
31
+ /**
32
+ * Indicates the MLINE should be treated as a closed loop.
33
+ */
19
34
  Closed = 2,
35
+ /**
36
+ * Suppresses cap geometry at the start of the MLINE.
37
+ */
20
38
  SuppressStartCaps = 4,
39
+ /**
40
+ * Suppresses cap geometry at the end of the MLINE.
41
+ */
21
42
  SuppressEndCaps = 8
22
43
  }
23
44
  /**
24
45
  * Input payload for one MLINE element in a segment.
25
46
  */
26
47
  export interface AcDbMLineElementLike {
48
+ /**
49
+ * Number of line parameters described in {@link parameters}.
50
+ * If omitted, the count is inferred from the array length.
51
+ */
27
52
  parameterCount?: number;
53
+ /**
54
+ * Element parameters where the first value is treated as the miter offset.
55
+ */
28
56
  parameters?: number[];
57
+ /**
58
+ * Number of fill parameters described in {@link fillParameters}.
59
+ * If omitted, the count is inferred from the array length.
60
+ */
29
61
  fillCount?: number;
62
+ /**
63
+ * Fill parameters used by consumers that need style-specific fill metadata.
64
+ */
30
65
  fillParameters?: number[];
31
66
  }
32
67
  /**
33
68
  * Normalized MLINE element data.
34
69
  */
35
70
  export interface AcDbMLineElement {
71
+ /**
72
+ * Number of values in {@link parameters}.
73
+ */
36
74
  parameterCount: number;
75
+ /**
76
+ * Resolved element parameter array.
77
+ */
37
78
  parameters: number[];
79
+ /**
80
+ * Number of values in {@link fillParameters}.
81
+ */
38
82
  fillCount: number;
83
+ /**
84
+ * Resolved fill parameter array.
85
+ */
39
86
  fillParameters: number[];
40
87
  }
41
88
  /**
42
89
  * Input payload for one MLINE segment.
43
90
  */
44
91
  export interface AcDbMLineSegmentLike {
92
+ /**
93
+ * Segment vertex in world coordinates.
94
+ */
45
95
  position: AcGePoint3dLike;
96
+ /**
97
+ * Segment direction vector along the reference path.
98
+ */
46
99
  direction: AcGeVector3dLike;
100
+ /**
101
+ * Miter direction used to offset each style element.
102
+ */
47
103
  miterDirection: AcGeVector3dLike;
104
+ /**
105
+ * Optional per-element parameter data for this segment.
106
+ */
48
107
  elements?: AcDbMLineElementLike[];
49
108
  }
50
109
  /**
51
110
  * Normalized MLINE segment data.
52
111
  */
53
112
  export interface AcDbMLineSegment {
113
+ /**
114
+ * Segment vertex in world coordinates.
115
+ */
54
116
  position: AcGePoint3d;
117
+ /**
118
+ * Segment direction vector along the reference path.
119
+ */
55
120
  direction: AcGeVector3d;
121
+ /**
122
+ * Miter direction used to offset each style element.
123
+ */
56
124
  miterDirection: AcGeVector3d;
125
+ /**
126
+ * Resolved per-element parameter data for the segment.
127
+ */
57
128
  elements: AcDbMLineElement[];
58
129
  }
59
130
  /**
60
131
  * Represents the AutoCAD MLINE entity.
61
132
  */
62
133
  export declare class AcDbMLine extends AcDbEntity {
134
+ /**
135
+ * Runtime type name used by the entity factory and RTTI helpers.
136
+ */
63
137
  static typeName: string;
138
+ /**
139
+ * DXF entity type token written to or read from drawing files.
140
+ */
64
141
  get dxfTypeName(): string;
65
142
  private _styleName;
66
143
  private _styleObjectHandle;
@@ -71,52 +148,523 @@ export declare class AcDbMLine extends AcDbEntity {
71
148
  private _startPosition;
72
149
  private _normal;
73
150
  private _segments;
151
+ /**
152
+ * Creates a new MLINE entity initialized with AutoCAD-compatible defaults.
153
+ */
74
154
  constructor();
155
+ /**
156
+ * Gets the style name used to resolve the MLINE style object.
157
+ *
158
+ * @returns Current style name.
159
+ */
75
160
  get styleName(): string;
161
+ /**
162
+ * Sets the style name used to resolve the MLINE style object.
163
+ *
164
+ * @param value New style name.
165
+ */
76
166
  set styleName(value: string);
167
+ /**
168
+ * Gets the handle of the referenced MLINESTYLE object.
169
+ *
170
+ * @returns Style object handle.
171
+ */
77
172
  get styleObjectHandle(): string;
173
+ /**
174
+ * Sets the handle of the referenced MLINESTYLE object.
175
+ *
176
+ * @param value Style object handle.
177
+ */
78
178
  set styleObjectHandle(value: string);
179
+ /**
180
+ * Gets the global scale factor applied to style offsets.
181
+ *
182
+ * @returns MLINE scale.
183
+ */
79
184
  get scale(): number;
185
+ /**
186
+ * Sets the global scale factor applied to style offsets.
187
+ *
188
+ * @param value MLINE scale.
189
+ */
80
190
  set scale(value: number);
191
+ /**
192
+ * Gets the current justification mode.
193
+ *
194
+ * @returns Justification enum value.
195
+ */
81
196
  get justification(): AcDbMLineJustification;
197
+ /**
198
+ * Sets the current justification mode.
199
+ *
200
+ * @param value Justification enum value.
201
+ */
82
202
  set justification(value: AcDbMLineJustification);
203
+ /**
204
+ * Gets the raw MLINE bit flags.
205
+ *
206
+ * @returns Bitwise combination of {@link AcDbMLineFlags}.
207
+ */
83
208
  get flags(): number;
209
+ /**
210
+ * Sets the raw MLINE bit flags.
211
+ *
212
+ * @param value Bitwise combination of {@link AcDbMLineFlags}.
213
+ */
84
214
  set flags(value: number);
215
+ /**
216
+ * Gets the number of style elements expected by the entity.
217
+ *
218
+ * @returns Style element count.
219
+ */
85
220
  get styleCount(): number;
221
+ /**
222
+ * Sets the style element count.
223
+ * Negative values are clamped to `0`.
224
+ *
225
+ * @param value Requested style element count.
226
+ */
86
227
  set styleCount(value: number);
228
+ /**
229
+ * Gets the MLINE start point in world coordinates.
230
+ *
231
+ * @returns Start point instance.
232
+ */
87
233
  get startPosition(): AcGePoint3dLike;
234
+ /**
235
+ * Sets the MLINE start point in world coordinates.
236
+ *
237
+ * @param value New start point.
238
+ */
88
239
  set startPosition(value: AcGePoint3dLike);
240
+ /**
241
+ * Gets the MLINE plane normal.
242
+ *
243
+ * @returns Normal vector instance.
244
+ */
89
245
  get normal(): AcGeVector3dLike;
246
+ /**
247
+ * Sets the MLINE plane normal.
248
+ *
249
+ * @param value New normal vector.
250
+ */
90
251
  set normal(value: AcGeVector3dLike);
252
+ /**
253
+ * Gets a deep-cloned snapshot of all segments.
254
+ * Mutating the returned array or objects will not affect internal state.
255
+ *
256
+ * @returns Cloned segment collection.
257
+ */
91
258
  get segments(): AcDbMLineSegmentLike[];
259
+ /**
260
+ * Replaces all segments using normalized internal copies.
261
+ * Also updates the internal `HasVertex` flag.
262
+ *
263
+ * @param value Segment list to normalize and store.
264
+ */
92
265
  set segments(value: AcDbMLineSegmentLike[]);
266
+ /**
267
+ * Gets the number of stored segment vertices.
268
+ *
269
+ * @returns Vertex count.
270
+ */
93
271
  get vertexCount(): number;
272
+ /**
273
+ * Indicates whether the MLINE is closed.
274
+ *
275
+ * @returns `true` when the `Closed` flag is set.
276
+ */
94
277
  get closed(): boolean;
278
+ /**
279
+ * Enables or disables closed-loop behavior.
280
+ *
281
+ * @param value `true` to close the path, otherwise `false`.
282
+ */
95
283
  set closed(value: boolean);
284
+ /**
285
+ * Indicates whether start caps are suppressed during rendering.
286
+ *
287
+ * @returns `true` when the `SuppressStartCaps` flag is set.
288
+ */
96
289
  get suppressStartCaps(): boolean;
290
+ /**
291
+ * Enables or disables start cap suppression.
292
+ *
293
+ * @param value `true` to suppress start caps.
294
+ */
97
295
  set suppressStartCaps(value: boolean);
296
+ /**
297
+ * Indicates whether end caps are suppressed during rendering.
298
+ *
299
+ * @returns `true` when the `SuppressEndCaps` flag is set.
300
+ */
98
301
  get suppressEndCaps(): boolean;
302
+ /**
303
+ * Enables or disables end cap suppression.
304
+ *
305
+ * @param value `true` to suppress end caps.
306
+ */
99
307
  set suppressEndCaps(value: boolean);
308
+ /**
309
+ * Appends one segment to the MLINE.
310
+ * The segment is normalized into internal geometry instances.
311
+ *
312
+ * @param segment Segment payload to append.
313
+ */
100
314
  appendSegment(segment: AcDbMLineSegmentLike): void;
315
+ /**
316
+ * Removes all segments and clears the `HasVertex` flag.
317
+ */
101
318
  clearSegments(): void;
319
+ /**
320
+ * Computes a bounding box from renderable MLINE geometry.
321
+ *
322
+ * @returns Axis-aligned 3D extents box.
323
+ */
102
324
  get geometricExtents(): AcGeBox3d;
325
+ /**
326
+ * Applies a transformation matrix to the full MLINE geometry.
327
+ * Points are transformed directly, while vectors are transformed without
328
+ * introducing translation components.
329
+ *
330
+ * @param matrix Matrix to apply.
331
+ * @returns The same entity instance for chaining.
332
+ */
103
333
  transformBy(matrix: AcGeMatrix3d): this;
334
+ /**
335
+ * Exposes editable property metadata for UI/property panels.
336
+ *
337
+ * @returns Entity property definition grouped by category.
338
+ */
104
339
  get properties(): AcDbEntityProperties;
340
+ /**
341
+ * Renders this MLINE into one or more graphic interface entities.
342
+ * It draws optional fill first and then style element lines.
343
+ *
344
+ * @param renderer Active graphics renderer.
345
+ * @returns A single entity, an entity group, or `undefined` when nothing is drawable.
346
+ */
105
347
  subWorldDraw(renderer: AcGiRenderer): AcGiEntity | undefined;
348
+ /**
349
+ * Serializes MLINE-specific fields to the DXF filer.
350
+ *
351
+ * @param filer DXF writer context.
352
+ * @returns The current entity instance.
353
+ */
106
354
  dxfOutFields(filer: AcDbDxfFiler): this;
355
+ /**
356
+ * Sets or clears a single MLINE bit flag.
357
+ *
358
+ * @param flag Flag bit to update.
359
+ * @param enabled Whether the flag should be set.
360
+ */
107
361
  private setFlag;
362
+ /**
363
+ * Synchronizes the `HasVertex` flag with current segment count.
364
+ */
108
365
  private updateHasVertexFlag;
366
+ /**
367
+ * Normalizes segment-like input into internal segment storage.
368
+ *
369
+ * @param segment Segment-like payload.
370
+ * @returns Normalized segment.
371
+ */
109
372
  private createSegment;
373
+ /**
374
+ * Normalizes element-like input and infers count fields when missing.
375
+ *
376
+ * @param element Element-like payload.
377
+ * @returns Normalized element.
378
+ */
110
379
  private createElement;
380
+ /**
381
+ * Produces a deep clone of one normalized segment.
382
+ *
383
+ * @param segment Source segment.
384
+ * @returns Deep-cloned segment.
385
+ */
111
386
  private cloneSegment;
387
+ /**
388
+ * Collects points that represent all drawable geometry for extents calculation.
389
+ *
390
+ * @returns Geometry point list in world coordinates.
391
+ */
112
392
  private collectGeometryPoints;
393
+ /**
394
+ * Calculates how many element paths should be rendered.
395
+ * Uses the max of entity style count, style definition count, and segment data.
396
+ *
397
+ * @param mlineStyle Resolved style object, if available.
398
+ * @returns Renderable element count.
399
+ */
113
400
  private getRenderableElementCount;
401
+ /**
402
+ * Builds the un-offset reference polyline path from start point and segments.
403
+ *
404
+ * @returns Reference path points, optionally closed when needed.
405
+ */
114
406
  private getReferencePath;
407
+ /**
408
+ * Computes one style element path by offsetting every segment along its miter direction.
409
+ *
410
+ * @param elementIndex Style element index to evaluate.
411
+ * @param mlineStyle Resolved style object, if available.
412
+ * @returns Offset path points, optionally closed when needed.
413
+ */
115
414
  private getElementPath;
415
+ /**
416
+ * Resolves the offset distance for an element at a specific segment.
417
+ * Prefers segment element parameters and falls back to style offsets.
418
+ *
419
+ * @param segment Segment to evaluate.
420
+ * @param elementIndex Style element index.
421
+ * @param mlineStyle Resolved style object, if available.
422
+ * @returns Miter offset distance.
423
+ */
116
424
  private getElementMiterOffset;
425
+ /**
426
+ * Resolves one element boundary point at the start/end of open MLINE paths.
427
+ *
428
+ * @param side `start` or `end`.
429
+ * @param segment Segment data used to resolve miter offset.
430
+ * @param elementIndex Style element index.
431
+ * @param mlineStyle Resolved style object, if available.
432
+ * @returns Boundary point after cap-angle cut adjustment.
433
+ */
434
+ private getElementBoundaryPoint;
435
+ /**
436
+ * Indicates whether cap-angle cut should be applied at the given side.
437
+ *
438
+ * @param side `start` or `end`.
439
+ * @param mlineStyle Resolved style object, if available.
440
+ * @returns `true` when side has cap components and is not suppressed.
441
+ */
442
+ private shouldApplyCapCutAtSide;
443
+ /**
444
+ * Computes longitudinal cut distance based on cap angle and style-element offset.
445
+ *
446
+ * @param offset Element offset along miter direction.
447
+ * @param angleDegrees Cap angle in degree units.
448
+ * @param side `start` or `end`.
449
+ * @returns Signed distance to move along segment direction.
450
+ */
451
+ private computeCapCutDistance;
452
+ /**
453
+ * Normalizes cap angle from DXF degree units to radians.
454
+ *
455
+ * @param angleDegrees Cap angle in degree units.
456
+ * @returns Safe radian value in `(0, PI)` with 90-degree fallback.
457
+ */
458
+ private normalizeCapAngle;
459
+ /**
460
+ * Resolves forward direction at MLINE start.
461
+ *
462
+ * @returns Unit vector along the first segment.
463
+ */
464
+ private getStartSegmentDirection;
465
+ /**
466
+ * Resolves forward direction at MLINE end.
467
+ *
468
+ * @returns Unit vector along the last visible segment.
469
+ */
470
+ private getEndSegmentDirection;
471
+ /**
472
+ * Creates a fill area between outermost and innermost element paths when style fill is enabled.
473
+ *
474
+ * @param mlineStyle Resolved style object.
475
+ * @param elementCount Total renderable element count.
476
+ * @returns Fill area polygon(s), or `undefined` when fill cannot be formed.
477
+ */
478
+ private createFillArea;
479
+ /**
480
+ * Finds the element indices that define fill boundaries by minimum and maximum reference offsets.
481
+ *
482
+ * @param elementCount Total renderable element count.
483
+ * @param mlineStyle Resolved style object, if available.
484
+ * @returns Outer/inner boundary indices, or `undefined` when not resolvable.
485
+ */
486
+ private getFillBoundaryElementIndices;
487
+ /**
488
+ * Resolves an element's reference offset from first-segment data or style defaults.
489
+ *
490
+ * @param elementIndex Style element index.
491
+ * @param mlineStyle Resolved style object, if available.
492
+ * @returns Reference offset used for boundary comparison.
493
+ */
494
+ private getElementReferenceOffset;
495
+ /**
496
+ * Resolves style-defined element offset to world offset under current
497
+ * justification and entity scale.
498
+ *
499
+ * @param elementIndex Style element index.
500
+ * @param mlineStyle Resolved style object, if available.
501
+ * @returns Final offset distance used for miter displacement.
502
+ */
503
+ private getStyleElementOffset;
504
+ /**
505
+ * Calculates justification shift in style-offset space.
506
+ *
507
+ * - `Zero`: shift = 0
508
+ * - `Top`: highest style offset is moved to 0
509
+ * - `Bottom`: lowest style offset is moved to 0
510
+ *
511
+ * @param mlineStyle Resolved style object, if available.
512
+ * @returns Offset shift before scaling.
513
+ */
514
+ private getStyleJustificationShift;
515
+ /**
516
+ * Removes a duplicated closing vertex when the first and last points are numerically equal.
517
+ *
518
+ * @param points Candidate closed path.
519
+ * @returns Path without duplicated terminal point.
520
+ */
521
+ private stripClosingPoint;
522
+ /**
523
+ * Offsets a point along a miter direction by a scalar distance.
524
+ *
525
+ * @param point Base point.
526
+ * @param miterDirection Offset direction.
527
+ * @param distance Offset distance.
528
+ * @returns Offset point clone.
529
+ */
117
530
  private offsetPoint;
531
+ /**
532
+ * Appends the first point to the end of a path when closed mode requires an explicit closure.
533
+ *
534
+ * @param points Path points to inspect.
535
+ * @returns Original or explicitly closed path array.
536
+ */
537
+ private closePathIfNeeded;
538
+ /**
539
+ * Appends style-driven joint/cap entities after element path rendering.
540
+ *
541
+ * @param renderer Active graphics renderer.
542
+ * @param entities Output entity list to append into.
543
+ * @param mlineStyle Resolved style object, if available.
544
+ * @param elementCount Renderable style element count.
545
+ * @param originalColor Original trait color.
546
+ * @param originalRgbColor Original trait RGB.
547
+ * @param originalLineType Original trait linetype.
548
+ */
549
+ private appendStyleDrivenJointAndCapEntities;
550
+ /**
551
+ * Draws miter connector lines at interior joints when style enables it.
552
+ *
553
+ * @param renderer Active graphics renderer.
554
+ * @param mlineStyle Resolved style object.
555
+ * @param elementCount Renderable style element count.
556
+ * @param originalColor Original trait color.
557
+ * @param originalRgbColor Original trait RGB.
558
+ * @param originalLineType Original trait linetype.
559
+ * @returns Drawn joint entities.
560
+ */
561
+ private drawMiterJointEntities;
562
+ /**
563
+ * Draws start/end cap entities according to MLINESTYLE cap flags.
564
+ *
565
+ * @param renderer Active graphics renderer.
566
+ * @param mlineStyle Resolved style object.
567
+ * @param elementCount Renderable style element count.
568
+ * @param originalColor Original trait color.
569
+ * @param originalRgbColor Original trait RGB.
570
+ * @param originalLineType Original trait linetype.
571
+ * @returns Drawn cap entities.
572
+ */
573
+ private drawCapEntities;
574
+ /**
575
+ * Draws one-side cap entities (line/outer-arc/inner-arcs).
576
+ *
577
+ * @param renderer Active graphics renderer.
578
+ * @param side `start` or `end`.
579
+ * @param mlineStyle Resolved style object.
580
+ * @param elementCount Renderable style element count.
581
+ * @param originalColor Original trait color.
582
+ * @param originalRgbColor Original trait RGB.
583
+ * @param originalLineType Original trait linetype.
584
+ * @returns Drawn one-side cap entities.
585
+ */
586
+ private drawCapEntitiesForSide;
587
+ /**
588
+ * Creates sorted element boundary points for one cap side.
589
+ *
590
+ * @param side `start` or `end`.
591
+ * @param elementCount Renderable style element count.
592
+ * @param mlineStyle Resolved style object.
593
+ * @returns Cap points sorted by descending element offset.
594
+ */
595
+ private getCapElementPoints;
596
+ /**
597
+ * Draws one cap arc between two cap element points.
598
+ *
599
+ * @param renderer Active graphics renderer.
600
+ * @param startPointPair Start element point.
601
+ * @param endPointPair End element point.
602
+ * @param capDirection Outward cap direction.
603
+ * @param traits Mutable renderer traits.
604
+ * @param originalColor Original trait color.
605
+ * @param originalRgbColor Original trait RGB.
606
+ * @param originalLineType Original trait linetype.
607
+ * @param mlineStyle Resolved style object.
608
+ * @returns Arc entity, or `undefined` when arc cannot be constructed.
609
+ */
610
+ private drawCapArcBetweenElements;
611
+ /**
612
+ * Applies per-element traits while restoring baseline traits first.
613
+ *
614
+ * @param traits Mutable renderer traits.
615
+ * @param originalColor Original trait color.
616
+ * @param originalRgbColor Original trait RGB.
617
+ * @param originalLineType Original trait linetype.
618
+ * @param mlineStyle Resolved style object.
619
+ * @param elementIndex Style element index.
620
+ */
621
+ private applyElementDrawTraits;
622
+ /**
623
+ * Transforms a vector by matrix rotation/scale only.
624
+ * Translation is canceled by transforming an origin-endpoint pair.
625
+ *
626
+ * @param vector Vector to transform in place.
627
+ * @param matrix Transformation matrix.
628
+ */
118
629
  private transformVector;
630
+ /**
631
+ * Resolves the effective MLINE style from database dictionary.
632
+ * Lookup order: handle, exact name, then case-insensitive name match.
633
+ *
634
+ * @returns Matching style object, or `undefined` when no style is found.
635
+ */
119
636
  private getMLineStyle;
637
+ /**
638
+ * Applies style-element color and linetype traits to renderer traits.
639
+ * BYBLOCK and BYLAYER colors are ignored.
640
+ *
641
+ * @param mlineStyle Resolved style object.
642
+ * @param elementIndex Style element index.
643
+ * @param traits Mutable renderer trait set.
644
+ */
120
645
  private applyStyleElementTraits;
646
+ /**
647
+ * Applies fill color traits from style definition to the renderer traits object.
648
+ * BYBLOCK and BYLAYER colors are ignored.
649
+ *
650
+ * @param mlineStyle Resolved style object.
651
+ * @param traits Mutable renderer trait set.
652
+ */
653
+ private applyFillTraits;
654
+ /**
655
+ * Resolves a style-element linetype token to concrete renderer linetype traits.
656
+ *
657
+ * @param rawLineType Style element linetype token.
658
+ * @returns Resolved linetype traits, or `undefined` when no override is needed.
659
+ */
660
+ private resolveStyleElementLineType;
661
+ /**
662
+ * @inheritdoc
663
+ */
664
+ resolveEffectiveProperties(): void;
665
+ /**
666
+ * Resolves the default style name for newly created MLINE entities.
667
+ */
668
+ private getDefaultStyleName;
121
669
  }
122
670
  //# sourceMappingURL=AcDbMLine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AcDbMLine.d.ts","sourceRoot":"","sources":["../../src/entity/AcDbMLine.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,YAAY,EACZ,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EACjB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,oBAAY,sBAAsB;IAChC,GAAG,IAAI;IACP,IAAI,IAAI;IACR,MAAM,IAAI;CACX;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,SAAS,IAAI;IACb,MAAM,IAAI;IACV,iBAAiB,IAAI;IACrB,eAAe,IAAI;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,cAA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