copper3d 1.15.15 → 1.15.17

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.
@@ -0,0 +1,41 @@
1
+ import * as THREE from "three";
2
+ import { IMeshNodes } from "../types/types";
3
+ export declare class Node {
4
+ id: string;
5
+ p: number[];
6
+ elements: Array<Element>;
7
+ constructor(id: string, p: number[]);
8
+ }
9
+ export declare class Element {
10
+ id: string;
11
+ basis: string[];
12
+ nodes: Array<Node>;
13
+ constructor(id: string, basis: string[], nodes: Array<Node>);
14
+ }
15
+ export declare class MeshNodeTool {
16
+ nodes: {
17
+ [key: string]: Node;
18
+ };
19
+ elements: {
20
+ [key: string]: Element;
21
+ };
22
+ addNode(id: string, p: number[]): void;
23
+ addElement(id: string, basis: string[], nodeIds: string[]): void;
24
+ loadMesh(json: IMeshNodes): void;
25
+ evaluate(elementId: string, xi: number[]): number[];
26
+ find(point: THREE.Vector3, startingNodeId: string): {
27
+ [key: string]: any;
28
+ elementId: string;
29
+ xi: number[];
30
+ };
31
+ search(point: THREE.Vector3, startingNodeId: string, tol: number): {
32
+ [key: string]: any;
33
+ elementId: string;
34
+ xi: number[];
35
+ };
36
+ getNodeMaterialPoints(nodeId: string): {
37
+ [key: string]: any;
38
+ elementId: string;
39
+ xi: number[];
40
+ }[];
41
+ }
@@ -6,7 +6,30 @@ export declare function loading(): {
6
6
  progress: HTMLDivElement;
7
7
  };
8
8
  export declare function switchEraserSize(size: number, urls?: string[]): string;
9
- export declare function createFpsCap(loop: Function, fps?: number): {
10
- fps: number;
11
- loop: (_scope: any, time: number) => any;
12
- };
9
+ /**
10
+ * Cubic-Lagrange basis function
11
+ * @param x
12
+ * @returns
13
+ */
14
+ export declare function L3(x: number): number[];
15
+ /**
16
+ * Cubic-Hermite basis function.
17
+ * @param x
18
+ * @returns
19
+ */
20
+ export declare function H3(x: number): number[];
21
+ /**
22
+ * To calculate the weights for each element of Xi using the cubic Lagrange basis functions.
23
+ * @param Xi
24
+ * @returns
25
+ */
26
+ export declare function getWightsL3L3L3(Xi: number[]): number[];
27
+ export declare function getWightsH3H3H3(Xi: number[][]): number[][];
28
+ /**
29
+ * Euclidean distance n dimensions
30
+ * @param x0
31
+ * @param x1
32
+ * @returns
33
+ */
34
+ export declare function calcDistance(x0: number[], x1: number[]): number;
35
+ export declare function perturbRandom(x: number[], dx: number): number[];
@@ -14,8 +14,9 @@ import { configKiwriousHeart } from "./Utils/kiwrious/configKiwrious";
14
14
  import kiwrious from "./Utils/kiwrious/configKiwrious";
15
15
  import { nrrd_tools } from "./Utils/nrrd_tool";
16
16
  import { Copper3dTrackballControls } from "./Controls/Copper3dTrackballControls";
17
+ import { MeshNodeTool } from "./Utils/MeshNodeTool";
17
18
  import { nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, paintImageType, exportPaintImageType, IOptVTKLoader } from "./types/types";
18
19
  import "./css/style.css";
19
- export declare const REVISION = "v1.15.15";
20
- export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, nrrd_tools, loading, Copper3dTrackballControls, createTexture2D_NRRD, };
20
+ export declare const REVISION = "v1.15.17";
21
+ export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, nrrd_tools, loading, Copper3dTrackballControls, createTexture2D_NRRD, MeshNodeTool, };
21
22
  export type { positionType, screenPosType, optsType, nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, paintImageType, exportPaintImageType, IOptVTKLoader, };
