@inweb/client 25.3.12 → 25.3.13

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 (205) hide show
  1. package/README.md +17 -35
  2. package/dist/client.js +16 -17365
  3. package/dist/client.js.map +1 -1
  4. package/dist/client.min.js +1 -1
  5. package/dist/client.module.js +3 -5553
  6. package/dist/client.module.js.map +1 -1
  7. package/lib/Api/Assembly.d.ts +0 -1
  8. package/lib/Api/ClashTest.d.ts +0 -1
  9. package/lib/Api/Client.d.ts +1 -2
  10. package/lib/Api/ClientEvents.d.ts +0 -1
  11. package/lib/Api/File.d.ts +0 -1
  12. package/lib/Api/HttpClient.d.ts +0 -1
  13. package/lib/Api/IAssembly.d.ts +0 -1
  14. package/lib/Api/IFile.d.ts +0 -1
  15. package/lib/Api/IHttpClient.d.ts +0 -1
  16. package/lib/Api/IUser.d.ts +0 -1
  17. package/lib/Api/Job.d.ts +0 -1
  18. package/lib/Api/Member.d.ts +0 -1
  19. package/lib/Api/Model.d.ts +0 -1
  20. package/lib/Api/Permission.d.ts +0 -1
  21. package/lib/Api/Project.d.ts +0 -1
  22. package/lib/Api/Role.d.ts +0 -1
  23. package/lib/Api/User.d.ts +0 -1
  24. package/lib/Api/impl/FetchError.d.ts +0 -1
  25. package/lib/Api/impl/Utils.d.ts +0 -1
  26. package/lib/Api/impl/http.d.ts +0 -1
  27. package/lib/ConvetMath.d.ts +0 -1
  28. package/lib/index.d.ts +1 -13
  29. package/package.json +5 -11
  30. package/src/Api/Client.ts +2 -1
  31. package/src/index.ts +1 -13
  32. package/lib/Viewer/CanvasEvents.d.ts +0 -2
  33. package/lib/Viewer/Commands/ApplyModelTransform.d.ts +0 -2
  34. package/lib/Viewer/Commands/ClearMarkup.d.ts +0 -2
  35. package/lib/Viewer/Commands/ClearSlices.d.ts +0 -2
  36. package/lib/Viewer/Commands/CreatePreview.d.ts +0 -2
  37. package/lib/Viewer/Commands/Explode.d.ts +0 -2
  38. package/lib/Viewer/Commands/GetDefaultViewPositions.d.ts +0 -2
  39. package/lib/Viewer/Commands/GetModels.d.ts +0 -2
  40. package/lib/Viewer/Commands/GetSelected.d.ts +0 -2
  41. package/lib/Viewer/Commands/HideSelected.d.ts +0 -2
  42. package/lib/Viewer/Commands/IsolateSelected.d.ts +0 -2
  43. package/lib/Viewer/Commands/RegenerateAll.d.ts +0 -2
  44. package/lib/Viewer/Commands/ResetView.d.ts +0 -2
  45. package/lib/Viewer/Commands/SelectModel.d.ts +0 -2
  46. package/lib/Viewer/Commands/SetActiveDragger.d.ts +0 -2
  47. package/lib/Viewer/Commands/SetDefaultViewPosition.d.ts +0 -2
  48. package/lib/Viewer/Commands/SetMarkupColor.d.ts +0 -2
  49. package/lib/Viewer/Commands/SetSelected.d.ts +0 -2
  50. package/lib/Viewer/Commands/ShowAll.d.ts +0 -2
  51. package/lib/Viewer/Commands/Unselect.d.ts +0 -2
  52. package/lib/Viewer/Commands/ZoomToExtents.d.ts +0 -2
  53. package/lib/Viewer/Commands/ZoomToObjects.d.ts +0 -2
  54. package/lib/Viewer/Commands/ZoomToSelected.d.ts +0 -2
  55. package/lib/Viewer/Commands.d.ts +0 -3
  56. package/lib/Viewer/Draggers/Actions/OrbitAction.d.ts +0 -22
  57. package/lib/Viewer/Draggers/Actions/PanAction.d.ts +0 -18
  58. package/lib/Viewer/Draggers/Actions/ZoomAction.d.ts +0 -8
  59. package/lib/Viewer/Draggers/Common/Geometry.d.ts +0 -115
  60. package/lib/Viewer/Draggers/Common/GestureManager.d.ts +0 -41
  61. package/lib/Viewer/Draggers/Common/OdBaseDragger.d.ts +0 -54
  62. package/lib/Viewer/Draggers/Common/OdaGeAction.d.ts +0 -30
  63. package/lib/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.d.ts +0 -31
  64. package/lib/Viewer/Draggers/MeasureLineDragger/MeasureUtils.d.ts +0 -20
  65. package/lib/Viewer/Draggers/MeasureLineDragger/index.d.ts +0 -24
  66. package/lib/Viewer/Draggers/OdBaseCuttingPlaneDragger.d.ts +0 -27
  67. package/lib/Viewer/Draggers/OdCuttingPlaneXAxisDragger.d.ts +0 -8
  68. package/lib/Viewer/Draggers/OdCuttingPlaneYAxisDragger.d.ts +0 -8
  69. package/lib/Viewer/Draggers/OdCuttingPlaneZAxisDragger.d.ts +0 -8
  70. package/lib/Viewer/Draggers/OdOrbitDragger.d.ts +0 -15
  71. package/lib/Viewer/Draggers/OdPanDragger.d.ts +0 -12
  72. package/lib/Viewer/Draggers/OdZoomDragger.d.ts +0 -12
  73. package/lib/Viewer/Draggers/OdZoomWheelDragger.d.ts +0 -11
  74. package/lib/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.d.ts +0 -19
  75. package/lib/Viewer/Draggers/OdZoomWindowDragger/index.d.ts +0 -14
  76. package/lib/Viewer/Draggers/OdaLineDragger.d.ts +0 -15
  77. package/lib/Viewer/Draggers/OdaTextDragger.d.ts +0 -16
  78. package/lib/Viewer/Draggers/OdaWalkDragger.d.ts +0 -30
  79. package/lib/Viewer/Draggers/OrbitAroundBuildingDragger.d.ts +0 -19
  80. package/lib/Viewer/EventEmitter2.d.ts +0 -54
  81. package/lib/Viewer/ICommands.d.ts +0 -25
  82. package/lib/Viewer/IEventEmitter2.d.ts +0 -13
  83. package/lib/Viewer/IViewer.d.ts +0 -30
  84. package/lib/Viewer/Loaders/BaseLoader.d.ts +0 -11
  85. package/lib/Viewer/Loaders/LoaderFactory.d.ts +0 -11
  86. package/lib/Viewer/Loaders/TCSLoader.d.ts +0 -5
  87. package/lib/Viewer/Loaders/UpdaterController.d.ts +0 -15
  88. package/lib/Viewer/Loaders/VsfXLoader.d.ts +0 -5
  89. package/lib/Viewer/Loaders/VsfXPartialLoader.d.ts +0 -5
  90. package/lib/Viewer/Loaders/VsfXStreamingLoader.d.ts +0 -5
  91. package/lib/Viewer/Markup/Api/IMarkupArrow.d.ts +0 -22
  92. package/lib/Viewer/Markup/Api/IMarkupCloud.d.ts +0 -15
  93. package/lib/Viewer/Markup/Api/IMarkupColorable.d.ts +0 -5
  94. package/lib/Viewer/Markup/Api/IMarkupEllipse.d.ts +0 -15
  95. package/lib/Viewer/Markup/Api/IMarkupImage.d.ts +0 -15
  96. package/lib/Viewer/Markup/Api/IMarkupLine.d.ts +0 -13
  97. package/lib/Viewer/Markup/Api/IMarkupObject.d.ts +0 -12
  98. package/lib/Viewer/Markup/Api/IMarkupRectangle.d.ts +0 -15
  99. package/lib/Viewer/Markup/Api/IMarkupText.d.ts +0 -13
  100. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaArrow.d.ts +0 -47
  101. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaCloud.d.ts +0 -36
  102. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.d.ts +0 -41
  103. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaImage.d.ts +0 -37
  104. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaLine.d.ts +0 -37
  105. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.d.ts +0 -39
  106. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaText.d.ts +0 -38
  107. package/lib/Viewer/Markup/IMarkup.d.ts +0 -40
  108. package/lib/Viewer/Markup/IViewpoint.d.ts +0 -129
  109. package/lib/Viewer/Markup/Impl/Konva/KonvaMarkup.d.ts +0 -72
  110. package/lib/Viewer/Markup/Impl/Konva/MarkupColor.d.ts +0 -19
  111. package/lib/Viewer/Markup/Impl/Visualize/VisualizeMarkup.d.ts +0 -34
  112. package/lib/Viewer/Markup/MarkupFactory.d.ts +0 -7
  113. package/lib/Viewer/Options.d.ts +0 -239
  114. package/lib/Viewer/OptionsEvents.d.ts +0 -26
  115. package/lib/Viewer/Viewer.d.ts +0 -354
  116. package/lib/Viewer/ViewerCommands.d.ts +0 -23
  117. package/lib/Viewer/ViewerEvents.d.ts +0 -602
  118. package/lib/Viewer/utils.d.ts +0 -4
  119. package/src/Viewer/CanvasEvents.ts +0 -41
  120. package/src/Viewer/Commands/ApplyModelTransform.ts +0 -70
  121. package/src/Viewer/Commands/ClearMarkup.ts +0 -28
  122. package/src/Viewer/Commands/ClearSlices.ts +0 -27
  123. package/src/Viewer/Commands/CreatePreview.ts +0 -33
  124. package/src/Viewer/Commands/Explode.ts +0 -38
  125. package/src/Viewer/Commands/GetDefaultViewPositions.ts +0 -36
  126. package/src/Viewer/Commands/GetModels.ts +0 -43
  127. package/src/Viewer/Commands/GetSelected.ts +0 -58
  128. package/src/Viewer/Commands/HideSelected.ts +0 -37
  129. package/src/Viewer/Commands/IsolateSelected.ts +0 -37
  130. package/src/Viewer/Commands/RegenerateAll.ts +0 -37
  131. package/src/Viewer/Commands/ResetView.ts +0 -43
  132. package/src/Viewer/Commands/SelectModel.ts +0 -52
  133. package/src/Viewer/Commands/SetActiveDragger.ts +0 -29
  134. package/src/Viewer/Commands/SetDefaultViewPosition.ts +0 -50
  135. package/src/Viewer/Commands/SetMarkupColor.ts +0 -29
  136. package/src/Viewer/Commands/SetSelected.ts +0 -47
  137. package/src/Viewer/Commands/ShowAll.ts +0 -37
  138. package/src/Viewer/Commands/Unselect.ts +0 -37
  139. package/src/Viewer/Commands/ZoomToExtents.ts +0 -43
  140. package/src/Viewer/Commands/ZoomToObjects.ts +0 -47
  141. package/src/Viewer/Commands/ZoomToSelected.ts +0 -39
  142. package/src/Viewer/Commands.ts +0 -81
  143. package/src/Viewer/Draggers/Actions/OrbitAction.ts +0 -250
  144. package/src/Viewer/Draggers/Actions/PanAction.ts +0 -102
  145. package/src/Viewer/Draggers/Actions/ZoomAction.ts +0 -45
  146. package/src/Viewer/Draggers/Common/Geometry.ts +0 -152
  147. package/src/Viewer/Draggers/Common/GestureManager.ts +0 -263
  148. package/src/Viewer/Draggers/Common/OdBaseDragger.ts +0 -270
  149. package/src/Viewer/Draggers/Common/OdaGeAction.ts +0 -146
  150. package/src/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.ts +0 -248
  151. package/src/Viewer/Draggers/MeasureLineDragger/MeasureUtils.ts +0 -182
  152. package/src/Viewer/Draggers/MeasureLineDragger/index.ts +0 -166
  153. package/src/Viewer/Draggers/OdBaseCuttingPlaneDragger.ts +0 -182
  154. package/src/Viewer/Draggers/OdCuttingPlaneXAxisDragger.ts +0 -53
  155. package/src/Viewer/Draggers/OdCuttingPlaneYAxisDragger.ts +0 -53
  156. package/src/Viewer/Draggers/OdCuttingPlaneZAxisDragger.ts +0 -53
  157. package/src/Viewer/Draggers/OdOrbitDragger.ts +0 -70
  158. package/src/Viewer/Draggers/OdPanDragger.ts +0 -62
  159. package/src/Viewer/Draggers/OdZoomDragger.ts +0 -59
  160. package/src/Viewer/Draggers/OdZoomWheelDragger.ts +0 -103
  161. package/src/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.ts +0 -123
  162. package/src/Viewer/Draggers/OdZoomWindowDragger/index.ts +0 -75
  163. package/src/Viewer/Draggers/OdaLineDragger.ts +0 -80
  164. package/src/Viewer/Draggers/OdaTextDragger.ts +0 -118
  165. package/src/Viewer/Draggers/OdaWalkDragger.ts +0 -278
  166. package/src/Viewer/Draggers/OrbitAroundBuildingDragger.ts +0 -184
  167. package/src/Viewer/EventEmitter2.ts +0 -116
  168. package/src/Viewer/ICommands.ts +0 -53
  169. package/src/Viewer/IEventEmitter2.ts +0 -36
  170. package/src/Viewer/IViewer.ts +0 -59
  171. package/src/Viewer/Loaders/BaseLoader.ts +0 -40
  172. package/src/Viewer/Loaders/LoaderFactory.ts +0 -47
  173. package/src/Viewer/Loaders/TCSLoader.ts +0 -82
  174. package/src/Viewer/Loaders/UpdaterController.ts +0 -36
  175. package/src/Viewer/Loaders/VsfXLoader.ts +0 -65
  176. package/src/Viewer/Loaders/VsfXPartialLoader.ts +0 -208
  177. package/src/Viewer/Loaders/VsfXStreamingLoader.ts +0 -87
  178. package/src/Viewer/Markup/Api/IMarkupArrow.ts +0 -12
  179. package/src/Viewer/Markup/Api/IMarkupCloud.ts +0 -15
  180. package/src/Viewer/Markup/Api/IMarkupColorable.ts +0 -4
  181. package/src/Viewer/Markup/Api/IMarkupEllipse.ts +0 -15
  182. package/src/Viewer/Markup/Api/IMarkupImage.ts +0 -15
  183. package/src/Viewer/Markup/Api/IMarkupLine.ts +0 -13
  184. package/src/Viewer/Markup/Api/IMarkupObject.ts +0 -15
  185. package/src/Viewer/Markup/Api/IMarkupRectangle.ts +0 -15
  186. package/src/Viewer/Markup/Api/IMarkupText.ts +0 -12
  187. package/src/Viewer/Markup/Api/Impl/Konva/KonvaArrow.ts +0 -117
  188. package/src/Viewer/Markup/Api/Impl/Konva/KonvaCloud.ts +0 -208
  189. package/src/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.ts +0 -118
  190. package/src/Viewer/Markup/Api/Impl/Konva/KonvaImage.ts +0 -123
  191. package/src/Viewer/Markup/Api/Impl/Konva/KonvaLine.ts +0 -131
  192. package/src/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.ts +0 -119
  193. package/src/Viewer/Markup/Api/Impl/Konva/KonvaText.ts +0 -110
  194. package/src/Viewer/Markup/IMarkup.ts +0 -41
  195. package/src/Viewer/Markup/IViewpoint.ts +0 -146
  196. package/src/Viewer/Markup/Impl/Konva/KonvaMarkup.ts +0 -1144
  197. package/src/Viewer/Markup/Impl/Konva/MarkupColor.ts +0 -39
  198. package/src/Viewer/Markup/Impl/Visualize/VisualizeMarkup.ts +0 -228
  199. package/src/Viewer/Markup/MarkupFactory.ts +0 -32
  200. package/src/Viewer/Options.ts +0 -527
  201. package/src/Viewer/OptionsEvents.ts +0 -28
  202. package/src/Viewer/Viewer.ts +0 -1182
  203. package/src/Viewer/ViewerCommands.ts +0 -45
  204. package/src/Viewer/ViewerEvents.ts +0 -705
  205. package/src/Viewer/utils.ts +0 -74
