@build-qube/takeoff-calculator 2.1.0 → 2.3.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.
- package/README.md +4 -0
- package/browser.js +1 -1
- package/index.d.ts +351 -270
- package/index.js +754 -750
- package/package.json +14 -13
package/index.d.ts
CHANGED
|
@@ -1,190 +1,238 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export declare class ContourWrapper {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
4
|
+
/** Create a new contour wrapper from a contour input. */
|
|
5
|
+
constructor(contour: ContourInput);
|
|
6
|
+
/**
|
|
7
|
+
* Set the scale of the contour.
|
|
8
|
+
* This will rebuild the surface mesh.
|
|
9
|
+
*/
|
|
10
|
+
setScale(scale: Scale): void;
|
|
11
|
+
/** Get the id of the contour. */
|
|
12
|
+
get id(): string;
|
|
13
|
+
/** Get the page id of the contour. */
|
|
14
|
+
get pageId(): string;
|
|
15
|
+
/** Get the scale of the contour. */
|
|
16
|
+
get scale(): Scale | null;
|
|
17
|
+
/** Get the surface points of the contour. */
|
|
18
|
+
getSurfacePoints(): Array<Point3D> | null;
|
|
19
|
+
/** Get the z value at the given x and y coordinates. */
|
|
20
|
+
getZAt(x: number, y: number): number | null;
|
|
21
|
+
/** Get the scatter data of the contour. */
|
|
22
|
+
getScatterData(step: number): Array<Point3D> | null;
|
|
23
|
+
/** Get scaled scatter data of the contour. */
|
|
24
|
+
getRealWorldScatterData(step: number): Array<Point3D> | null;
|
|
25
|
+
/** Compute raw cut/fill volume (pixel-space values) against a reference surface. */
|
|
26
|
+
rawVolumeAgainst(
|
|
27
|
+
reference: ReferenceSurfaceInput,
|
|
28
|
+
cellSize?: number | undefined | null,
|
|
29
|
+
): VolumetricResult | null;
|
|
30
|
+
/**
|
|
31
|
+
* Compute unit-aware cut/fill volume against a reference surface.
|
|
32
|
+
* Returns None if surface mesh or scale is not available.
|
|
33
|
+
*/
|
|
34
|
+
volumeAgainst(
|
|
35
|
+
reference: ReferenceSurfaceInput,
|
|
36
|
+
cellSize?: number | undefined | null,
|
|
37
|
+
): VolumetricUnitResult | null;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
export declare class GroupWrapper {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
/** Get the id of the group. */
|
|
42
|
+
get id(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Get the area for this group.
|
|
45
|
+
*
|
|
46
|
+
* Returns `None` if the area has not been computed or if the mutex is poisoned.
|
|
47
|
+
*/
|
|
48
|
+
get area(): UnitValue | null;
|
|
49
|
+
/**
|
|
50
|
+
* Get the length for this group.
|
|
51
|
+
*
|
|
52
|
+
* Returns `None` if the length has not been computed or if the mutex is poisoned.
|
|
53
|
+
*/
|
|
54
|
+
get length(): UnitValue | null;
|
|
55
|
+
/**
|
|
56
|
+
* Get the points count for this group.
|
|
57
|
+
*
|
|
58
|
+
* Returns `None` if the points count has not been computed or if the mutex is poisoned.
|
|
59
|
+
*/
|
|
60
|
+
get points(): number | null;
|
|
61
|
+
/**
|
|
62
|
+
* Get the count for this group.
|
|
63
|
+
*
|
|
64
|
+
* Returns `None` if the count has not been computed or if the mutex is poisoned.
|
|
65
|
+
*/
|
|
66
|
+
get count(): number | null;
|
|
67
|
+
get group(): Group;
|
|
44
68
|
}
|
|
45
69
|
|
|
46
70
|
export declare class MeasurementWrapper {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
71
|
+
get points(): number;
|
|
72
|
+
get count(): number;
|
|
73
|
+
get measurement(): Measurement;
|
|
74
|
+
get area(): UnitValue | null;
|
|
75
|
+
convertArea(unit: Unit): number | null;
|
|
76
|
+
convertLength(unit: Unit): number | null;
|
|
77
|
+
get length(): UnitValue | null;
|
|
78
|
+
get scale(): Scale | null;
|
|
79
|
+
get id(): string;
|
|
80
|
+
get pageId(): string;
|
|
81
|
+
get groupId(): string;
|
|
82
|
+
get rawArea(): number;
|
|
83
|
+
get rawPerimeter(): number;
|
|
59
84
|
}
|
|
60
85
|
|
|
61
86
|
export declare class TakeoffStateHandler {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Creates a new state.
|
|
89
|
+
*
|
|
90
|
+
* # Arguments
|
|
91
|
+
*
|
|
92
|
+
* * `options` - The options for the state.
|
|
93
|
+
*
|
|
94
|
+
* # Returns
|
|
95
|
+
*
|
|
96
|
+
* * `State` - The new state.
|
|
97
|
+
*/
|
|
98
|
+
constructor(options?: StateOptions | undefined | null);
|
|
99
|
+
getMeasurementsByGroupId(groupId: string): Array<MeasurementWrapper>;
|
|
100
|
+
/**
|
|
101
|
+
* Get the measurements by page id.
|
|
102
|
+
*
|
|
103
|
+
* # Arguments
|
|
104
|
+
*
|
|
105
|
+
* * `page_id` - The id of the page.
|
|
106
|
+
*
|
|
107
|
+
* # Returns
|
|
108
|
+
*
|
|
109
|
+
* * `Vec<MeasurementWrapper>` - The measurements that are on the page.
|
|
110
|
+
*/
|
|
111
|
+
getMeasurementsByPageId(pageId: string): Array<MeasurementWrapper>;
|
|
112
|
+
/**
|
|
113
|
+
* Get the scale for a measurement.
|
|
114
|
+
*
|
|
115
|
+
* # Arguments
|
|
116
|
+
*
|
|
117
|
+
* * `measurement_id` - The id of the measurement.
|
|
118
|
+
*
|
|
119
|
+
* # Returns
|
|
120
|
+
*
|
|
121
|
+
* * `None` - If the measurement was not found.
|
|
122
|
+
* * `Some(scale)` - If the scale was found.
|
|
123
|
+
*/
|
|
124
|
+
getMeasurementScale(measurementId: string): Scale | null;
|
|
125
|
+
/**
|
|
126
|
+
* Inserts or updates a page in the state.
|
|
127
|
+
*
|
|
128
|
+
* # Arguments
|
|
129
|
+
*
|
|
130
|
+
* * `page` - The page to insert or update.
|
|
131
|
+
*
|
|
132
|
+
* # Returns
|
|
133
|
+
*
|
|
134
|
+
* * `None` - If the page was not found.
|
|
135
|
+
* * `Some(page)` - If the page was found and updated.
|
|
136
|
+
*/
|
|
137
|
+
upsertPage(page: Page): Page | null;
|
|
138
|
+
removePage(pageId: string): Page | null;
|
|
139
|
+
getGroup(groupId: string): GroupWrapper | null;
|
|
140
|
+
/**
|
|
141
|
+
* Inserts or updates a group in the state.
|
|
142
|
+
*
|
|
143
|
+
* # Arguments
|
|
144
|
+
*
|
|
145
|
+
* * `group` - The group to insert or update.
|
|
146
|
+
*
|
|
147
|
+
* # Returns
|
|
148
|
+
*
|
|
149
|
+
* * `None` - If the group was not found.
|
|
150
|
+
* * `Some(group)` - If the group was found and updated.
|
|
151
|
+
*/
|
|
152
|
+
upsertGroup(group: Group): Group | null;
|
|
153
|
+
/**
|
|
154
|
+
* Removes a group from the state.
|
|
155
|
+
*
|
|
156
|
+
* # Arguments
|
|
157
|
+
*
|
|
158
|
+
* * `group_id` - The id of the group to remove.
|
|
159
|
+
*
|
|
160
|
+
* # Returns
|
|
161
|
+
* * `None` - If the group was not found.
|
|
162
|
+
* * `Some(group)` - If the group was found and removed.
|
|
163
|
+
*/
|
|
164
|
+
removeGroup(groupId: string): Group | null;
|
|
165
|
+
/**
|
|
166
|
+
* Inserts or updates a measurement in the state.
|
|
167
|
+
*
|
|
168
|
+
* # Arguments
|
|
169
|
+
*
|
|
170
|
+
* * `measurement` - The measurement to insert or update.
|
|
171
|
+
*
|
|
172
|
+
* # Returns
|
|
173
|
+
*
|
|
174
|
+
* * `None` - If the measurement was not found.
|
|
175
|
+
* * `Some(measurement)` - If the measurement was found and updated.
|
|
176
|
+
*/
|
|
177
|
+
upsertMeasurement(measurement: Measurement): Measurement | null;
|
|
178
|
+
/**
|
|
179
|
+
* Removes a measurement from the state.
|
|
180
|
+
*
|
|
181
|
+
* # Arguments
|
|
182
|
+
*
|
|
183
|
+
* * `measurement_id` - The id of the measurement to remove.
|
|
184
|
+
*
|
|
185
|
+
* # Returns
|
|
186
|
+
*
|
|
187
|
+
* * `None` - If the measurement was not found.
|
|
188
|
+
* * `Some(measurement)` - If the measurement was found and removed.
|
|
189
|
+
*/
|
|
190
|
+
removeMeasurement(measurementId: string): Measurement | null;
|
|
191
|
+
getMeasurement(measurementId: string): MeasurementWrapper | null;
|
|
192
|
+
/**
|
|
193
|
+
* Inserts or updates a scale in the state.
|
|
194
|
+
*
|
|
195
|
+
* # Arguments
|
|
196
|
+
*
|
|
197
|
+
* * `scale` - The scale to insert or update.
|
|
198
|
+
*
|
|
199
|
+
* # Returns
|
|
200
|
+
*
|
|
201
|
+
* * `None` - If the scale was not found.
|
|
202
|
+
* * `Some(scale)` - If the scale was found and updated.
|
|
203
|
+
*/
|
|
204
|
+
upsertScale(scale: Scale): Scale | null;
|
|
205
|
+
/**
|
|
206
|
+
* Removes a scale from the state.
|
|
207
|
+
*
|
|
208
|
+
* # Arguments
|
|
209
|
+
*
|
|
210
|
+
* * `scale_id` - The id of the scale to remove.
|
|
211
|
+
*
|
|
212
|
+
* # Returns
|
|
213
|
+
* * `None` - If the scale was not found.
|
|
214
|
+
* * `Some(scale)` - If the scale was found and removed.
|
|
215
|
+
*/
|
|
216
|
+
removeScale(scaleId: string): Scale | null;
|
|
217
|
+
/**
|
|
218
|
+
* Get the measurements that are missing a scale.
|
|
219
|
+
*
|
|
220
|
+
* # Returns
|
|
221
|
+
*
|
|
222
|
+
* * `Vec<MeasurementWrapper>` - The measurements that are missing a scale.
|
|
223
|
+
*/
|
|
224
|
+
getMeasurementsMissingScale(): Array<MeasurementWrapper>;
|
|
225
|
+
upsertContour(input: ContourInput): void;
|
|
226
|
+
removeContour(contourId: string): boolean;
|
|
227
|
+
getContour(contourId: string): ContourWrapper | null;
|
|
228
|
+
getContoursByPageId(pageId: string): Array<ContourWrapper>;
|
|
229
|
+
getContoursMissingScale(): Array<ContourWrapper>;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare class VolumetricUnitResult {
|
|
233
|
+
get cut(): UnitValue;
|
|
234
|
+
get fill(): UnitValue;
|
|
235
|
+
get uncoveredArea(): UnitValue;
|
|
188
236
|
}
|
|
189
237
|
|
|
190
238
|
/** Add 100 to the input */
|
|
@@ -192,157 +240,190 @@ export declare function plus100(input: number): number;
|
|
|
192
240
|
|
|
193
241
|
/** Add 200 to the input */
|
|
194
242
|
export declare function plus200(input: number): number;
|
|
243
|
+
|
|
244
|
+
/** Input for creating a reference surface from JS/TS. */
|
|
245
|
+
export type ReferenceSurfaceInputJs =
|
|
246
|
+
| { type: 'Polygon'; points: Array<Point>; elevation: number; unit: Unit }
|
|
247
|
+
| {
|
|
248
|
+
type: 'Rectangle';
|
|
249
|
+
points: [Point, Point];
|
|
250
|
+
elevation: number;
|
|
251
|
+
unit: Unit;
|
|
252
|
+
};
|
|
195
253
|
export declare class UnitValue {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
254
|
+
constructor(value: number, unit: Unit, magnitude: UnitValueItemType);
|
|
255
|
+
display(unit: Unit): string;
|
|
256
|
+
getConvertedValue(to: Unit): number;
|
|
199
257
|
}
|
|
200
258
|
|
|
201
259
|
export interface ContourInput {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
260
|
+
id: string;
|
|
261
|
+
name?: string;
|
|
262
|
+
pageId: string;
|
|
263
|
+
/** The lines that make up the contour map */
|
|
264
|
+
lines: Array<ContourLineInput>;
|
|
265
|
+
/** The points of interest that are used to create the contour map */
|
|
266
|
+
pointsOfInterest: Array<ContourPointOfInterestInput>;
|
|
209
267
|
}
|
|
210
268
|
|
|
211
269
|
export interface ContourLineInput {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
270
|
+
/** The elevation of the contour line (real-world value) */
|
|
271
|
+
elevation: number;
|
|
272
|
+
points: Array<Point>;
|
|
273
|
+
unit: Unit;
|
|
215
274
|
}
|
|
216
275
|
|
|
217
276
|
export interface ContourPointOfInterestInput {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
277
|
+
/** The elevation of the point of interest (real-world value) */
|
|
278
|
+
elevation: number;
|
|
279
|
+
point: Point;
|
|
280
|
+
unit: Unit;
|
|
221
281
|
}
|
|
222
282
|
|
|
223
283
|
/** Calculate distance between two points */
|
|
224
284
|
export declare function distance(
|
|
225
|
-
|
|
285
|
+
points: [Point, Point] | [Point3D, Point3D],
|
|
226
286
|
): number;
|
|
227
287
|
|
|
228
|
-
/**
|
|
288
|
+
/** Generate a random id */
|
|
289
|
+
export declare function generateRandomId(): string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Get the centroid of a measurement
|
|
293
|
+
*
|
|
294
|
+
* Returns `None` if the measurement has invalid geometry.
|
|
295
|
+
* For more detailed error information, use `measurement.get_centroid()` directly.
|
|
296
|
+
*/
|
|
229
297
|
export declare function getCentroid(measurement: Measurement): Point | null;
|
|
230
298
|
|
|
231
299
|
export interface Group {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
300
|
+
id: string;
|
|
301
|
+
name?: string;
|
|
302
|
+
measurementType: MeasurementType;
|
|
235
303
|
}
|
|
236
304
|
|
|
237
305
|
export type Measurement =
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
306
|
+
| {
|
|
307
|
+
type: 'Count';
|
|
308
|
+
id: string;
|
|
309
|
+
pageId: string;
|
|
310
|
+
groupId: string;
|
|
311
|
+
points: [Point];
|
|
312
|
+
}
|
|
313
|
+
| {
|
|
314
|
+
type: 'Polygon';
|
|
315
|
+
id: string;
|
|
316
|
+
pageId: string;
|
|
317
|
+
groupId: string;
|
|
318
|
+
points: Array<Point>;
|
|
319
|
+
}
|
|
320
|
+
| {
|
|
321
|
+
type: 'Polyline';
|
|
322
|
+
id: string;
|
|
323
|
+
pageId: string;
|
|
324
|
+
groupId: string;
|
|
325
|
+
points: Array<Point>;
|
|
326
|
+
}
|
|
327
|
+
| {
|
|
328
|
+
type: 'Rectangle';
|
|
329
|
+
id: string;
|
|
330
|
+
pageId: string;
|
|
331
|
+
groupId: string;
|
|
332
|
+
points: [Point, Point];
|
|
333
|
+
};
|
|
266
334
|
|
|
267
|
-
export type MeasurementType =
|
|
335
|
+
export type MeasurementType = 'Area' | 'Linear' | 'Count';
|
|
268
336
|
|
|
269
337
|
export interface Page {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
338
|
+
id: string;
|
|
339
|
+
name?: string;
|
|
340
|
+
width?: number;
|
|
341
|
+
height?: number;
|
|
342
|
+
viewport?: PageViewport;
|
|
275
343
|
}
|
|
276
344
|
|
|
277
345
|
export interface PageViewport {
|
|
278
|
-
|
|
279
|
-
|
|
346
|
+
width: number;
|
|
347
|
+
height: number;
|
|
280
348
|
}
|
|
281
349
|
|
|
282
350
|
/** Represents a 2D point with floating point coordinates */
|
|
283
351
|
export interface Point {
|
|
284
|
-
|
|
285
|
-
|
|
352
|
+
x: number;
|
|
353
|
+
y: number;
|
|
286
354
|
}
|
|
287
355
|
|
|
288
356
|
export interface Point3D {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
357
|
+
x: number;
|
|
358
|
+
y: number;
|
|
359
|
+
z: number;
|
|
292
360
|
}
|
|
293
361
|
|
|
294
362
|
/** Input for creating a reference surface from JS/TS. */
|
|
295
363
|
export type ReferenceSurfaceInput =
|
|
296
|
-
|
|
297
|
-
|
|
364
|
+
| { type: 'Polygon'; points: Array<Point>; elevation: number }
|
|
365
|
+
| { type: 'Rectangle'; points: [Point, Point]; elevation: number };
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Reposition a measurement so its centroid is at the given point.
|
|
369
|
+
* Returns a new measurement (same kind and metadata); area, length, and count are unchanged.
|
|
370
|
+
*
|
|
371
|
+
* # Errors
|
|
372
|
+
*
|
|
373
|
+
* Returns an error if the measurement has invalid or empty geometry (e.g. `EmptyGeometry`).
|
|
374
|
+
*/
|
|
375
|
+
export declare function repositionMeasurementToCentroid(
|
|
376
|
+
measurement: Measurement,
|
|
377
|
+
newCentroid: Point,
|
|
378
|
+
): Measurement;
|
|
298
379
|
|
|
299
380
|
export type Scale =
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
381
|
+
| {
|
|
382
|
+
type: 'Area';
|
|
383
|
+
id: string;
|
|
384
|
+
pageId: string;
|
|
385
|
+
scale: ScaleDefinition;
|
|
386
|
+
boundingBox: [Point, Point];
|
|
387
|
+
}
|
|
388
|
+
| { type: 'Default'; id: string; pageId: string; scale: ScaleDefinition };
|
|
308
389
|
|
|
309
390
|
export interface ScaleDefinition {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
391
|
+
pixelDistance: number;
|
|
392
|
+
realDistance: number;
|
|
393
|
+
unit: Unit;
|
|
313
394
|
}
|
|
314
395
|
|
|
315
396
|
/** Simplify a polyline using the Ramer-Douglas-Peucker algorithm */
|
|
316
397
|
export declare function simplifyPolyline(
|
|
317
|
-
|
|
318
|
-
|
|
398
|
+
points: Array<Point>,
|
|
399
|
+
tolerance: number,
|
|
319
400
|
): Array<Point>;
|
|
320
401
|
|
|
321
402
|
export interface StateOptions {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
403
|
+
pages: Array<Page>;
|
|
404
|
+
groups: Array<Group>;
|
|
405
|
+
measurements: Array<Measurement>;
|
|
406
|
+
scales: Array<Scale>;
|
|
326
407
|
}
|
|
327
408
|
|
|
328
409
|
/** Measurement units supported by the system */
|
|
329
410
|
export type Unit =
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
411
|
+
/** Imperial units */
|
|
412
|
+
| 'Yards'
|
|
413
|
+
| 'Feet'
|
|
414
|
+
| 'Inches'
|
|
415
|
+
/** Metric units */
|
|
416
|
+
| 'Meters'
|
|
417
|
+
| 'Centimeters';
|
|
337
418
|
|
|
338
|
-
export type UnitValueItemType =
|
|
419
|
+
export type UnitValueItemType = 'Area' | 'Length' | 'Volume';
|
|
339
420
|
|
|
340
421
|
/** Result of a volumetric cut/fill calculation. */
|
|
341
422
|
export interface VolumetricResult {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
423
|
+
/** Volume to remove (terrain above reference). */
|
|
424
|
+
cut: number;
|
|
425
|
+
/** Volume to add (terrain below reference). */
|
|
426
|
+
fill: number;
|
|
427
|
+
/** Area where terrain data was unavailable (z_at returned None). */
|
|
428
|
+
uncoveredArea: number;
|
|
348
429
|
}
|