@@ -203,4 +203,17 @@ interface IOptVTKLoader {
203
203
  transparent?: boolean;
204
204
  opacity?: number;
205
205
  }
206
- export type { SceneMapType, ICopperRenderOpt, stateType, modelVisualisationDataType, preRenderCallbackFunctionType, baseStateType, nrrdMeshesType, nrrdSliceType, nrrdDragImageOptType, nrrdDrawImageOptType, loadingBarType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, SerialService_kiwrious, kiwriousType, mouseMovePositionType, positionType, paintImagesType, paintImageType, storedPaintImagesType, optionsGltfExporterType, vtkModels, undoType, copperVolumeType, dicomLoaderOptsType, skipSlicesDictType, exportPaintImagesType, exportPaintImageType, storeExportPaintImageType, IOptVTKLoader, ICopperSceneOpts, };
206
+ interface INodes {
207
+ [key: string]: number[];
208
+ }
209
+ interface IElements {
210
+ [key: string]: {
211
+ basis: string[];
212
+ nodes: string[];
213
+ };
214
+ }
215
+ interface IMeshNodes {
216
+ nodes: INodes;
217
+ elements: IElements;
218
+ }
219
+ export type { SceneMapType, ICopperRenderOpt, stateType, modelVisualisationDataType, preRenderCallbackFunctionType, baseStateType, nrrdMeshesType, nrrdSliceType, nrrdDragImageOptType, nrrdDrawImageOptType, loadingBarType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, SerialService_kiwrious, kiwriousType, mouseMovePositionType, positionType, paintImagesType, paintImageType, storedPaintImagesType, optionsGltfExporterType, vtkModels, undoType, copperVolumeType, dicomLoaderOptsType, skipSlicesDictType, exportPaintImagesType, exportPaintImageType, storeExportPaintImageType, IOptVTKLoader, ICopperSceneOpts, IMeshNodes, };
@@ -203,4 +203,17 @@ interface IOptVTKLoader {
203
203
  transparent?: boolean;
204
204
  opacity?: number;
205
205
  }
206
- export type { SceneMapType, ICopperRenderOpt, stateType, modelVisualisationDataType, preRenderCallbackFunctionType, baseStateType, nrrdMeshesType, nrrdSliceType, nrrdDragImageOptType, nrrdDrawImageOptType, loadingBarType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, SerialService_kiwrious, kiwriousType, mouseMovePositionType, positionType, paintImagesType, paintImageType, storedPaintImagesType, optionsGltfExporterType, vtkModels, undoType, copperVolumeType, dicomLoaderOptsType, skipSlicesDictType, exportPaintImagesType, exportPaintImageType, storeExportPaintImageType, IOptVTKLoader, ICopperSceneOpts, };
206
+ interface INodes {
207
+ [key: string]: number[];
208
+ }
209
+ interface IElements {
210
+ [key: string]: {
211
+ basis: string[];
212
+ nodes: string[];
213
+ };
214
+ }
215
+ interface IMeshNodes {
216
+ nodes: INodes;
217
+ elements: IElements;
218
+ }
219
+ export type { SceneMapType, ICopperRenderOpt, stateType, modelVisualisationDataType, preRenderCallbackFunctionType, baseStateType, nrrdMeshesType, nrrdSliceType, nrrdDragImageOptType, nrrdDrawImageOptType, loadingBarType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, SerialService_kiwrious, kiwriousType, mouseMovePositionType, positionType, paintImagesType, paintImageType, storedPaintImagesType, optionsGltfExporterType, vtkModels, undoType, copperVolumeType, dicomLoaderOptsType, skipSlicesDictType, exportPaintImagesType, exportPaintImageType, storeExportPaintImageType, IOptVTKLoader, ICopperSceneOpts, IMeshNodes, };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "copper3d",
3
3
  "description": "A 3d visualisation package base on threejs provides multiple scenes and Nrrd image load funtion.",
4
- "version": "1.15.15",
4
+ "version": "1.15.17",
5
5
  "main": "dist/bundle.umd.js",
6
6
  "moudle": "dist/bundle.esm.js",
7
7
  "types": "dist/types/index.d.ts",