@ifc-lite/drawing-2d 1.4.0

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 (158) hide show
  1. package/LICENSE +373 -0
  2. package/dist/drawing-generator.d.ts +80 -0
  3. package/dist/drawing-generator.d.ts.map +1 -0
  4. package/dist/drawing-generator.js +281 -0
  5. package/dist/drawing-generator.js.map +1 -0
  6. package/dist/edge-extractor.d.ts +47 -0
  7. package/dist/edge-extractor.d.ts.map +1 -0
  8. package/dist/edge-extractor.js +204 -0
  9. package/dist/edge-extractor.js.map +1 -0
  10. package/dist/gpu-section-cutter.d.ts +42 -0
  11. package/dist/gpu-section-cutter.d.ts.map +1 -0
  12. package/dist/gpu-section-cutter.js +405 -0
  13. package/dist/gpu-section-cutter.js.map +1 -0
  14. package/dist/graphic-overrides/index.d.ts +10 -0
  15. package/dist/graphic-overrides/index.d.ts.map +1 -0
  16. package/dist/graphic-overrides/index.js +8 -0
  17. package/dist/graphic-overrides/index.js.map +1 -0
  18. package/dist/graphic-overrides/presets.d.ts +22 -0
  19. package/dist/graphic-overrides/presets.d.ts.map +1 -0
  20. package/dist/graphic-overrides/presets.js +283 -0
  21. package/dist/graphic-overrides/presets.js.map +1 -0
  22. package/dist/graphic-overrides/rule-engine.d.ts +64 -0
  23. package/dist/graphic-overrides/rule-engine.d.ts.map +1 -0
  24. package/dist/graphic-overrides/rule-engine.js +438 -0
  25. package/dist/graphic-overrides/rule-engine.js.map +1 -0
  26. package/dist/graphic-overrides/types.d.ts +200 -0
  27. package/dist/graphic-overrides/types.d.ts.map +1 -0
  28. package/dist/graphic-overrides/types.js +5 -0
  29. package/dist/graphic-overrides/types.js.map +1 -0
  30. package/dist/hatch-generator.d.ts +76 -0
  31. package/dist/hatch-generator.d.ts.map +1 -0
  32. package/dist/hatch-generator.js +282 -0
  33. package/dist/hatch-generator.js.map +1 -0
  34. package/dist/hidden-line.d.ts +64 -0
  35. package/dist/hidden-line.d.ts.map +1 -0
  36. package/dist/hidden-line.js +318 -0
  37. package/dist/hidden-line.js.map +1 -0
  38. package/dist/index.d.ts +44 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +109 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/line-merger.d.ts +35 -0
  43. package/dist/line-merger.d.ts.map +1 -0
  44. package/dist/line-merger.js +265 -0
  45. package/dist/line-merger.js.map +1 -0
  46. package/dist/math.d.ts +90 -0
  47. package/dist/math.d.ts.map +1 -0
  48. package/dist/math.js +284 -0
  49. package/dist/math.js.map +1 -0
  50. package/dist/openings/index.d.ts +7 -0
  51. package/dist/openings/index.d.ts.map +1 -0
  52. package/dist/openings/index.js +10 -0
  53. package/dist/openings/index.js.map +1 -0
  54. package/dist/openings/opening-filter.d.ts +61 -0
  55. package/dist/openings/opening-filter.d.ts.map +1 -0
  56. package/dist/openings/opening-filter.js +244 -0
  57. package/dist/openings/opening-filter.js.map +1 -0
  58. package/dist/openings/opening-relationship-builder.d.ts +35 -0
  59. package/dist/openings/opening-relationship-builder.d.ts.map +1 -0
  60. package/dist/openings/opening-relationship-builder.js +121 -0
  61. package/dist/openings/opening-relationship-builder.js.map +1 -0
  62. package/dist/openings/opening-utils.d.ts +55 -0
  63. package/dist/openings/opening-utils.d.ts.map +1 -0
  64. package/dist/openings/opening-utils.js +128 -0
  65. package/dist/openings/opening-utils.js.map +1 -0
  66. package/dist/polygon-builder.d.ts +62 -0
  67. package/dist/polygon-builder.d.ts.map +1 -0
  68. package/dist/polygon-builder.js +261 -0
  69. package/dist/polygon-builder.js.map +1 -0
  70. package/dist/section-cutter.d.ts +49 -0
  71. package/dist/section-cutter.d.ts.map +1 -0
  72. package/dist/section-cutter.js +220 -0
  73. package/dist/section-cutter.js.map +1 -0
  74. package/dist/sheet/frame-renderer.d.ts +28 -0
  75. package/dist/sheet/frame-renderer.d.ts.map +1 -0
  76. package/dist/sheet/frame-renderer.js +199 -0
  77. package/dist/sheet/frame-renderer.js.map +1 -0
  78. package/dist/sheet/frame-types.d.ts +57 -0
  79. package/dist/sheet/frame-types.d.ts.map +1 -0
  80. package/dist/sheet/frame-types.js +88 -0
  81. package/dist/sheet/frame-types.js.map +1 -0
  82. package/dist/sheet/index.d.ts +26 -0
  83. package/dist/sheet/index.d.ts.map +1 -0
  84. package/dist/sheet/index.js +12 -0
  85. package/dist/sheet/index.js.map +1 -0
  86. package/dist/sheet/paper-sizes.d.ts +36 -0
  87. package/dist/sheet/paper-sizes.d.ts.map +1 -0
  88. package/dist/sheet/paper-sizes.js +252 -0
  89. package/dist/sheet/paper-sizes.js.map +1 -0
  90. package/dist/sheet/scale-bar-renderer.d.ts +29 -0
  91. package/dist/sheet/scale-bar-renderer.d.ts.map +1 -0
  92. package/dist/sheet/scale-bar-renderer.js +287 -0
  93. package/dist/sheet/scale-bar-renderer.js.map +1 -0
  94. package/dist/sheet/scale-bar-types.d.ts +82 -0
  95. package/dist/sheet/scale-bar-types.d.ts.map +1 -0
  96. package/dist/sheet/scale-bar-types.js +66 -0
  97. package/dist/sheet/scale-bar-types.js.map +1 -0
  98. package/dist/sheet/sheet-types.d.ts +84 -0
  99. package/dist/sheet/sheet-types.d.ts.map +1 -0
  100. package/dist/sheet/sheet-types.js +77 -0
  101. package/dist/sheet/sheet-types.js.map +1 -0
  102. package/dist/sheet/title-block-renderer.d.ts +44 -0
  103. package/dist/sheet/title-block-renderer.d.ts.map +1 -0
  104. package/dist/sheet/title-block-renderer.js +335 -0
  105. package/dist/sheet/title-block-renderer.js.map +1 -0
  106. package/dist/sheet/title-block-types.d.ts +100 -0
  107. package/dist/sheet/title-block-types.d.ts.map +1 -0
  108. package/dist/sheet/title-block-types.js +174 -0
  109. package/dist/sheet/title-block-types.js.map +1 -0
  110. package/dist/styles.d.ts +77 -0
  111. package/dist/styles.d.ts.map +1 -0
  112. package/dist/styles.js +347 -0
  113. package/dist/styles.js.map +1 -0
  114. package/dist/styling/index.d.ts +7 -0
  115. package/dist/styling/index.d.ts.map +1 -0
  116. package/dist/styling/index.js +10 -0
  117. package/dist/styling/index.js.map +1 -0
  118. package/dist/styling/layer-mapping.d.ts +57 -0
  119. package/dist/styling/layer-mapping.d.ts.map +1 -0
  120. package/dist/styling/layer-mapping.js +303 -0
  121. package/dist/styling/layer-mapping.js.map +1 -0
  122. package/dist/styling/line-styles.d.ts +49 -0
  123. package/dist/styling/line-styles.d.ts.map +1 -0
  124. package/dist/styling/line-styles.js +123 -0
  125. package/dist/styling/line-styles.js.map +1 -0
  126. package/dist/styling/line-weights.d.ts +61 -0
  127. package/dist/styling/line-weights.d.ts.map +1 -0
  128. package/dist/styling/line-weights.js +183 -0
  129. package/dist/styling/line-weights.js.map +1 -0
  130. package/dist/svg-exporter.d.ts +63 -0
  131. package/dist/svg-exporter.d.ts.map +1 -0
  132. package/dist/svg-exporter.js +278 -0
  133. package/dist/svg-exporter.js.map +1 -0
  134. package/dist/symbols/door-symbol.d.ts +82 -0
  135. package/dist/symbols/door-symbol.d.ts.map +1 -0
  136. package/dist/symbols/door-symbol.js +390 -0
  137. package/dist/symbols/door-symbol.js.map +1 -0
  138. package/dist/symbols/index.d.ts +8 -0
  139. package/dist/symbols/index.d.ts.map +1 -0
  140. package/dist/symbols/index.js +11 -0
  141. package/dist/symbols/index.js.map +1 -0
  142. package/dist/symbols/symbol-renderer.d.ts +29 -0
  143. package/dist/symbols/symbol-renderer.d.ts.map +1 -0
  144. package/dist/symbols/symbol-renderer.js +173 -0
  145. package/dist/symbols/symbol-renderer.js.map +1 -0
  146. package/dist/symbols/symbol-utils.d.ts +48 -0
  147. package/dist/symbols/symbol-utils.d.ts.map +1 -0
  148. package/dist/symbols/symbol-utils.js +129 -0
  149. package/dist/symbols/symbol-utils.js.map +1 -0
  150. package/dist/symbols/window-symbol.d.ts +57 -0
  151. package/dist/symbols/window-symbol.d.ts.map +1 -0
  152. package/dist/symbols/window-symbol.js +209 -0
  153. package/dist/symbols/window-symbol.js.map +1 -0
  154. package/dist/types.d.ts +443 -0
  155. package/dist/types.d.ts.map +1 -0
  156. package/dist/types.js +31 -0
  157. package/dist/types.js.map +1 -0
  158. package/package.json +53 -0
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Drawing Styles - Hatch patterns and line styles for architectural drawings
3
+ *
4
+ * Based on ISO 128-50 and common CAD conventions for BIM drawings.
5
+ */
6
+ import type { LineCategory } from './types';
7
+ export type HatchPatternType = 'solid' | 'diagonal' | 'cross-hatch' | 'horizontal' | 'vertical' | 'brick' | 'concrete' | 'insulation' | 'earth' | 'wood' | 'steel' | 'glass' | 'none';
8
+ export interface HatchPattern {
9
+ /** Pattern type */
10
+ type: HatchPatternType;
11
+ /** Line spacing in mm at 1:1 scale */
12
+ spacing: number;
13
+ /** Primary angle in degrees */
14
+ angle: number;
15
+ /** Line weight in mm */
16
+ lineWeight: number;
17
+ /** Line color (hex) */
18
+ strokeColor: string;
19
+ /** Fill color for solid fills (hex with alpha) */
20
+ fillColor?: string;
21
+ /** Secondary angle for cross-hatch patterns */
22
+ secondaryAngle?: number;
23
+ }
24
+ /**
25
+ * ISO 128-50 / BS 1192 standard architectural hatch patterns
26
+ * Maps IFC types to appropriate patterns
27
+ */
28
+ export declare const HATCH_PATTERNS: Record<string, HatchPattern>;
29
+ /**
30
+ * Get hatch pattern for an IFC type
31
+ */
32
+ export declare function getHatchPattern(ifcType: string): HatchPattern;
33
+ export interface LineStyle {
34
+ /** Line weight in mm */
35
+ weight: number;
36
+ /** Stroke color (hex) */
37
+ color: string;
38
+ /** Dash pattern [dash, gap, ...] in mm. Empty = solid */
39
+ dashPattern: number[];
40
+ /** Line cap style */
41
+ lineCap: 'butt' | 'round' | 'square';
42
+ /** Line join style */
43
+ lineJoin: 'miter' | 'round' | 'bevel';
44
+ }
45
+ /**
46
+ * ISO 128 standard line weights and styles by category
47
+ */
48
+ export declare const LINE_STYLES: Record<LineCategory, LineStyle>;
49
+ /**
50
+ * Per-IFC-type line weight overrides
51
+ */
52
+ export declare const TYPE_LINE_WEIGHTS: Record<string, Partial<Record<LineCategory, number>>>;
53
+ /**
54
+ * Get line style for a category and optional IFC type override
55
+ */
56
+ export declare function getLineStyle(category: LineCategory, ifcType?: string): LineStyle;
57
+ export interface DrawingScale {
58
+ /** Display name */
59
+ name: string;
60
+ /** Scale factor (e.g., 100 for 1:100) */
61
+ factor: number;
62
+ /** Typical use case */
63
+ useCase: string;
64
+ }
65
+ export declare const COMMON_SCALES: DrawingScale[];
66
+ /**
67
+ * Get recommended scale for a given bounding box size
68
+ */
69
+ export declare function getRecommendedScale(boundsWidth: number, boundsHeight: number, paperWidth?: number, // A3 landscape
70
+ paperHeight?: number): DrawingScale;
71
+ export interface PaperSize {
72
+ name: string;
73
+ width: number;
74
+ height: number;
75
+ }
76
+ export declare const PAPER_SIZES: Record<string, PaperSize>;
77
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAM5C,MAAM,MAAM,gBAAgB,GACxB,OAAO,GACP,UAAU,GACV,aAAa,GACb,YAAY,GACZ,UAAU,GACV,OAAO,GACP,UAAU,GACV,YAAY,GACZ,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,WAAW,YAAY;IAC3B,mBAAmB;IACnB,IAAI,EAAE,gBAAgB,CAAC;IACvB,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AAC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AAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAWjD,CAAC"}
package/dist/styles.js ADDED
@@ -0,0 +1,347 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ /**
5
+ * ISO 128-50 / BS 1192 standard architectural hatch patterns
6
+ * Maps IFC types to appropriate patterns
7
+ */
8
+ export const HATCH_PATTERNS = {
9
+ // ─────────────────────────────────────────────────────────────────────────
10
+ // WALLS
11
+ // ─────────────────────────────────────────────────────────────────────────
12
+ IfcWall: {
13
+ type: 'diagonal',
14
+ spacing: 3.0,
15
+ angle: 45,
16
+ lineWeight: 0.18,
17
+ strokeColor: '#000000',
18
+ },
19
+ IfcWallStandardCase: {
20
+ type: 'diagonal',
21
+ spacing: 3.0,
22
+ angle: 45,
23
+ lineWeight: 0.18,
24
+ strokeColor: '#000000',
25
+ },
26
+ IfcCurtainWall: {
27
+ type: 'none',
28
+ spacing: 0,
29
+ angle: 0,
30
+ lineWeight: 0.13,
31
+ strokeColor: '#0066CC',
32
+ },
33
+ // ─────────────────────────────────────────────────────────────────────────
34
+ // SLABS & FLOORS
35
+ // ─────────────────────────────────────────────────────────────────────────
36
+ IfcSlab: {
37
+ type: 'concrete',
38
+ spacing: 2.5,
39
+ angle: 0,
40
+ lineWeight: 0.13,
41
+ strokeColor: '#666666',
42
+ },
43
+ IfcRoof: {
44
+ type: 'cross-hatch',
45
+ spacing: 4.0,
46
+ angle: 45,
47
+ secondaryAngle: -45,
48
+ lineWeight: 0.13,
49
+ strokeColor: '#8B4513',
50
+ },
51
+ IfcCovering: {
52
+ type: 'horizontal',
53
+ spacing: 8.0,
54
+ angle: 0,
55
+ lineWeight: 0.09,
56
+ strokeColor: '#999999',
57
+ },
58
+ // ─────────────────────────────────────────────────────────────────────────
59
+ // STRUCTURAL
60
+ // ─────────────────────────────────────────────────────────────────────────
61
+ IfcColumn: {
62
+ type: 'steel',
63
+ spacing: 2.0,
64
+ angle: 45,
65
+ lineWeight: 0.25,
66
+ strokeColor: '#333333',
67
+ },
68
+ IfcBeam: {
69
+ type: 'steel',
70
+ spacing: 2.0,
71
+ angle: 45,
72
+ lineWeight: 0.25,
73
+ strokeColor: '#333333',
74
+ },
75
+ IfcMember: {
76
+ type: 'diagonal',
77
+ spacing: 2.5,
78
+ angle: 45,
79
+ lineWeight: 0.18,
80
+ strokeColor: '#444444',
81
+ },
82
+ IfcPlate: {
83
+ type: 'steel',
84
+ spacing: 1.5,
85
+ angle: 45,
86
+ lineWeight: 0.18,
87
+ strokeColor: '#555555',
88
+ },
89
+ IfcFooting: {
90
+ type: 'concrete',
91
+ spacing: 3.0,
92
+ angle: 0,
93
+ lineWeight: 0.18,
94
+ strokeColor: '#777777',
95
+ },
96
+ IfcPile: {
97
+ type: 'concrete',
98
+ spacing: 2.5,
99
+ angle: 0,
100
+ lineWeight: 0.18,
101
+ strokeColor: '#666666',
102
+ },
103
+ // ─────────────────────────────────────────────────────────────────────────
104
+ // OPENINGS
105
+ // ─────────────────────────────────────────────────────────────────────────
106
+ IfcWindow: {
107
+ type: 'glass',
108
+ spacing: 0,
109
+ angle: 0,
110
+ lineWeight: 0.13,
111
+ strokeColor: '#0099CC',
112
+ fillColor: 'rgba(200, 230, 255, 0.3)',
113
+ },
114
+ IfcDoor: {
115
+ type: 'none',
116
+ spacing: 0,
117
+ angle: 0,
118
+ lineWeight: 0.25,
119
+ strokeColor: '#000000',
120
+ },
121
+ IfcOpeningElement: {
122
+ type: 'none',
123
+ spacing: 0,
124
+ angle: 0,
125
+ lineWeight: 0.13,
126
+ strokeColor: '#CCCCCC',
127
+ },
128
+ // ─────────────────────────────────────────────────────────────────────────
129
+ // STAIRS & CIRCULATION
130
+ // ─────────────────────────────────────────────────────────────────────────
131
+ IfcStair: {
132
+ type: 'horizontal',
133
+ spacing: 5.0,
134
+ angle: 0,
135
+ lineWeight: 0.18,
136
+ strokeColor: '#444444',
137
+ },
138
+ IfcStairFlight: {
139
+ type: 'horizontal',
140
+ spacing: 5.0,
141
+ angle: 0,
142
+ lineWeight: 0.18,
143
+ strokeColor: '#444444',
144
+ },
145
+ IfcRamp: {
146
+ type: 'diagonal',
147
+ spacing: 6.0,
148
+ angle: 30,
149
+ lineWeight: 0.13,
150
+ strokeColor: '#555555',
151
+ },
152
+ IfcRailing: {
153
+ type: 'none',
154
+ spacing: 0,
155
+ angle: 0,
156
+ lineWeight: 0.13,
157
+ strokeColor: '#666666',
158
+ },
159
+ // ─────────────────────────────────────────────────────────────────────────
160
+ // MEP
161
+ // ─────────────────────────────────────────────────────────────────────────
162
+ IfcFlowTerminal: {
163
+ type: 'none',
164
+ spacing: 0,
165
+ angle: 0,
166
+ lineWeight: 0.13,
167
+ strokeColor: '#0066AA',
168
+ },
169
+ IfcFlowSegment: {
170
+ type: 'none',
171
+ spacing: 0,
172
+ angle: 0,
173
+ lineWeight: 0.18,
174
+ strokeColor: '#0066AA',
175
+ },
176
+ IfcDistributionElement: {
177
+ type: 'none',
178
+ spacing: 0,
179
+ angle: 0,
180
+ lineWeight: 0.13,
181
+ strokeColor: '#006688',
182
+ },
183
+ // ─────────────────────────────────────────────────────────────────────────
184
+ // SPACES & FURNISHING
185
+ // ─────────────────────────────────────────────────────────────────────────
186
+ IfcSpace: {
187
+ type: 'none',
188
+ spacing: 0,
189
+ angle: 0,
190
+ lineWeight: 0.09,
191
+ strokeColor: '#CCCCCC',
192
+ },
193
+ IfcFurnishingElement: {
194
+ type: 'none',
195
+ spacing: 0,
196
+ angle: 0,
197
+ lineWeight: 0.13,
198
+ strokeColor: '#888888',
199
+ },
200
+ IfcFurniture: {
201
+ type: 'none',
202
+ spacing: 0,
203
+ angle: 0,
204
+ lineWeight: 0.13,
205
+ strokeColor: '#888888',
206
+ },
207
+ // ─────────────────────────────────────────────────────────────────────────
208
+ // DEFAULT
209
+ // ─────────────────────────────────────────────────────────────────────────
210
+ default: {
211
+ type: 'diagonal',
212
+ spacing: 4.0,
213
+ angle: 45,
214
+ lineWeight: 0.13,
215
+ strokeColor: '#666666',
216
+ },
217
+ };
218
+ /**
219
+ * Get hatch pattern for an IFC type
220
+ */
221
+ export function getHatchPattern(ifcType) {
222
+ return HATCH_PATTERNS[ifcType] || HATCH_PATTERNS['default'];
223
+ }
224
+ /**
225
+ * ISO 128 standard line weights and styles by category
226
+ */
227
+ export const LINE_STYLES = {
228
+ cut: {
229
+ weight: 0.5,
230
+ color: '#000000',
231
+ dashPattern: [],
232
+ lineCap: 'round',
233
+ lineJoin: 'round',
234
+ },
235
+ projection: {
236
+ weight: 0.25,
237
+ color: '#000000',
238
+ dashPattern: [],
239
+ lineCap: 'round',
240
+ lineJoin: 'round',
241
+ },
242
+ hidden: {
243
+ weight: 0.18,
244
+ color: '#666666',
245
+ dashPattern: [2, 1],
246
+ lineCap: 'butt',
247
+ lineJoin: 'round',
248
+ },
249
+ silhouette: {
250
+ weight: 0.35,
251
+ color: '#000000',
252
+ dashPattern: [],
253
+ lineCap: 'round',
254
+ lineJoin: 'round',
255
+ },
256
+ crease: {
257
+ weight: 0.18,
258
+ color: '#000000',
259
+ dashPattern: [],
260
+ lineCap: 'round',
261
+ lineJoin: 'round',
262
+ },
263
+ boundary: {
264
+ weight: 0.25,
265
+ color: '#000000',
266
+ dashPattern: [],
267
+ lineCap: 'round',
268
+ lineJoin: 'round',
269
+ },
270
+ annotation: {
271
+ weight: 0.13,
272
+ color: '#000000',
273
+ dashPattern: [],
274
+ lineCap: 'butt',
275
+ lineJoin: 'miter',
276
+ },
277
+ };
278
+ /**
279
+ * Per-IFC-type line weight overrides
280
+ */
281
+ export const TYPE_LINE_WEIGHTS = {
282
+ IfcWall: { cut: 0.7, projection: 0.35 },
283
+ IfcWallStandardCase: { cut: 0.7, projection: 0.35 },
284
+ IfcSlab: { cut: 0.5, projection: 0.25 },
285
+ IfcColumn: { cut: 0.5, projection: 0.35 },
286
+ IfcBeam: { cut: 0.5, projection: 0.35 },
287
+ IfcWindow: { cut: 0.35, projection: 0.18 },
288
+ IfcDoor: { cut: 0.35, projection: 0.25 },
289
+ IfcStair: { cut: 0.35, projection: 0.25 },
290
+ IfcFurnishingElement: { cut: 0.18, projection: 0.13 },
291
+ IfcFurniture: { cut: 0.18, projection: 0.13 },
292
+ IfcSpace: { cut: 0.09, projection: 0.09 },
293
+ };
294
+ /**
295
+ * Get line style for a category and optional IFC type override
296
+ */
297
+ export function getLineStyle(category, ifcType) {
298
+ const baseStyle = LINE_STYLES[category];
299
+ if (ifcType && TYPE_LINE_WEIGHTS[ifcType]) {
300
+ const override = TYPE_LINE_WEIGHTS[ifcType][category];
301
+ if (override !== undefined) {
302
+ return { ...baseStyle, weight: override };
303
+ }
304
+ }
305
+ return baseStyle;
306
+ }
307
+ export const COMMON_SCALES = [
308
+ { name: '1:1', factor: 1, useCase: 'Full size details' },
309
+ { name: '1:2', factor: 2, useCase: 'Large details' },
310
+ { name: '1:5', factor: 5, useCase: 'Construction details' },
311
+ { name: '1:10', factor: 10, useCase: 'Details' },
312
+ { name: '1:20', factor: 20, useCase: 'Room plans, sections' },
313
+ { name: '1:50', factor: 50, useCase: 'Floor plans, elevations' },
314
+ { name: '1:100', factor: 100, useCase: 'Building plans' },
315
+ { name: '1:200', factor: 200, useCase: 'Site plans' },
316
+ { name: '1:500', factor: 500, useCase: 'Site context' },
317
+ { name: '1:1000', factor: 1000, useCase: 'Urban context' },
318
+ ];
319
+ /**
320
+ * Get recommended scale for a given bounding box size
321
+ */
322
+ export function getRecommendedScale(boundsWidth, boundsHeight, paperWidth = 420, // A3 landscape
323
+ paperHeight = 297) {
324
+ const maxDimension = Math.max(boundsWidth, boundsHeight);
325
+ // Find smallest scale that fits
326
+ for (const scale of COMMON_SCALES) {
327
+ const scaledWidth = boundsWidth / scale.factor;
328
+ const scaledHeight = boundsHeight / scale.factor;
329
+ if (scaledWidth <= paperWidth * 0.9 && scaledHeight <= paperHeight * 0.9) {
330
+ return scale;
331
+ }
332
+ }
333
+ return COMMON_SCALES[COMMON_SCALES.length - 1];
334
+ }
335
+ export const PAPER_SIZES = {
336
+ A4: { name: 'A4', width: 210, height: 297 },
337
+ A4_LANDSCAPE: { name: 'A4 Landscape', width: 297, height: 210 },
338
+ A3: { name: 'A3', width: 297, height: 420 },
339
+ A3_LANDSCAPE: { name: 'A3 Landscape', width: 420, height: 297 },
340
+ A2: { name: 'A2', width: 420, height: 594 },
341
+ A2_LANDSCAPE: { name: 'A2 Landscape', width: 594, height: 420 },
342
+ A1: { name: 'A1', width: 594, height: 841 },
343
+ A1_LANDSCAPE: { name: 'A1 Landscape', width: 841, height: 594 },
344
+ A0: { name: 'A0', width: 841, height: 1189 },
345
+ A0_LANDSCAPE: { name: 'A0 Landscape', width: 1189, height: 841 },
346
+ };
347
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA8C/D;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAiC;IAC1D,4EAA4E;IAC5E,QAAQ;IACR,4EAA4E;IAC5E,OAAO,EAAE;QACP,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,GAAG;QACZ,KAAK,EAAE,EAAE;QACT,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,SAAS;KACvB;IACD,mBAAmB,EAAE;QACnB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,GAAG;QACZ,KAAK,EAAE,EAAE;QACT,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,SAAS;KACvB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,CAAC;QACV,KAAK,EAAE,CAAC;QACR,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,SAAS;KACvB;IAED,4EAA4E;IAC5E,iBAAiB;I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 -0,0 +1,7 @@
1
+ /**
2
+ * Line styling and layer mapping for architectural drawings
3
+ */
4
+ export { LineWeightAssigner, LINE_WEIGHT_CONFIG, IFC_TYPE_WEIGHTS } from './line-weights';
5
+ export { LineStyler, DASH_PATTERNS } from './line-styles';
6
+ export { LayerMapper, DEFAULT_LAYERS, getLayerForIfcType } from './layer-mapping';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styling/index.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ /**
5
+ * Line styling and layer mapping for architectural drawings
6
+ */
7
+ export { LineWeightAssigner, LINE_WEIGHT_CONFIG, IFC_TYPE_WEIGHTS } from './line-weights';
8
+ export { LineStyler, DASH_PATTERNS } from './line-styles';
9
+ export { LayerMapper, DEFAULT_LAYERS, getLayerForIfcType } from './layer-mapping';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/styling/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Layer mapping for architectural drawings
3
+ *
4
+ * Maps IFC types and semantic line types to AIA-standard layers
5
+ * for organized SVG/CAD export.
6
+ */
7
+ import type { LayerDefinition, AIALayerCode, SemanticLineType, ArchitecturalLine } from '../types';
8
+ /**
9
+ * Default layer definitions following AIA CAD Layer Guidelines
10
+ */
11
+ export declare const DEFAULT_LAYERS: LayerDefinition[];
12
+ /**
13
+ * Layer mapper for organizing lines by layer
14
+ */
15
+ export declare class LayerMapper {
16
+ private layers;
17
+ private layerById;
18
+ private layerByCode;
19
+ constructor(layers?: LayerDefinition[]);
20
+ /**
21
+ * Get layer for an IFC type
22
+ */
23
+ getLayerForIfcType(ifcType: string): LayerDefinition | undefined;
24
+ /**
25
+ * Get layer for a semantic line type
26
+ */
27
+ getLayerForSemanticType(semanticType: SemanticLineType): LayerDefinition | undefined;
28
+ /**
29
+ * Get layer for an architectural line
30
+ */
31
+ getLayerForLine(line: ArchitecturalLine): LayerDefinition;
32
+ /**
33
+ * Group lines by layer
34
+ */
35
+ groupLinesByLayer(lines: ArchitecturalLine[]): Map<LayerDefinition, ArchitecturalLine[]>;
36
+ /**
37
+ * Get all layer definitions
38
+ */
39
+ getLayers(): LayerDefinition[];
40
+ /**
41
+ * Get layer by ID
42
+ */
43
+ getLayerById(id: string): LayerDefinition | undefined;
44
+ /**
45
+ * Get layer by AIA code
46
+ */
47
+ getLayerByCode(code: AIALayerCode): LayerDefinition | undefined;
48
+ }
49
+ /**
50
+ * Get AIA layer code for an IFC type
51
+ */
52
+ export declare function getLayerForIfcType(ifcType: string): AIALayerCode;
53
+ /**
54
+ * Create a default layer mapper
55
+ */
56
+ export declare function createLayerMapper(customLayers?: LayerDefinition[]): LayerMapper;
57
+ //# sourceMappingURL=layer-mapping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer-mapping.d.ts","sourceRoot":"","sources":["../../src/styling/layer-mapping.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EAElB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,eAAe,EAiI3C,CAAC;AAkFF;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,WAAW,CAAqC;gBAE5C,MAAM,GAAE,eAAe,EAAmB;IAMtD;;OAEG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAQhE;;OAEG;IACH,uBAAuB,CAAC,YAAY,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS;IAQpF;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,eAAe;IAkBzD;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,GAAG,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC;IAgBxF;;OAEG;IACH,SAAS,IAAI,eAAe,EAAE;IAI9B;;OAEG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAIrD;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,eAAe,GAAG,SAAS;CAGhE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAEhE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,CAAC,EAAE,eAAe,EAAE,GAC/B,WAAW,CAEb"}