@@ -1,28 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- commands("VisualizeJS").registerCommand("clearMarkup", (viewer: Viewer) => viewer.clearOverlay());
28
- commands("VisualizeJS").registerCommandAlias("clearMarkup", "clearOverlay");
@@ -1,27 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- commands("VisualizeJS").registerCommand("clearSlices", (viewer: Viewer) => viewer.clearSlices());
@@ -1,33 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function createPreview(viewer: Viewer, type = "image/jpeg", encoderOptions = 0.25): string {
28
- if (!viewer.visualizeJs) return "";
29
-
30
- return viewer.canvas?.toDataURL(type, encoderOptions) || "";
31
- }
32
-
33
- commands("VisualizeJS").registerCommand("createPreview", createPreview);
@@ -1,38 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function explode(viewer: Viewer, index = 0): void {
28
- if (!viewer.visualizeJs) return;
29
-
30
- const visViewer = viewer.visViewer();
31
- visViewer.explode(index);
32
-
33
- viewer.update();
34
- viewer.emit({ type: "explode", data: index });
35
- }
36
-
37
- commands("VisualizeJS").registerCommand("explode", explode);
38
- commands("VisualizeJS").registerCommand("collect", (viewer: any) => explode(viewer, 0));
@@ -1,36 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function getDefaultViewPositions(viewer: Viewer): string[] {
28
- if (!viewer.visualizeJs) return [];
29
-
30
- const visLib = viewer.visLib();
31
-
32
- const defViewPos = visLib.DefaultViewPosition;
33
- return Object.keys(defViewPos).filter((x) => x !== "values");
34
- }
35
-
36
- commands("VisualizeJS").registerCommand("getDefaultViewPositions", getDefaultViewPositions);
@@ -1,43 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function getModels(viewer: Viewer): string[] {
28
- if (!viewer.visualizeJs) return [];
29
-
30
- const visViewer = viewer.visViewer();
31
-
32
- const handles: string[] = [];
33
- const modelItr = visViewer.getModelIterator();
34
- for (; !modelItr.done(); modelItr.step()) {
35
- const modelPtr = modelItr.getModel();
36
- if (modelPtr.getName()[0] !== "$") handles.push(modelPtr.getDatabaseHandle());
37
- }
38
- modelItr.delete();
39
-
40
- return handles;
41
- }
42
-
43
- commands("VisualizeJS").registerCommand("getModels", getModels);
@@ -1,58 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function getSelected(viewer: Viewer): string[] {
28
- if (!viewer.visualizeJs) return [];
29
-
30
- const visViewer = viewer.visViewer();
31
-
32
- const handles: string[] = [];
33
- const selectionSet = visViewer.getSelected();
34
- if (!selectionSet.isNull() && selectionSet.numItems() !== 0) {
35
- const itr = selectionSet.getIterator();
36
- for (; !itr.done(); itr.step()) {
37
- const entityId = itr.getEntity();
38
-
39
- const entityPtr =
40
- entityId.getType() === 1
41
- ? entityId.openObject()
42
- : entityId.getType() === 2
43
- ? entityId.openObjectAsInsert()
44
- : null;
45
-
46
- if (entityPtr) {
47
- const handle = entityPtr.getNativeDatabaseHandle();
48
- if (handle !== "-1") handles.push(handle);
49
- entityPtr.delete();
50
- }
51
- }
52
- itr.delete();
53
- }
54
-
55
- return handles;
56
- }
57
-
58
- commands("VisualizeJS").registerCommand("getSelected", getSelected);
@@ -1,37 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function hideSelected(viewer: Viewer): void {
28
- if (!viewer.visualizeJs) return;
29
-
30
- const visViewer = viewer.visViewer();
31
- visViewer.hideSelectedObjects(false);
32
-
33
- viewer.update();
34
- viewer.emit({ type: "hide" });
35
- }
36
-
37
- commands("VisualizeJS").registerCommand("hideSelected", hideSelected);
@@ -1,37 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function isolateSelected(viewer: Viewer): void {
28
- if (!viewer.visualizeJs) return;
29
-
30
- const visViewer = viewer.visViewer();
31
- visViewer.isolateSelectedObjects(false);
32
-
33
- viewer.update();
34
- viewer.emit({ type: "isolate" });
35
- }
36
-
37
- commands("VisualizeJS").registerCommand("isolateSelected", isolateSelected);
@@ -1,37 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function regenerateAll(viewer: Viewer): void {
28
- if (!viewer.visualizeJs) return;
29
-
30
- const visViewer = viewer.visViewer();
31
- visViewer.regenAll();
32
-
33
- viewer.update();
34
- viewer.emit({ type: "regenerateall" });
35
- }
36
-
37
- commands("VisualizeJS").registerCommand("regenerateAll", regenerateAll);
@@ -1,43 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function resetView(viewer: Viewer): void {
28
- if (!viewer.visualizeJs) return;
29
-
30
- viewer.executeCommand("setActiveDragger", "");
31
- viewer.executeCommand("clearSlices");
32
- viewer.executeCommand("clearOverlay");
33
- viewer.executeCommand("setMarkupColor");
34
- viewer.executeCommand("unselect");
35
- viewer.executeCommand("showAll");
36
- viewer.executeCommand("explode", 0);
37
- viewer.executeCommand("zoomToExtents", true);
38
- viewer.executeCommand("k3DViewSW");
39
-
40
- viewer.emit({ type: "resetview" });
41
- }
42
-
43
- commands("VisualizeJS").registerCommand("resetView", resetView);
@@ -1,52 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function selectModel(viewer: Viewer, handle: string): void {
28
- if (!viewer.visualizeJs) return;
29
-
30
- const visViewer = viewer.visViewer();
31
- const activeView = visViewer.activeView;
32
-
33
- const modelItr = visViewer.getModelIterator();
34
- for (; !modelItr.done(); modelItr.step()) {
35
- const modelPtr = modelItr.getModel();
36
- if (modelPtr.getDatabaseHandle() === handle) {
37
- const selectionSet = activeView.selectCrossing([0, 9999, 9999, 0], modelPtr);
38
-
39
- visViewer.setSelected(selectionSet);
40
- const handles = viewer.getSelected();
41
-
42
- viewer.update();
43
- viewer.emitEvent({ type: "select", data: selectionSet, handles });
44
-
45
- selectionSet.delete();
46
- break;
47
- }
48
- }
49
- modelItr.delete();
50
- }
51
-
52
- commands("VisualizeJS").registerCommand("selectModel", selectModel);
@@ -1,29 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- commands("VisualizeJS").registerCommand("setActiveDragger", (viewer: Viewer, dragger = "") => {
28
- viewer.setActiveDragger(dragger);
29
- });
@@ -1,50 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- function setDefaultViewPosition(viewer: Viewer, position = ""): void {
28
- if (!viewer.visualizeJs) return;
29
-
30
- const visLib = viewer.visLib();
31
- const visViewer = viewer.visViewer();
32
-
33
- const defViewPos = visLib.DefaultViewPosition;
34
- visViewer.setDefaultViewPositionWithAnimation(defViewPos[position]);
35
-
36
- viewer.update();
37
- viewer.emit({ type: "viewposition", data: position });
38
- }
39
-
40
- commands("VisualizeJS").registerCommand("setDefaultViewPosition", setDefaultViewPosition);
41
- commands("VisualizeJS").registerCommand("k3DViewTop", (viewer) => setDefaultViewPosition(viewer, "k3DViewTop"));
42
- commands("VisualizeJS").registerCommand("k3DViewBottom", (viewer) => setDefaultViewPosition(viewer, "k3DViewBottom"));
43
- commands("VisualizeJS").registerCommand("k3DViewLeft", (viewer) => setDefaultViewPosition(viewer, "k3DViewLeft"));
44
- commands("VisualizeJS").registerCommand("k3DViewRight", (viewer) => setDefaultViewPosition(viewer, "k3DViewRight"));
45
- commands("VisualizeJS").registerCommand("k3DViewFront", (viewer) => setDefaultViewPosition(viewer, "k3DViewFront"));
46
- commands("VisualizeJS").registerCommand("k3DViewBack", (viewer) => setDefaultViewPosition(viewer, "k3DViewBack"));
47
- commands("VisualizeJS").registerCommand("k3DViewSE", (viewer) => setDefaultViewPosition(viewer, "k3DViewSE"));
48
- commands("VisualizeJS").registerCommand("k3DViewSW", (viewer) => setDefaultViewPosition(viewer, "k3DViewSW"));
49
- commands("VisualizeJS").registerCommand("k3DViewNE", (viewer) => setDefaultViewPosition(viewer, "k3DViewNE"));
50
- commands("VisualizeJS").registerCommand("k3DViewNW", (viewer) => setDefaultViewPosition(viewer, "k3DViewNW"));
@@ -1,29 +0,0 @@
1
- ///////////////////////////////////////////////////////////////////////////////
2
- // Copyright (C) 2002-2023, Open Design Alliance (the "Alliance").
3
- // All rights reserved.
4
- //
5
- // This software and its documentation and related materials are owned by
6
- // the Alliance. The software may only be incorporated into application
7
- // programs owned by members of the Alliance, subject to a signed
8
- // Membership Agreement and Supplemental Software License Agreement with the
9
- // Alliance. The structure and organization of this software are the valuable
10
- // trade secrets of the Alliance and its suppliers. The software is also
11
- // protected by copyright law and international treaty provisions. Application
12
- // programs incorporating this software must include the following statement
13
- // with their copyright notices:
14
- //
15
- // This application incorporates Open Design Alliance software pursuant to a
16
- // license agreement with Open Design Alliance.
17
- // Open Design Alliance Copyright (C) 2002-2021 by Open Design Alliance.
18
- // All rights reserved.
19
- //
20
- // By use of this software, its documentation or related materials, you
21
- // acknowledge and accept the above terms.
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- import { Viewer } from "../Viewer";
25
- import { commands } from "../Commands";
26
-
27
- commands("VisualizeJS").registerCommand("setMarkupColor", (viewer: Viewer, r = 255, g = 0, b = 0) => {
28
- viewer.setMarkupColor(r, g, b);
29
- });