@itwin/hypermodeling-frontend 4.0.0-dev.1 → 4.0.0-dev.100
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/CHANGELOG.md +53 -1
- package/lib/cjs/HyperModeling.d.ts +114 -114
- package/lib/cjs/HyperModeling.js +237 -239
- package/lib/cjs/HyperModeling.js.map +1 -1
- package/lib/cjs/HyperModelingConfig.d.ts +54 -54
- package/lib/cjs/HyperModelingConfig.js +9 -9
- package/lib/cjs/HyperModelingDecorator.d.ts +110 -110
- package/lib/cjs/HyperModelingDecorator.js +335 -337
- package/lib/cjs/HyperModelingDecorator.js.map +1 -1
- package/lib/cjs/PopupToolbar.d.ts +24 -24
- package/lib/cjs/PopupToolbar.js +57 -57
- package/lib/cjs/PopupToolbar.js.map +1 -1
- package/lib/cjs/SectionDrawingLocationState.d.ts +90 -90
- package/lib/cjs/SectionDrawingLocationState.js +106 -107
- package/lib/cjs/SectionDrawingLocationState.js.map +1 -1
- package/lib/cjs/SectionGraphicsProvider.d.ts +13 -13
- package/lib/cjs/SectionGraphicsProvider.js +272 -273
- package/lib/cjs/SectionGraphicsProvider.js.map +1 -1
- package/lib/cjs/SectionMarkerHandler.d.ts +52 -52
- package/lib/cjs/SectionMarkerHandler.js +111 -112
- package/lib/cjs/SectionMarkerHandler.js.map +1 -1
- package/lib/cjs/SectionMarkers.d.ts +82 -82
- package/lib/cjs/SectionMarkers.js +174 -174
- package/lib/cjs/Tools.d.ts +5 -5
- package/lib/cjs/Tools.js +170 -170
- package/lib/cjs/Tools.js.map +1 -1
- package/lib/cjs/hypermodeling-frontend.d.ts +13 -13
- package/lib/cjs/hypermodeling-frontend.js +33 -29
- package/lib/cjs/hypermodeling-frontend.js.map +1 -1
- package/lib/esm/HyperModeling.d.ts +114 -114
- package/lib/esm/HyperModeling.js +234 -235
- package/lib/esm/HyperModeling.js.map +1 -1
- package/lib/esm/HyperModelingConfig.d.ts +54 -54
- package/lib/esm/HyperModelingConfig.js +8 -8
- package/lib/esm/HyperModelingDecorator.d.ts +110 -110
- package/lib/esm/HyperModelingDecorator.js +331 -333
- package/lib/esm/HyperModelingDecorator.js.map +1 -1
- package/lib/esm/PopupToolbar.d.ts +24 -24
- package/lib/esm/PopupToolbar.js +54 -53
- package/lib/esm/PopupToolbar.js.map +1 -1
- package/lib/esm/SectionDrawingLocationState.d.ts +90 -90
- package/lib/esm/SectionDrawingLocationState.js +102 -103
- package/lib/esm/SectionDrawingLocationState.js.map +1 -1
- package/lib/esm/SectionGraphicsProvider.d.ts +13 -13
- package/lib/esm/SectionGraphicsProvider.js +268 -269
- package/lib/esm/SectionGraphicsProvider.js.map +1 -1
- package/lib/esm/SectionMarkerHandler.d.ts +52 -52
- package/lib/esm/SectionMarkerHandler.js +107 -108
- package/lib/esm/SectionMarkerHandler.js.map +1 -1
- package/lib/esm/SectionMarkers.d.ts +82 -82
- package/lib/esm/SectionMarkers.js +168 -168
- package/lib/esm/Tools.d.ts +5 -5
- package/lib/esm/Tools.js +166 -166
- package/lib/esm/Tools.js.map +1 -1
- package/lib/esm/hypermodeling-frontend.d.ts +13 -13
- package/lib/esm/hypermodeling-frontend.js +17 -17
- package/package.json +21 -22
package/lib/esm/Tools.js
CHANGED
|
@@ -1,167 +1,167 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module HyperModeling
|
|
7
|
-
*/
|
|
8
|
-
import { SectionType } from "@itwin/core-common";
|
|
9
|
-
import { IModelApp, Tool } from "@itwin/core-frontend";
|
|
10
|
-
import { HyperModeling } from "./HyperModeling";
|
|
11
|
-
import { HyperModelingDecorator } from "./HyperModelingDecorator";
|
|
12
|
-
/** Parses a string case-insensitively returning true for "ON", false for "OFF", undefined for "TOGGLE" or undefined, and the input string for anything else. */
|
|
13
|
-
function parseToggle(arg) {
|
|
14
|
-
if (undefined === arg)
|
|
15
|
-
return undefined;
|
|
16
|
-
switch (arg.toLowerCase()) {
|
|
17
|
-
case "on": return true;
|
|
18
|
-
case "off": return false;
|
|
19
|
-
case "toggle": return undefined;
|
|
20
|
-
default: return arg;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
class HyperModelingTool extends Tool {
|
|
24
|
-
static get minArgs() { return 0; }
|
|
25
|
-
static get maxArgs() { return 1; }
|
|
26
|
-
async run(enable, vp) {
|
|
27
|
-
vp = vp
|
|
28
|
-
if (vp)
|
|
29
|
-
await HyperModeling.startOrStop(vp, enable);
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
async parseAndRun(...args) {
|
|
33
|
-
const enable = parseToggle(args[0]);
|
|
34
|
-
return typeof enable !== "string" && this.run(enable);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
HyperModelingTool.toolId = "HyperModeling";
|
|
38
|
-
/** Configures how section graphics are displayed. These are global settings. If no arguments are supplied, the defaults are restored.
|
|
39
|
-
* Otherwise, each argument is of the form "name=value" where value is 0 (disable) or 1 (enable). Only the first letter of each argument matters.
|
|
40
|
-
* - drawings: Whether to display the section drawing graphics. Default: 1.
|
|
41
|
-
* - sheets: Whether to display the sheet annotation graphics. Default: 1.
|
|
42
|
-
* - clip: Whether to apply clip volumes to the 2d graphics. Default: 1.
|
|
43
|
-
* - boundaries: Whether to display clip volumes as boundary shapes for debugging purposes. Default: 0.
|
|
44
|
-
*/
|
|
45
|
-
class SectionGraphicsConfigTool extends Tool {
|
|
46
|
-
static get minArgs() { return 0; }
|
|
47
|
-
static get maxArgs() { return 4; }
|
|
48
|
-
async run(config) {
|
|
49
|
-
if (!config) {
|
|
50
|
-
config = {
|
|
51
|
-
ignoreClip: false,
|
|
52
|
-
debugClipVolumes: false,
|
|
53
|
-
hideSectionGraphics: false,
|
|
54
|
-
hideSheetAnnotations: false,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
HyperModeling.updateConfiguration({ graphics: config });
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
async parseAndRun(...args) {
|
|
61
|
-
if (0 === args.length)
|
|
62
|
-
return this.run(); // restore defaults...
|
|
63
|
-
const config = {};
|
|
64
|
-
for (const arg of args) {
|
|
65
|
-
const parts = arg.toLowerCase().split("=");
|
|
66
|
-
if (2 !== parts.length)
|
|
67
|
-
continue;
|
|
68
|
-
const value = Number.parseInt(parts[1], 10);
|
|
69
|
-
if (Number.isNaN(value) || (0 !== value && 1 !== value))
|
|
70
|
-
continue;
|
|
71
|
-
const enable = 1 === value;
|
|
72
|
-
switch (parts[0][0]) {
|
|
73
|
-
case "d":
|
|
74
|
-
config.hideSectionGraphics = !enable;
|
|
75
|
-
break;
|
|
76
|
-
case "s":
|
|
77
|
-
config.hideSheetAnnotations = !enable;
|
|
78
|
-
break;
|
|
79
|
-
case "c":
|
|
80
|
-
config.ignoreClip = !enable;
|
|
81
|
-
break;
|
|
82
|
-
case "b":
|
|
83
|
-
config.debugClipVolumes = enable;
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return this.run(config);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
SectionGraphicsConfigTool.toolId = "HyperModeling.Graphics.Config";
|
|
91
|
-
class SectionMarkerConfigTool extends Tool {
|
|
92
|
-
static get minArgs() { return 0; }
|
|
93
|
-
static get maxArgs() { return 3; }
|
|
94
|
-
async run(config) {
|
|
95
|
-
config = config
|
|
96
|
-
this.update(config);
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
async parseAndRun(...args) {
|
|
100
|
-
if (0 === args.length)
|
|
101
|
-
return this.run(); // restore defaults...
|
|
102
|
-
const config = {};
|
|
103
|
-
for (const arg of args) {
|
|
104
|
-
const parts = arg.toLowerCase().split("=");
|
|
105
|
-
if (2 !== parts.length)
|
|
106
|
-
continue;
|
|
107
|
-
const setting = parts[0][0];
|
|
108
|
-
switch (setting) {
|
|
109
|
-
case "h": {
|
|
110
|
-
config.hiddenSectionTypes = [];
|
|
111
|
-
for (const c of parts[1]) {
|
|
112
|
-
switch (c) {
|
|
113
|
-
case "s":
|
|
114
|
-
config.hiddenSectionTypes.push(SectionType.Section);
|
|
115
|
-
break;
|
|
116
|
-
case "d":
|
|
117
|
-
config.hiddenSectionTypes.push(SectionType.Detail);
|
|
118
|
-
break;
|
|
119
|
-
case "e":
|
|
120
|
-
config.hiddenSectionTypes.push(SectionType.Elevation);
|
|
121
|
-
break;
|
|
122
|
-
case "p":
|
|
123
|
-
config.hiddenSectionTypes.push(SectionType.Plan);
|
|
124
|
-
break;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
default: {
|
|
130
|
-
const intVal = Number.parseInt(parts[1], 10);
|
|
131
|
-
if (!Number.isNaN(intVal) && (0 === intVal || 1 === intVal)) {
|
|
132
|
-
if ("c" === setting)
|
|
133
|
-
config.ignoreCategorySelector = 0 === intVal;
|
|
134
|
-
else if ("m" === setting)
|
|
135
|
-
config.ignoreModelSelector = 0 === intVal;
|
|
136
|
-
}
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return this.run(config);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
class SectionMarkerDefaultConfigTool extends SectionMarkerConfigTool {
|
|
145
|
-
update(config) {
|
|
146
|
-
HyperModeling.updateConfiguration({ markers: config });
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
SectionMarkerDefaultConfigTool.toolId = "HyperModeling.Marker.Default.Config";
|
|
150
|
-
class SectionMarkerDecoratorConfigTool extends SectionMarkerConfigTool {
|
|
151
|
-
update(config) {
|
|
152
|
-
const vp = IModelApp.viewManager.selectedView;
|
|
153
|
-
const decorator = vp ? HyperModelingDecorator.getForViewport(vp) : undefined;
|
|
154
|
-
if (decorator)
|
|
155
|
-
decorator.updateConfiguration(config);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
SectionMarkerDecoratorConfigTool.toolId = "HyperModeling.Marker.Config";
|
|
159
|
-
/** @internal */
|
|
160
|
-
export function registerTools(namespace) {
|
|
161
|
-
const register = (tool) => IModelApp.tools.register(tool, namespace);
|
|
162
|
-
register(HyperModelingTool);
|
|
163
|
-
register(SectionGraphicsConfigTool);
|
|
164
|
-
register(SectionMarkerDecoratorConfigTool);
|
|
165
|
-
register(SectionMarkerDefaultConfigTool);
|
|
166
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module HyperModeling
|
|
7
|
+
*/
|
|
8
|
+
import { SectionType } from "@itwin/core-common";
|
|
9
|
+
import { IModelApp, Tool } from "@itwin/core-frontend";
|
|
10
|
+
import { HyperModeling } from "./HyperModeling";
|
|
11
|
+
import { HyperModelingDecorator } from "./HyperModelingDecorator";
|
|
12
|
+
/** Parses a string case-insensitively returning true for "ON", false for "OFF", undefined for "TOGGLE" or undefined, and the input string for anything else. */
|
|
13
|
+
function parseToggle(arg) {
|
|
14
|
+
if (undefined === arg)
|
|
15
|
+
return undefined;
|
|
16
|
+
switch (arg.toLowerCase()) {
|
|
17
|
+
case "on": return true;
|
|
18
|
+
case "off": return false;
|
|
19
|
+
case "toggle": return undefined;
|
|
20
|
+
default: return arg;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
class HyperModelingTool extends Tool {
|
|
24
|
+
static get minArgs() { return 0; }
|
|
25
|
+
static get maxArgs() { return 1; }
|
|
26
|
+
async run(enable, vp) {
|
|
27
|
+
vp = vp ?? IModelApp.viewManager.selectedView;
|
|
28
|
+
if (vp)
|
|
29
|
+
await HyperModeling.startOrStop(vp, enable);
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
async parseAndRun(...args) {
|
|
33
|
+
const enable = parseToggle(args[0]);
|
|
34
|
+
return typeof enable !== "string" && this.run(enable);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
HyperModelingTool.toolId = "HyperModeling";
|
|
38
|
+
/** Configures how section graphics are displayed. These are global settings. If no arguments are supplied, the defaults are restored.
|
|
39
|
+
* Otherwise, each argument is of the form "name=value" where value is 0 (disable) or 1 (enable). Only the first letter of each argument matters.
|
|
40
|
+
* - drawings: Whether to display the section drawing graphics. Default: 1.
|
|
41
|
+
* - sheets: Whether to display the sheet annotation graphics. Default: 1.
|
|
42
|
+
* - clip: Whether to apply clip volumes to the 2d graphics. Default: 1.
|
|
43
|
+
* - boundaries: Whether to display clip volumes as boundary shapes for debugging purposes. Default: 0.
|
|
44
|
+
*/
|
|
45
|
+
class SectionGraphicsConfigTool extends Tool {
|
|
46
|
+
static get minArgs() { return 0; }
|
|
47
|
+
static get maxArgs() { return 4; }
|
|
48
|
+
async run(config) {
|
|
49
|
+
if (!config) {
|
|
50
|
+
config = {
|
|
51
|
+
ignoreClip: false,
|
|
52
|
+
debugClipVolumes: false,
|
|
53
|
+
hideSectionGraphics: false,
|
|
54
|
+
hideSheetAnnotations: false,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
HyperModeling.updateConfiguration({ graphics: config });
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
async parseAndRun(...args) {
|
|
61
|
+
if (0 === args.length)
|
|
62
|
+
return this.run(); // restore defaults...
|
|
63
|
+
const config = {};
|
|
64
|
+
for (const arg of args) {
|
|
65
|
+
const parts = arg.toLowerCase().split("=");
|
|
66
|
+
if (2 !== parts.length)
|
|
67
|
+
continue;
|
|
68
|
+
const value = Number.parseInt(parts[1], 10);
|
|
69
|
+
if (Number.isNaN(value) || (0 !== value && 1 !== value))
|
|
70
|
+
continue;
|
|
71
|
+
const enable = 1 === value;
|
|
72
|
+
switch (parts[0][0]) {
|
|
73
|
+
case "d":
|
|
74
|
+
config.hideSectionGraphics = !enable;
|
|
75
|
+
break;
|
|
76
|
+
case "s":
|
|
77
|
+
config.hideSheetAnnotations = !enable;
|
|
78
|
+
break;
|
|
79
|
+
case "c":
|
|
80
|
+
config.ignoreClip = !enable;
|
|
81
|
+
break;
|
|
82
|
+
case "b":
|
|
83
|
+
config.debugClipVolumes = enable;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return this.run(config);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
SectionGraphicsConfigTool.toolId = "HyperModeling.Graphics.Config";
|
|
91
|
+
class SectionMarkerConfigTool extends Tool {
|
|
92
|
+
static get minArgs() { return 0; }
|
|
93
|
+
static get maxArgs() { return 3; }
|
|
94
|
+
async run(config) {
|
|
95
|
+
config = config ?? { ignoreModelSelector: false, ignoreCategorySelector: false, hiddenSectionTypes: [] };
|
|
96
|
+
this.update(config);
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
async parseAndRun(...args) {
|
|
100
|
+
if (0 === args.length)
|
|
101
|
+
return this.run(); // restore defaults...
|
|
102
|
+
const config = {};
|
|
103
|
+
for (const arg of args) {
|
|
104
|
+
const parts = arg.toLowerCase().split("=");
|
|
105
|
+
if (2 !== parts.length)
|
|
106
|
+
continue;
|
|
107
|
+
const setting = parts[0][0];
|
|
108
|
+
switch (setting) {
|
|
109
|
+
case "h": {
|
|
110
|
+
config.hiddenSectionTypes = [];
|
|
111
|
+
for (const c of parts[1]) {
|
|
112
|
+
switch (c) {
|
|
113
|
+
case "s":
|
|
114
|
+
config.hiddenSectionTypes.push(SectionType.Section);
|
|
115
|
+
break;
|
|
116
|
+
case "d":
|
|
117
|
+
config.hiddenSectionTypes.push(SectionType.Detail);
|
|
118
|
+
break;
|
|
119
|
+
case "e":
|
|
120
|
+
config.hiddenSectionTypes.push(SectionType.Elevation);
|
|
121
|
+
break;
|
|
122
|
+
case "p":
|
|
123
|
+
config.hiddenSectionTypes.push(SectionType.Plan);
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
default: {
|
|
130
|
+
const intVal = Number.parseInt(parts[1], 10);
|
|
131
|
+
if (!Number.isNaN(intVal) && (0 === intVal || 1 === intVal)) {
|
|
132
|
+
if ("c" === setting)
|
|
133
|
+
config.ignoreCategorySelector = 0 === intVal;
|
|
134
|
+
else if ("m" === setting)
|
|
135
|
+
config.ignoreModelSelector = 0 === intVal;
|
|
136
|
+
}
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return this.run(config);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
class SectionMarkerDefaultConfigTool extends SectionMarkerConfigTool {
|
|
145
|
+
update(config) {
|
|
146
|
+
HyperModeling.updateConfiguration({ markers: config });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
SectionMarkerDefaultConfigTool.toolId = "HyperModeling.Marker.Default.Config";
|
|
150
|
+
class SectionMarkerDecoratorConfigTool extends SectionMarkerConfigTool {
|
|
151
|
+
update(config) {
|
|
152
|
+
const vp = IModelApp.viewManager.selectedView;
|
|
153
|
+
const decorator = vp ? HyperModelingDecorator.getForViewport(vp) : undefined;
|
|
154
|
+
if (decorator)
|
|
155
|
+
decorator.updateConfiguration(config);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
SectionMarkerDecoratorConfigTool.toolId = "HyperModeling.Marker.Config";
|
|
159
|
+
/** @internal */
|
|
160
|
+
export function registerTools(namespace) {
|
|
161
|
+
const register = (tool) => IModelApp.tools.register(tool, namespace);
|
|
162
|
+
register(HyperModelingTool);
|
|
163
|
+
register(SectionGraphicsConfigTool);
|
|
164
|
+
register(SectionMarkerDecoratorConfigTool);
|
|
165
|
+
register(SectionMarkerDefaultConfigTool);
|
|
166
|
+
}
|
|
167
167
|
//# sourceMappingURL=Tools.js.map
|
package/lib/esm/Tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tools.js","sourceRoot":"","sources":["../../src/Tools.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAkB,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,gKAAgK;AAChK,SAAS,WAAW,CAAC,GAAuB;IAC1C,IAAI,SAAS,KAAK,GAAG;QACnB,OAAO,SAAS,CAAC;IAEnB,QAAQ,GAAG,CAAC,WAAW,EAAE,EAAE;QACzB,KAAK,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC;QACvB,KAAK,KAAK,CAAC,CAAC,OAAO,KAAK,CAAC;QACzB,KAAK,QAAQ,CAAC,CAAC,OAAO,SAAS,CAAC;QAChC,OAAO,CAAC,CAAC,OAAO,GAAG,CAAC;KACrB;AACH,CAAC;AAED,MAAM,iBAAkB,SAAQ,IAAI;IAE3B,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,KAAc,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAElC,KAAK,CAAC,GAAG,CAAC,MAAgB,EAAE,EAAmB;QAC7D,EAAE,GAAG,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,IAAI,EAAE;YACJ,MAAM,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAE9C,OAAO,IAAI,CA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,CAAC,KAAK,MAAM,CAAC;6BAC1C,IAAI,GAAG,KAAK,OAAO;4BACtB,MAAM,CAAC,mBAAmB,GAAG,CAAC,KAAK,MAAM,CAAC;qBAC7C;oBAED,MAAM;iBACP;aACF;SACF;QAED,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,8BAA+B,SAAQ,uBAAuB;IAGxD,MAAM,CAAC,MAA2B;QAC1C,aAAa,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACzD,CAAC;;AAJsB,qCAAM,GAAG,qCAAqC,CAAC;AAOxE,MAAM,gCAAiC,SAAQ,uBAAuB;IAG1D,MAAM,CAAC,MAA2B;QAC1C,MAAM,EAAE,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,MAAM,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7E,IAAI,SAAS;YACX,SAAS,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;;AAPsB,uCAAM,GAAG,6BAA6B,CAAC;AAUhE,gBAAgB;AAChB,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC7C,MAAM,QAAQ,GAAG,CAAC,IAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAClF,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC5B,QAAQ,CAAC,yBAAyB,CAAC,CAAC;IACpC,QAAQ,CAAC,gCAAgC,CAAC,CAAC;IAC3C,QAAQ,CAAC,8BAA8B,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module HyperModeling\r\n */\r\n\r\nimport { SectionType } from \"@itwin/core-common\";\r\nimport { IModelApp, ScreenViewport, Tool } from \"@itwin/core-frontend\";\r\nimport { HyperModeling } from \"./HyperModeling\";\r\nimport { SectionGraphicsConfig, SectionMarkerConfig } from \"./HyperModelingConfig\";\r\nimport { HyperModelingDecorator } from \"./HyperModelingDecorator\";\r\n\r\n/** Parses a string case-insensitively returning true for \"ON\", false for \"OFF\", undefined for \"TOGGLE\" or undefined, and the input string for anything else. */\r\nfunction parseToggle(arg: string | undefined): string | boolean | undefined {\r\n if (undefined === arg)\r\n return undefined;\r\n\r\n switch (arg.toLowerCase()) {\r\n case \"on\": return true;\r\n case \"off\": return false;\r\n case \"toggle\": return undefined;\r\n default: return arg;\r\n }\r\n}\r\n\r\nclass HyperModelingTool extends Tool {\r\n public static override toolId = \"HyperModeling\";\r\n public static override get minArgs() { return 0; }\r\n public static override get maxArgs() { return 1; }\r\n\r\n public override async run(enable?: boolean, vp?: ScreenViewport): Promise<boolean> {\r\n vp = vp ?? IModelApp.viewManager.selectedView;\r\n if (vp)\r\n await HyperModeling.startOrStop(vp, enable);\r\n\r\n return true;\r\n }\r\n\r\n public override async parseAndRun(...args: string[]): Promise<boolean> {\r\n const enable = parseToggle(args[0]);\r\n return typeof enable !== \"string\" && this.run(enable);\r\n }\r\n}\r\n\r\ntype Writeable<T> = { -readonly [P in keyof T]: T[P] };\r\n\r\n/** Configures how section graphics are displayed. These are global settings. If no arguments are supplied, the defaults are restored.\r\n * Otherwise, each argument is of the form \"name=value\" where value is 0 (disable) or 1 (enable). Only the first letter of each argument matters.\r\n * - drawings: Whether to display the section drawing graphics. Default: 1.\r\n * - sheets: Whether to display the sheet annotation graphics. Default: 1.\r\n * - clip: Whether to apply clip volumes to the 2d graphics. Default: 1.\r\n * - boundaries: Whether to display clip volumes as boundary shapes for debugging purposes. Default: 0.\r\n */\r\nclass SectionGraphicsConfigTool extends Tool {\r\n public static override toolId = \"HyperModeling.Graphics.Config\";\r\n public static override get minArgs() { return 0; }\r\n public static override get maxArgs() { return 4; }\r\n\r\n public override async run(config?: SectionGraphicsConfig): Promise<boolean> {\r\n if (!config) {\r\n config = {\r\n ignoreClip: false,\r\n debugClipVolumes: false,\r\n hideSectionGraphics: false,\r\n hideSheetAnnotations: false,\r\n };\r\n }\r\n\r\n HyperModeling.updateConfiguration({ graphics: config });\r\n return true;\r\n }\r\n\r\n public override async parseAndRun(...args: string[]): Promise<boolean> {\r\n if (0 === args.length)\r\n return this.run(); // restore defaults...\r\n\r\n const config: Writeable<SectionGraphicsConfig> = {};\r\n for (const arg of args) {\r\n const parts = arg.toLowerCase().split(\"=\");\r\n if (2 !== parts.length)\r\n continue;\r\n\r\n const value = Number.parseInt(parts[1], 10);\r\n if (Number.isNaN(value) || (0 !== value && 1 !== value))\r\n continue;\r\n\r\n const enable = 1 === value;\r\n switch (parts[0][0]) {\r\n case \"d\":\r\n config.hideSectionGraphics = !enable;\r\n break;\r\n case \"s\":\r\n config.hideSheetAnnotations = !enable;\r\n break;\r\n case \"c\":\r\n config.ignoreClip = !enable;\r\n break;\r\n case \"b\":\r\n config.debugClipVolumes = enable;\r\n break;\r\n }\r\n }\r\n\r\n return this.run(config);\r\n }\r\n}\r\n\r\nabstract class SectionMarkerConfigTool extends Tool {\r\n public static override get minArgs() { return 0; }\r\n public static override get maxArgs() { return 3; }\r\n\r\n protected abstract update(config: SectionMarkerConfig): void;\r\n\r\n public override async run(config?: SectionMarkerConfig): Promise<boolean> {\r\n config = config ?? { ignoreModelSelector: false, ignoreCategorySelector: false, hiddenSectionTypes: [] };\r\n this.update(config);\r\n return true;\r\n }\r\n\r\n public override async parseAndRun(...args: string[]): Promise<boolean> {\r\n if (0 === args.length)\r\n return this.run(); // restore defaults...\r\n\r\n const config: Writeable<SectionMarkerConfig> = {};\r\n for (const arg of args) {\r\n const parts = arg.toLowerCase().split(\"=\");\r\n if (2 !== parts.length)\r\n continue;\r\n\r\n const setting = parts[0][0];\r\n switch (setting) {\r\n case \"h\": {\r\n config.hiddenSectionTypes = [];\r\n for (const c of parts[1]) {\r\n switch (c) {\r\n case \"s\":\r\n config.hiddenSectionTypes.push(SectionType.Section);\r\n break;\r\n case \"d\":\r\n config.hiddenSectionTypes.push(SectionType.Detail);\r\n break;\r\n case \"e\":\r\n config.hiddenSectionTypes.push(SectionType.Elevation);\r\n break;\r\n case \"p\":\r\n config.hiddenSectionTypes.push(SectionType.Plan);\r\n break;\r\n }\r\n }\r\n\r\n break;\r\n }\r\n default: {\r\n const intVal = Number.parseInt(parts[1], 10);\r\n if (!Number.isNaN(intVal) && (0 === intVal || 1 === intVal)) {\r\n if (\"c\" === setting)\r\n config.ignoreCategorySelector = 0 === intVal;\r\n else if (\"m\" === setting)\r\n config.ignoreModelSelector = 0 === intVal;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this.run(config);\r\n }\r\n}\r\n\r\nclass SectionMarkerDefaultConfigTool extends SectionMarkerConfigTool {\r\n public static override toolId = \"HyperModeling.Marker.Default.Config\";\r\n\r\n protected update(config: SectionMarkerConfig): void {\r\n HyperModeling.updateConfiguration({ markers: config });\r\n }\r\n}\r\n\r\nclass SectionMarkerDecoratorConfigTool extends SectionMarkerConfigTool {\r\n public static override toolId = \"HyperModeling.Marker.Config\";\r\n\r\n protected update(config: SectionMarkerConfig): void {\r\n const vp = IModelApp.viewManager.selectedView;\r\n const decorator = vp ? HyperModelingDecorator.getForViewport(vp) : undefined;\r\n if (decorator)\r\n decorator.updateConfiguration(config);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function registerTools(namespace: string): void {\r\n const register = (tool: typeof Tool) => IModelApp.tools.register(tool, namespace);\r\n register(HyperModelingTool);\r\n register(SectionGraphicsConfigTool);\r\n register(SectionMarkerDecoratorConfigTool);\r\n register(SectionMarkerDefaultConfigTool);\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Tools.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AM,8BAA+B,SAAQ,uBAAuB;IAGxD,MAAM,CAAC,MAA2B;QAC1C,aAAa,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACzD,CAAC;;AAJsB,qCAAM,GAAG,qCAAqC,CAAC;AAOxE,MAAM,gCAAiC,SAAQ,uBAAuB;IAG1D,MAAM,CAAC,MAA2B;QAC1C,MAAM,EAAE,GAAG,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9C,MAAM,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7E,IAAI,SAAS;YACX,SAAS,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;;AAPsB,uCAAM,GAAG,6BAA6B,CAAC;AAUhE,gBAAgB;AAChB,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC7C,MAAM,QAAQ,GAAG,CAAC,IAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAClF,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC5B,QAAQ,CAAC,yBAAyB,CAAC,CAAC;IACpC,QAAQ,CAAC,gCAAgC,CAAC,CAAC;IAC3C,QAAQ,CAAC,8BAA8B,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module HyperModeling\r\n */\r\n\r\nimport { SectionType } from \"@itwin/core-common\";\r\nimport { IModelApp, ScreenViewport, Tool } from \"@itwin/core-frontend\";\r\nimport { HyperModeling } from \"./HyperModeling\";\r\nimport { SectionGraphicsConfig, SectionMarkerConfig } from \"./HyperModelingConfig\";\r\nimport { HyperModelingDecorator } from \"./HyperModelingDecorator\";\r\n\r\n/** Parses a string case-insensitively returning true for \"ON\", false for \"OFF\", undefined for \"TOGGLE\" or undefined, and the input string for anything else. */\r\nfunction parseToggle(arg: string | undefined): string | boolean | undefined {\r\n if (undefined === arg)\r\n return undefined;\r\n\r\n switch (arg.toLowerCase()) {\r\n case \"on\": return true;\r\n case \"off\": return false;\r\n case \"toggle\": return undefined;\r\n default: return arg;\r\n }\r\n}\r\n\r\nclass HyperModelingTool extends Tool {\r\n public static override toolId = \"HyperModeling\";\r\n public static override get minArgs() { return 0; }\r\n public static override get maxArgs() { return 1; }\r\n\r\n public override async run(enable?: boolean, vp?: ScreenViewport): Promise<boolean> {\r\n vp = vp ?? IModelApp.viewManager.selectedView;\r\n if (vp)\r\n await HyperModeling.startOrStop(vp, enable);\r\n\r\n return true;\r\n }\r\n\r\n public override async parseAndRun(...args: string[]): Promise<boolean> {\r\n const enable = parseToggle(args[0]);\r\n return typeof enable !== \"string\" && this.run(enable);\r\n }\r\n}\r\n\r\ntype Writeable<T> = { -readonly [P in keyof T]: T[P] };\r\n\r\n/** Configures how section graphics are displayed. These are global settings. If no arguments are supplied, the defaults are restored.\r\n * Otherwise, each argument is of the form \"name=value\" where value is 0 (disable) or 1 (enable). Only the first letter of each argument matters.\r\n * - drawings: Whether to display the section drawing graphics. Default: 1.\r\n * - sheets: Whether to display the sheet annotation graphics. Default: 1.\r\n * - clip: Whether to apply clip volumes to the 2d graphics. Default: 1.\r\n * - boundaries: Whether to display clip volumes as boundary shapes for debugging purposes. Default: 0.\r\n */\r\nclass SectionGraphicsConfigTool extends Tool {\r\n public static override toolId = \"HyperModeling.Graphics.Config\";\r\n public static override get minArgs() { return 0; }\r\n public static override get maxArgs() { return 4; }\r\n\r\n public override async run(config?: SectionGraphicsConfig): Promise<boolean> {\r\n if (!config) {\r\n config = {\r\n ignoreClip: false,\r\n debugClipVolumes: false,\r\n hideSectionGraphics: false,\r\n hideSheetAnnotations: false,\r\n };\r\n }\r\n\r\n HyperModeling.updateConfiguration({ graphics: config });\r\n return true;\r\n }\r\n\r\n public override async parseAndRun(...args: string[]): Promise<boolean> {\r\n if (0 === args.length)\r\n return this.run(); // restore defaults...\r\n\r\n const config: Writeable<SectionGraphicsConfig> = {};\r\n for (const arg of args) {\r\n const parts = arg.toLowerCase().split(\"=\");\r\n if (2 !== parts.length)\r\n continue;\r\n\r\n const value = Number.parseInt(parts[1], 10);\r\n if (Number.isNaN(value) || (0 !== value && 1 !== value))\r\n continue;\r\n\r\n const enable = 1 === value;\r\n switch (parts[0][0]) {\r\n case \"d\":\r\n config.hideSectionGraphics = !enable;\r\n break;\r\n case \"s\":\r\n config.hideSheetAnnotations = !enable;\r\n break;\r\n case \"c\":\r\n config.ignoreClip = !enable;\r\n break;\r\n case \"b\":\r\n config.debugClipVolumes = enable;\r\n break;\r\n }\r\n }\r\n\r\n return this.run(config);\r\n }\r\n}\r\n\r\nabstract class SectionMarkerConfigTool extends Tool {\r\n public static override get minArgs() { return 0; }\r\n public static override get maxArgs() { return 3; }\r\n\r\n protected abstract update(config: SectionMarkerConfig): void;\r\n\r\n public override async run(config?: SectionMarkerConfig): Promise<boolean> {\r\n config = config ?? { ignoreModelSelector: false, ignoreCategorySelector: false, hiddenSectionTypes: [] };\r\n this.update(config);\r\n return true;\r\n }\r\n\r\n public override async parseAndRun(...args: string[]): Promise<boolean> {\r\n if (0 === args.length)\r\n return this.run(); // restore defaults...\r\n\r\n const config: Writeable<SectionMarkerConfig> = {};\r\n for (const arg of args) {\r\n const parts = arg.toLowerCase().split(\"=\");\r\n if (2 !== parts.length)\r\n continue;\r\n\r\n const setting = parts[0][0];\r\n switch (setting) {\r\n case \"h\": {\r\n config.hiddenSectionTypes = [];\r\n for (const c of parts[1]) {\r\n switch (c) {\r\n case \"s\":\r\n config.hiddenSectionTypes.push(SectionType.Section);\r\n break;\r\n case \"d\":\r\n config.hiddenSectionTypes.push(SectionType.Detail);\r\n break;\r\n case \"e\":\r\n config.hiddenSectionTypes.push(SectionType.Elevation);\r\n break;\r\n case \"p\":\r\n config.hiddenSectionTypes.push(SectionType.Plan);\r\n break;\r\n }\r\n }\r\n\r\n break;\r\n }\r\n default: {\r\n const intVal = Number.parseInt(parts[1], 10);\r\n if (!Number.isNaN(intVal) && (0 === intVal || 1 === intVal)) {\r\n if (\"c\" === setting)\r\n config.ignoreCategorySelector = 0 === intVal;\r\n else if (\"m\" === setting)\r\n config.ignoreModelSelector = 0 === intVal;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this.run(config);\r\n }\r\n}\r\n\r\nclass SectionMarkerDefaultConfigTool extends SectionMarkerConfigTool {\r\n public static override toolId = \"HyperModeling.Marker.Default.Config\";\r\n\r\n protected update(config: SectionMarkerConfig): void {\r\n HyperModeling.updateConfiguration({ markers: config });\r\n }\r\n}\r\n\r\nclass SectionMarkerDecoratorConfigTool extends SectionMarkerConfigTool {\r\n public static override toolId = \"HyperModeling.Marker.Config\";\r\n\r\n protected update(config: SectionMarkerConfig): void {\r\n const vp = IModelApp.viewManager.selectedView;\r\n const decorator = vp ? HyperModelingDecorator.getForViewport(vp) : undefined;\r\n if (decorator)\r\n decorator.updateConfiguration(config);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport function registerTools(namespace: string): void {\r\n const register = (tool: typeof Tool) => IModelApp.tools.register(tool, namespace);\r\n register(HyperModelingTool);\r\n register(SectionGraphicsConfigTool);\r\n register(SectionMarkerDecoratorConfigTool);\r\n register(SectionMarkerDefaultConfigTool);\r\n}\r\n"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export * from "./HyperModeling";
|
|
2
|
-
export * from "./HyperModelingConfig";
|
|
3
|
-
export * from "./HyperModelingDecorator";
|
|
4
|
-
export * from "./SectionMarkerHandler";
|
|
5
|
-
export * from "./SectionDrawingLocationState";
|
|
6
|
-
export * from "./SectionGraphicsProvider";
|
|
7
|
-
export * from "./SectionMarkers";
|
|
8
|
-
/** @docs-package-description
|
|
9
|
-
* The hypermodeling package enables visualization of section drawings in a spatial context.
|
|
10
|
-
*/
|
|
11
|
-
/** @docs-group-description HyperModeling
|
|
12
|
-
* APIs for controlling visualization of section drawings in a spatial context.
|
|
13
|
-
*/
|
|
1
|
+
export * from "./HyperModeling";
|
|
2
|
+
export * from "./HyperModelingConfig";
|
|
3
|
+
export * from "./HyperModelingDecorator";
|
|
4
|
+
export * from "./SectionMarkerHandler";
|
|
5
|
+
export * from "./SectionDrawingLocationState";
|
|
6
|
+
export * from "./SectionGraphicsProvider";
|
|
7
|
+
export * from "./SectionMarkers";
|
|
8
|
+
/** @docs-package-description
|
|
9
|
+
* The hypermodeling package enables visualization of section drawings in a spatial context.
|
|
10
|
+
*/
|
|
11
|
+
/** @docs-group-description HyperModeling
|
|
12
|
+
* APIs for controlling visualization of section drawings in a spatial context.
|
|
13
|
+
*/
|
|
14
14
|
//# sourceMappingURL=hypermodeling-frontend.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
export * from "./HyperModeling";
|
|
6
|
-
export * from "./HyperModelingConfig";
|
|
7
|
-
export * from "./HyperModelingDecorator";
|
|
8
|
-
export * from "./SectionMarkerHandler";
|
|
9
|
-
export * from "./SectionDrawingLocationState";
|
|
10
|
-
export * from "./SectionGraphicsProvider";
|
|
11
|
-
export * from "./SectionMarkers";
|
|
12
|
-
/** @docs-package-description
|
|
13
|
-
* The hypermodeling package enables visualization of section drawings in a spatial context.
|
|
14
|
-
*/
|
|
15
|
-
/** @docs-group-description HyperModeling
|
|
16
|
-
* APIs for controlling visualization of section drawings in a spatial context.
|
|
17
|
-
*/
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
export * from "./HyperModeling";
|
|
6
|
+
export * from "./HyperModelingConfig";
|
|
7
|
+
export * from "./HyperModelingDecorator";
|
|
8
|
+
export * from "./SectionMarkerHandler";
|
|
9
|
+
export * from "./SectionDrawingLocationState";
|
|
10
|
+
export * from "./SectionGraphicsProvider";
|
|
11
|
+
export * from "./SectionMarkers";
|
|
12
|
+
/** @docs-package-description
|
|
13
|
+
* The hypermodeling package enables visualization of section drawings in a spatial context.
|
|
14
|
+
*/
|
|
15
|
+
/** @docs-group-description HyperModeling
|
|
16
|
+
* APIs for controlling visualization of section drawings in a spatial context.
|
|
17
|
+
*/
|
|
18
18
|
//# sourceMappingURL=hypermodeling-frontend.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/hypermodeling-frontend",
|
|
3
|
-
"version": "4.0.0-dev.
|
|
3
|
+
"version": "4.0.0-dev.100",
|
|
4
4
|
"description": "iTwin.js hypermodeling package",
|
|
5
5
|
"main": "lib/cjs/hypermodeling-frontend.js",
|
|
6
6
|
"module": "lib/esm/hypermodeling-frontend.js",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/iTwin/itwinjs-core
|
|
11
|
+
"url": "https://github.com/iTwin/itwinjs-core.git",
|
|
12
|
+
"directory": "core/hypermodeling"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [
|
|
14
15
|
"Bentley",
|
|
@@ -21,37 +22,37 @@
|
|
|
21
22
|
"url": "http://www.bentley.com"
|
|
22
23
|
},
|
|
23
24
|
"peerDependencies": {
|
|
24
|
-
"@itwin/core-bentley": "^4.0.0-dev.
|
|
25
|
-
"@itwin/core-common": "^4.0.0-dev.
|
|
26
|
-
"@itwin/core-frontend": "^4.0.0-dev.
|
|
27
|
-
"@itwin/core-geometry": "^4.0.0-dev.
|
|
25
|
+
"@itwin/core-bentley": "^4.0.0-dev.100",
|
|
26
|
+
"@itwin/core-common": "^4.0.0-dev.100",
|
|
27
|
+
"@itwin/core-frontend": "^4.0.0-dev.100",
|
|
28
|
+
"@itwin/core-geometry": "^4.0.0-dev.100"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@itwin/
|
|
31
|
-
"@itwin/core-bentley": "4.0.0-dev.1",
|
|
32
|
-
"@itwin/core-common": "4.0.0-dev.1",
|
|
33
|
-
"@itwin/core-frontend": "4.0.0-dev.1",
|
|
34
|
-
"@itwin/core-geometry": "4.0.0-dev.1",
|
|
35
|
-
"@itwin/certa": "4.0.0-dev.1",
|
|
36
|
-
"@itwin/eslint-plugin": "4.0.0-dev.1",
|
|
31
|
+
"@itwin/eslint-plugin": "^4.0.0-dev.33",
|
|
37
32
|
"@types/chai": "4.3.1",
|
|
38
33
|
"@types/mocha": "^8.2.2",
|
|
39
|
-
"@types/node": "18.11.5",
|
|
34
|
+
"@types/node": "^18.11.5",
|
|
40
35
|
"babel-loader": "~8.2.5",
|
|
41
36
|
"babel-plugin-istanbul": "~6.1.1",
|
|
42
37
|
"chai": "^4.1.2",
|
|
43
38
|
"cpx2": "^3.0.0",
|
|
44
|
-
"eslint": "^
|
|
39
|
+
"eslint": "^8.36.0",
|
|
45
40
|
"glob": "^7.1.2",
|
|
46
41
|
"mocha": "^10.0.0",
|
|
47
42
|
"nyc": "^15.1.0",
|
|
48
43
|
"rimraf": "^3.0.2",
|
|
49
44
|
"source-map-loader": "^4.0.0",
|
|
50
|
-
"typescript": "~
|
|
51
|
-
"webpack": "^5.
|
|
45
|
+
"typescript": "~5.0.2",
|
|
46
|
+
"webpack": "^5.76.0",
|
|
47
|
+
"@itwin/build-tools": "4.0.0-dev.100",
|
|
48
|
+
"@itwin/core-common": "4.0.0-dev.100",
|
|
49
|
+
"@itwin/core-frontend": "4.0.0-dev.100",
|
|
50
|
+
"@itwin/core-bentley": "4.0.0-dev.100",
|
|
51
|
+
"@itwin/core-geometry": "4.0.0-dev.100",
|
|
52
|
+
"@itwin/certa": "4.0.0-dev.100"
|
|
52
53
|
},
|
|
53
54
|
"dependencies": {
|
|
54
|
-
"@itwin/appui-abstract": "4.0.0-dev.
|
|
55
|
+
"@itwin/appui-abstract": "4.0.0-dev.100"
|
|
55
56
|
},
|
|
56
57
|
"nyc": {
|
|
57
58
|
"extends": "./node_modules/@itwin/build-tools/.nycrc"
|
|
@@ -63,8 +64,7 @@
|
|
|
63
64
|
"extends": "plugin:@itwin/itwinjs-recommended"
|
|
64
65
|
},
|
|
65
66
|
"scripts": {
|
|
66
|
-
"build": "npm run -s copy:public && npm run -s build:cjs",
|
|
67
|
-
"build:ci": "npm run -s build && npm run -s build:esm",
|
|
67
|
+
"build": "npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm",
|
|
68
68
|
"build:cjs": "tsc 1>&2 --outDir lib/cjs",
|
|
69
69
|
"build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm",
|
|
70
70
|
"clean": "rimraf lib .rush/temp/package-deps*.json",
|
|
@@ -77,6 +77,5 @@
|
|
|
77
77
|
"test": "npm run -s webpackTests && certa -r chrome",
|
|
78
78
|
"test:debug": "certa -r chrome --debug",
|
|
79
79
|
"webpackTests": "webpack --config ./src/test/utils/webpack.config.js 1>&2"
|
|
80
|
-
}
|
|
81
|
-
"readme": "# Hypermodeling Extension\r\n\r\nCopyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.\r\n\r\nThis package enables a feature called \"hyper-modeling\". iModels often contain 2d views of spatial model(s) intended to serve as documentation, called \"section drawings\". These views are produced by applying a section (clip) volume to the spatial geometry and projecting the section cut geometry onto the plane to generate a 2d view. A spatial element called a \"section drawing location\" is positioned at the section cut plane, with a link to the 2d section view. Hyper-modeling allows the 2d graphics to be displayed in situ with the spatial models at the section drawing location.\r\n\r\n## Usage\r\n\r\nBefore any of the package's APIs are used, the application must call and await the result of `HyperModeling.initialize()`. Typically this will be done when the app starts up. For example:\r\n\r\n```ts\r\n await IModelApp.startup();\r\n await HyperModeling.initialize();\r\n```\r\n\r\nThe API entry point is `HyperModeling`. Use `HyperModeling.startOrStop()` to toggle hypermodeling features for a `Viewport`. When enabled, a marker is displayed in the viewport for each section drawing location. Clicking the marker applies the section clip and displays the graphics from the section drawing, along with any sheet annotations, in situ with the spatial model(s). Hovering over a marker opens a mini-toolbar with additional interactions:\r\n * Apply Section: Applies the section clip and displays the section graphics and sheet annotations.\r\n * Open Section: Navigate to the 2d section drawing view.\r\n * Open Sheet: If the section drawing was placed onto a sheet, navigate to the corresponding view attachment.\r\n\r\n## Key-ins\r\n\r\nThe package exposes the following key-in commands:\r\n\r\n* `hypermodeling [toggle]`: Enables or disables hypermodeling for the active viewport. Arguments:\r\n * `toggle`: \"ON\" to enable hypermodeling, \"OFF\" to disable, or \"TOGGLE\" to invert the current state. Default: \"TOGGLE\".\r\n* `hypermodeling marker config [category] [model] [hiddenSectionTypes]`: Changes aspects of the marker display configuration for the active viewport. If no arguments are supplied, all settings are reset to defaults. Arguments:\r\n * `category=0|1`: If 1, only markers belonging to visible categories are displayed; if 0, markers on all categories are displayed.\r\n * `model=0|1`: If 1, only markers belonging to visible models are displayed; if 0, markers in all models are displayed.\r\n * `hiddenSectionTypes=p|e|s|d`: Specifies types of markers that should not be displayed - (p)lan, (e)levation, (d)etail, and (s)ection. Multiple types can be specified - e.g., `hiddenSectionTypes=pd` indicates plan and detail section markers should be hidden.\r\n* `hypermodeling merker default config`: Changes aspects of the global marker display configuration used for any subsequently creted HyperModelingDecorators. The arguments are the same as for `hypermodeling marker config`.\r\n* `hypermodeling graphics config [drawing] [sheet] [clip] [boundaries]`: Changes aspects of the global configuration affecting how section graphics are displayed. Each argument is of the form `name=0|1` where 0 indicates the option should be disabled and 1 indicates it should be enabled. Arguments:\r\n * `drawing=0|1`: Whether to display the section drawing graphics.\r\n * `sheet=0|1`: Whether to draw the sheet annotations.\r\n * `clip=0|1`: Whether to apply clip volumes to the 2d graphics.\r\n * `boundaries=0|1`: Whether to visualize 2d clip volumes as boundary shapes for debugging.\r\n\r\n## Contributing\r\n\r\n[Contributing to iTwin.js](https://github.com/iTwin/itwinjs-core/blob/master/CONTRIBUTING.md)\r\n"
|
|
80
|
+
}
|
|
82
81
|
}
|