fcs-core-viewer 0.39.0 → 0.40.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/fcs-core-editor@types/Editor3D/Network/SocketCommandsGateway.d.ts +4 -1
- package/fcs-core-editor@types/Editor3D/Operations/ModelView/Index.d.ts +2 -0
- package/fcs-core-editor@types/Editor3D/Operations/ModelView/VisibilityOperations.d.ts +5 -0
- package/fcs-core-editor@types/Editor3D/Operations/OperationCollection.d.ts +3 -0
- package/fcs-core-editor@types/Editor3D/Operations/Query/EntityProperties.d.ts +7 -0
- package/fcs-core-editor@types/Editor3D/UserInterface/UIComponents/MainMenu/Operations/CAD/AnalysisTools/UIMeasureDistance.d.ts +4 -1
- package/fcs-core-editor@types/Editor3D/UserInterface/UIComponents/MainMenu/ToolsetPanel.d.ts +2 -1
- package/fcs-core-editor@types/Viewer3D/UserInterface/UIComponents/{Modal/Modal.d.ts → Modals/DiagnosticModal.d.ts} +2 -2
- package/fcs-core-editor@types/Viewer3D/UserInterface/UIComponents/Modals/DistanceMeasurementLabel.d.ts +36 -0
- package/fcs-core-editor@types/Viewer3D/UserInterface/UIComponents/Modals/PropertiesModal.d.ts +60 -0
- package/fcs-core-editor@types/Viewer3D/UserInterface/UIComponents/Modals/TextLabel.d.ts +35 -0
- package/fcs-core-editor@types/Viewer3D/UserInterface/UIComponents/Model/Model.d.ts +2 -1
- package/fcs-core-editor@types/Viewer3D/Viewer3DAPI.d.ts +1 -0
- package/fcs-core-editor@types/Viewer3D/ViewerCommands/Index.d.ts +1 -0
- package/fcs-core-editor@types/Viewer3D/ViewerCommands/View/Index.d.ts +1 -0
- package/fcs-core-editor@types/Viewer3D/ViewerCommands/View/Representation.d.ts +6 -2
- package/fcs-core-editor@types/Viewer3D/ViewerCommands/Visualization/Visibility.d.ts +5 -0
- package/fcs-core-editor@types/Viewer3D/Wrapper/SceneWrapper.d.ts +5 -0
- package/package.json +1 -1
|
@@ -62,6 +62,7 @@ export declare class SocketCommandsGateway implements IBackendEvents {
|
|
|
62
62
|
center_view: any;
|
|
63
63
|
refresh_viewer: any;
|
|
64
64
|
set_color_by_quality: any;
|
|
65
|
+
set_entity_representation: any;
|
|
65
66
|
clear_model: any;
|
|
66
67
|
set_element_types: any;
|
|
67
68
|
modify_mesh: any;
|
|
@@ -84,7 +85,8 @@ export declare class SocketCommandsGateway implements IBackendEvents {
|
|
|
84
85
|
[key: string]: PluginService;
|
|
85
86
|
};
|
|
86
87
|
/**
|
|
87
|
-
* Contains all approved
|
|
88
|
+
* Contains all approved unique service names,
|
|
89
|
+
* made of the concatenation of $serviceName-$implClassName
|
|
88
90
|
*/
|
|
89
91
|
registeredPluginNames: string[];
|
|
90
92
|
/**
|
|
@@ -185,6 +187,7 @@ export declare class SocketCommandsGateway implements IBackendEvents {
|
|
|
185
187
|
*/
|
|
186
188
|
set_transparency(instructions: BackendInstructions): CommandExecutionResponse | "Finished: set_transparency";
|
|
187
189
|
set_color_by_quality(data: BackendInstructions): CommandExecutionResponse;
|
|
190
|
+
set_entity_representation(data: BackendInstructions): CommandExecutionResponse;
|
|
188
191
|
set_instance_visibility(instructions: BackendInstructions): Promise<CommandExecutionResponse>;
|
|
189
192
|
/**
|
|
190
193
|
* Overrides mesh element models from default.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as DeleteShapes from './DeleteShapes';
|
|
2
2
|
import * as ModelViewEventHandlerE3D from './ModelViewEventHandlerE3D';
|
|
3
|
+
import * as VisibilityOperations from './VisibilityOperations';
|
|
3
4
|
declare const ModelViewOperations: {
|
|
5
|
+
SetDisplaySettings: typeof VisibilityOperations.SetDisplaySettings;
|
|
4
6
|
ModelEventHandlerE3D: typeof ModelViewEventHandlerE3D.ModelEventHandlerE3D;
|
|
5
7
|
DeleteShapes: typeof DeleteShapes.DeleteShapes;
|
|
6
8
|
};
|
|
@@ -22,6 +22,7 @@ export declare enum OperationToId {
|
|
|
22
22
|
Common_Exchange_ImportMED = 1103,
|
|
23
23
|
Common_Exchange_ImportINPAbaqus = 1104,
|
|
24
24
|
Common_Exchange_ImportOBJ = 1105,
|
|
25
|
+
Common_Exchange_ImportIFC = 1106,
|
|
25
26
|
Common_Exchange_ExportMED = 1110,
|
|
26
27
|
Common_Exchange_ExportSTL = 1111,
|
|
27
28
|
Common_Exchange_ExportGMSH = 1112,
|
|
@@ -35,6 +36,7 @@ export declare enum OperationToId {
|
|
|
35
36
|
Common_Core_AddFile = 1202,
|
|
36
37
|
Common_Core_CopyPasteShape = 1210,
|
|
37
38
|
Common_Core_CutPasteShape = 1211,
|
|
39
|
+
Common_Core_GetShapeProperties = 1220,
|
|
38
40
|
/**
|
|
39
41
|
* Model Tree - 13xx
|
|
40
42
|
*/
|
|
@@ -43,6 +45,7 @@ export declare enum OperationToId {
|
|
|
43
45
|
/**
|
|
44
46
|
* Model View - 14xx
|
|
45
47
|
*/
|
|
48
|
+
ModelView_SetDisplaySettings = 1400,
|
|
46
49
|
/**
|
|
47
50
|
* CAD - Creation Tools - 20xx
|
|
48
51
|
*/
|
|
@@ -9,13 +9,16 @@ export declare class MeasureDistance extends Operation {
|
|
|
9
9
|
private readonly buttonsContainer;
|
|
10
10
|
private availableEntities_1;
|
|
11
11
|
private availableEntities_2;
|
|
12
|
+
private element2DMaterial;
|
|
12
13
|
private entityDropDownMenu_1;
|
|
13
14
|
private entityDropDownMenu_2;
|
|
15
|
+
private showDistanceLinesInput;
|
|
16
|
+
private createDistanceLines;
|
|
14
17
|
private selectionData;
|
|
15
|
-
private element2DMaterial;
|
|
16
18
|
constructor(onPreview?: OnPreviewHandler, onAccept?: OnAcceptHandler, onReject?: OnRejectHandler);
|
|
17
19
|
private setEnabledEntity;
|
|
18
20
|
private setActiveButton;
|
|
21
|
+
private addCheckmarks;
|
|
19
22
|
/**
|
|
20
23
|
* Add entity button
|
|
21
24
|
*/
|
package/fcs-core-editor@types/Editor3D/UserInterface/UIComponents/MainMenu/ToolsetPanel.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { IViewerHtmlElement } from "../../../../Viewer3D/UserInterface/UICompone
|
|
|
2
2
|
import { OperationsPanel } from "./OperationsPanel";
|
|
3
3
|
import { IMethodGroup } from "./IMethodGroup";
|
|
4
4
|
import { IButtonGroup } from "../../../../Viewer3D/UserInterface/UIComponents/BuildingBlocks/UserInterfaces/IButtonGroup";
|
|
5
|
+
import { Button } from "../../../../Viewer3D/UserInterface/UIComponents/BuildingBlocks/OperationPanelComponents/Button";
|
|
5
6
|
import { LabelConfig } from "../../../../Viewer3D/UserInterface/UIComponents/BuildingBlocks/OperationPanelComponents/Label";
|
|
6
7
|
import { ToolButton } from "../../../../Viewer3D/UserInterface/UIComponents/BuildingBlocks/MainMenuComponents/ToolButton";
|
|
7
8
|
export declare class ToolsetPanel implements IViewerHtmlElement, IMethodGroup {
|
|
@@ -31,7 +32,7 @@ export declare class ToolsetPanel implements IViewerHtmlElement, IMethodGroup {
|
|
|
31
32
|
reset(): void;
|
|
32
33
|
private updateCreatedElementsStyle;
|
|
33
34
|
addContainer(styles: Partial<CSSStyleDeclaration>): HTMLDivElement;
|
|
34
|
-
addPrimaryButton(title: string, callback?: () => void, styles?: Partial<CSSStyleDeclaration>, container?: HTMLElement):
|
|
35
|
+
addPrimaryButton(title: string, callback?: () => void, styles?: Partial<CSSStyleDeclaration>, container?: HTMLElement): Button;
|
|
35
36
|
addButton_FileBrowser(labelConfig?: LabelConfig, onChangeHandler?: (file: FileList) => void): void;
|
|
36
37
|
addParagraph(text: string, styles: Partial<CSSStyleDeclaration>): void;
|
|
37
38
|
addOperation(operation: any): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IViewerHtmlElement } from "../BuildingBlocks/MainMenuComponents/HtmlElementInterface";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class DiagnosticModal implements IViewerHtmlElement {
|
|
3
3
|
/**
|
|
4
4
|
* Singleton instance
|
|
5
5
|
*/
|
|
@@ -13,7 +13,7 @@ export declare class Modal implements IViewerHtmlElement {
|
|
|
13
13
|
/**
|
|
14
14
|
* Getter for singleton instance.
|
|
15
15
|
*/
|
|
16
|
-
static getInstance():
|
|
16
|
+
static getInstance(): DiagnosticModal;
|
|
17
17
|
private buildModalHeader;
|
|
18
18
|
private buildModalBody;
|
|
19
19
|
private buildModalFooter;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { TextLabel, Vector3 } from "./TextLabel";
|
|
2
|
+
type LabelOpts = {
|
|
3
|
+
textColor?: string;
|
|
4
|
+
frameColor?: string;
|
|
5
|
+
borderColor?: string;
|
|
6
|
+
fontSize?: string;
|
|
7
|
+
padding?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare class DistanceMeasurementLabel extends TextLabel {
|
|
10
|
+
private start;
|
|
11
|
+
private end;
|
|
12
|
+
private line;
|
|
13
|
+
private lineGeom;
|
|
14
|
+
private lineMat;
|
|
15
|
+
private baseTextColor;
|
|
16
|
+
private baseFrameColor;
|
|
17
|
+
private baseBorderColor?;
|
|
18
|
+
private baseLineColor;
|
|
19
|
+
private hoverTextColor;
|
|
20
|
+
private hoverFrameColor;
|
|
21
|
+
private hoverBorderColor;
|
|
22
|
+
private hoverLineColor;
|
|
23
|
+
constructor(entityId: string, start: Vector3, end: Vector3, text?: string, opts?: LabelOpts);
|
|
24
|
+
/** Show label + add line to the scene. */
|
|
25
|
+
open(): void;
|
|
26
|
+
/** Hide label + hide line. */
|
|
27
|
+
close(): void;
|
|
28
|
+
/** Remove label + remove line and dispose resources. */
|
|
29
|
+
remove(): void;
|
|
30
|
+
/** Update endpoints; repositions the label to the new midpoint and updates distance text if auto text was used. */
|
|
31
|
+
updateEndpoints(start: Vector3, end: Vector3, text?: string): void;
|
|
32
|
+
private setupEvents;
|
|
33
|
+
private static midpoint;
|
|
34
|
+
private static calcLength;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type Vector3 = {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
z: number;
|
|
5
|
+
};
|
|
6
|
+
export interface IViewerHtmlElement {
|
|
7
|
+
setHtmlParent: (parent: HTMLElement) => void;
|
|
8
|
+
setParent: (parent: IViewerHtmlElement) => void;
|
|
9
|
+
remove: () => void;
|
|
10
|
+
getHtmlElement: () => HTMLElement;
|
|
11
|
+
reset: () => void;
|
|
12
|
+
init?: () => void;
|
|
13
|
+
}
|
|
14
|
+
declare class PropertiesModal implements IViewerHtmlElement {
|
|
15
|
+
private readonly entityId;
|
|
16
|
+
private readonly anchor;
|
|
17
|
+
private fields;
|
|
18
|
+
private cardRoot;
|
|
19
|
+
private headerEl;
|
|
20
|
+
private bodyEl;
|
|
21
|
+
private footerEl;
|
|
22
|
+
private cssObj;
|
|
23
|
+
private addedToScene;
|
|
24
|
+
private isOpen;
|
|
25
|
+
constructor(entityId: string, anchor: Vector3, title?: string);
|
|
26
|
+
AddField(key: string, value: string): void;
|
|
27
|
+
GetFields(): Map<string, string>;
|
|
28
|
+
RemoveField(key: string): void;
|
|
29
|
+
open(): void;
|
|
30
|
+
close(): void;
|
|
31
|
+
moveTo(x: number, y: number, z: number): void;
|
|
32
|
+
getHtmlElement(): HTMLElement;
|
|
33
|
+
remove(): void;
|
|
34
|
+
setHtmlParent(_parent: HTMLElement): void;
|
|
35
|
+
setParent(_parent: IViewerHtmlElement): void;
|
|
36
|
+
reset(): void;
|
|
37
|
+
private renderFields;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Singleton container that manages all PropertiesModal instances keyed by entityId.
|
|
41
|
+
*/
|
|
42
|
+
export declare class PropertiesModalsContainer {
|
|
43
|
+
private static _instance;
|
|
44
|
+
private readonly modals;
|
|
45
|
+
private constructor();
|
|
46
|
+
static getInstance(): PropertiesModalsContainer;
|
|
47
|
+
/** Returns the modal for an entity if it exists. */
|
|
48
|
+
get(entityId: string): PropertiesModal | undefined;
|
|
49
|
+
/** Creates or replaces a modal for an entity. */
|
|
50
|
+
create(entityId: string, anchor: Vector3, title?: string): PropertiesModal;
|
|
51
|
+
/** Ensures a modal exists; returns existing or creates a new one. */
|
|
52
|
+
getOrCreate(entityId: string, anchor: Vector3, title?: string): PropertiesModal;
|
|
53
|
+
/** Removes and destroys the modal for an entity. */
|
|
54
|
+
remove(entityId: string): void;
|
|
55
|
+
/** Iterates all modals. */
|
|
56
|
+
entries(): IterableIterator<[string, PropertiesModal]>;
|
|
57
|
+
/** Closes & clears all modals. */
|
|
58
|
+
clear(): void;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IViewerHtmlElement } from "../BuildingBlocks/MainMenuComponents/HtmlElementInterface";
|
|
2
|
+
export type Vector3 = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
z: number;
|
|
6
|
+
};
|
|
7
|
+
type TextLabelOptions = {
|
|
8
|
+
textColor?: string;
|
|
9
|
+
frameColor?: string;
|
|
10
|
+
borderColor?: string;
|
|
11
|
+
fontSize?: string;
|
|
12
|
+
padding?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare class TextLabel implements IViewerHtmlElement {
|
|
15
|
+
private readonly entityId;
|
|
16
|
+
private cssObj;
|
|
17
|
+
private addedToScene;
|
|
18
|
+
private isOpen;
|
|
19
|
+
private root;
|
|
20
|
+
private textEl;
|
|
21
|
+
constructor(entityId: string, position: Vector3, text: string, opts?: TextLabelOptions);
|
|
22
|
+
open(): void;
|
|
23
|
+
close(): void;
|
|
24
|
+
setText(text: string): void;
|
|
25
|
+
/** Quickly update colors (background = frameColor, text = textColor). */
|
|
26
|
+
setColors(textColor: string, frameColor: string, borderColor?: string): void;
|
|
27
|
+
/** Reposition label in world space. */
|
|
28
|
+
moveTo(x: number, y: number, z: number): void;
|
|
29
|
+
getHtmlElement(): HTMLElement;
|
|
30
|
+
remove(): void;
|
|
31
|
+
setHtmlParent(_parent: HTMLElement): void;
|
|
32
|
+
setParent(_parent: IViewerHtmlElement): void;
|
|
33
|
+
reset(): void;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export * from './Common/Foundations/Index';
|
|
6
6
|
export * from './ViewerEntities/Index';
|
|
7
7
|
export * from './Wrapper/Settings/Index';
|
|
8
|
+
export * from './DataStorage/ModelData/Index';
|
|
8
9
|
export * from './Common/Index';
|
|
9
10
|
export * from './Loader/Index';
|
|
10
11
|
export * from './UI/Index';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const ViewerCommands: {
|
|
2
2
|
ViewCommands: {
|
|
3
3
|
Screenshot: typeof import("./View/Screenshot").Screenshot;
|
|
4
|
+
RepresentationOption: typeof import("./View/Representation").RepresentationOption;
|
|
4
5
|
ToggleVertices: typeof import("./View/Representation").ToggleVertices;
|
|
5
6
|
ToggleNodes: typeof import("./View/Representation").ToggleNodes;
|
|
6
7
|
ToggleEdges: typeof import("./View/Representation").ToggleEdges;
|
|
@@ -5,6 +5,7 @@ import * as Representation from './Representation';
|
|
|
5
5
|
import * as Screenshot from './Screenshot';
|
|
6
6
|
declare const ViewCommands: {
|
|
7
7
|
Screenshot: typeof Screenshot.Screenshot;
|
|
8
|
+
RepresentationOption: typeof Representation.RepresentationOption;
|
|
8
9
|
ToggleVertices: typeof Representation.ToggleVertices;
|
|
9
10
|
ToggleNodes: typeof Representation.ToggleNodes;
|
|
10
11
|
ToggleEdges: typeof Representation.ToggleEdges;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as THREE from '../../three/build/three.module';
|
|
2
2
|
import { SceneWrapper } from "../../Wrapper/SceneWrapper";
|
|
3
|
+
export declare enum RepresentationOption {
|
|
4
|
+
TOGGLE_BORDER = 0,
|
|
5
|
+
TOGGLE_GEOM_FACES = 1
|
|
6
|
+
}
|
|
3
7
|
declare class Representation {
|
|
4
8
|
sceneWrapper: SceneWrapper;
|
|
5
9
|
controls: THREE.TrackballControls;
|
|
@@ -44,14 +48,14 @@ export declare class ToggleEdges extends Representation {
|
|
|
44
48
|
*/
|
|
45
49
|
export declare class ToggleBorder extends Representation {
|
|
46
50
|
constructor();
|
|
47
|
-
perform(): void;
|
|
51
|
+
perform(enforceToggle?: boolean): void;
|
|
48
52
|
}
|
|
49
53
|
/**
|
|
50
54
|
* Show/hide geometrical faces
|
|
51
55
|
*/
|
|
52
56
|
export declare class ToggleFaces extends Representation {
|
|
53
57
|
constructor();
|
|
54
|
-
perform(): void;
|
|
58
|
+
perform(enforceToggle?: boolean): void;
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
57
61
|
* Show/hide discrete elements
|
|
@@ -15,6 +15,11 @@ export declare class Visibility {
|
|
|
15
15
|
div_treeHTML: HTMLElement;
|
|
16
16
|
elements: NodeListOf<Element>;
|
|
17
17
|
activeButton: EntityButton;
|
|
18
|
+
borderMaterial: THREE.ShaderMaterial;
|
|
19
|
+
tempBorderMaterial: THREE.ShaderMaterial;
|
|
20
|
+
lineMaterial: THREE.ShaderMaterial;
|
|
21
|
+
edgeMaterial: THREE.ShaderMaterial;
|
|
22
|
+
element1DMaterial: THREE.ShaderMaterial;
|
|
18
23
|
constructor();
|
|
19
24
|
showAll(): void;
|
|
20
25
|
hideAll(): void;
|
|
@@ -147,6 +147,11 @@ export declare class SceneWrapper {
|
|
|
147
147
|
radius: any;
|
|
148
148
|
center: any;
|
|
149
149
|
};
|
|
150
|
+
/**
|
|
151
|
+
* Re-renders the scene, call this method, if you want to update
|
|
152
|
+
* to a newly rendered scene.
|
|
153
|
+
*/
|
|
154
|
+
refreshViewer(): void;
|
|
150
155
|
getMenuSections(): any[];
|
|
151
156
|
getTopbarSections_L1(): any[];
|
|
152
157
|
getTopbarSections_L2(): any[];
|