@equinor/esv-intersection 1.4.4 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/control/ExtendedCurveInterpolator.d.ts +58 -0
- package/dist/control/IntersectionReferenceSystem.d.ts +2 -2
- package/dist/control/ZoomPanHandler.d.ts +1 -1
- package/dist/datautils/seismicimage.d.ts +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.js +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/interfaces.d.ts +2 -0
- package/dist/layers/CasingLayer.d.ts +11 -1
- package/dist/layers/GeomodelCanvasLayer.d.ts +1 -0
- package/dist/utils/arc-length.d.ts +23 -0
- package/dist/utils/binary-search.d.ts +8 -0
- package/dist/utils/root-finder.d.ts +34 -0
- package/package.json +24 -21
- package/CHANGELOG.md +0 -221
package/dist/interfaces.d.ts
CHANGED
|
@@ -156,6 +156,8 @@ export interface ReferenceSystemOptions {
|
|
|
156
156
|
curveInterpolator?: Interpolator;
|
|
157
157
|
trajectoryInterpolator?: Interpolator;
|
|
158
158
|
curtainInterpolator?: Interpolator;
|
|
159
|
+
approxT?: boolean;
|
|
160
|
+
quickT?: boolean;
|
|
159
161
|
}
|
|
160
162
|
export declare type BoundingBox = {
|
|
161
163
|
x: number;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { Point, Texture } from 'pixi.js';
|
|
2
2
|
import { WellboreBaseComponentLayer } from './WellboreBaseComponentLayer';
|
|
3
3
|
import { CasingLayerOptions, Casing } from '..';
|
|
4
|
+
export interface CasingRenderObject {
|
|
5
|
+
pathPoints: number[][];
|
|
6
|
+
polygon: Point[];
|
|
7
|
+
leftPath: Point[];
|
|
8
|
+
rightPath: Point[];
|
|
9
|
+
radius: number;
|
|
10
|
+
diameter: number;
|
|
11
|
+
casingWallWidth: number;
|
|
12
|
+
}
|
|
4
13
|
export declare class CasingLayer extends WellboreBaseComponentLayer {
|
|
5
14
|
constructor(id?: string, options?: CasingLayerOptions);
|
|
6
15
|
render(): void;
|
|
7
|
-
|
|
16
|
+
prepareCasingRenderObject: (casing: Casing) => CasingRenderObject;
|
|
17
|
+
drawCasing: (zippedRenderObject: [Casing, CasingRenderObject]) => void;
|
|
8
18
|
drawShoe(casingEnd: number, casingRadius: number): void;
|
|
9
19
|
generateShoe: (casingEnd: number, casingRadius: number, length: number, width: number) => Point[];
|
|
10
20
|
createTexture(diameter: number): Texture;
|
|
@@ -14,6 +14,7 @@ export declare class GeomodelCanvasLayer extends CanvasLayer {
|
|
|
14
14
|
onMount(event: OnMountEvent): void;
|
|
15
15
|
onUpdate(event: OnUpdateEvent): void;
|
|
16
16
|
onRescale(event: OnRescaleEvent): void;
|
|
17
|
+
updatePaths(): void;
|
|
17
18
|
render(): void;
|
|
18
19
|
colorToCSSColor(color: number | string): string;
|
|
19
20
|
generateSurfaceAreasPaths(): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Vector } from 'curve-interpolator/dist/src/interfaces';
|
|
2
|
+
declare type fx = (n: number) => Vector;
|
|
3
|
+
export declare class ArcLength {
|
|
4
|
+
/**
|
|
5
|
+
* Calculate using an adaptive bisect method
|
|
6
|
+
* @param {Number} func Curve function returning [x,y]
|
|
7
|
+
* @param {Number} minLimit Min limit
|
|
8
|
+
* @param {Number} maxLimit Max limit
|
|
9
|
+
* @param {Number} tolerance Result tolerance
|
|
10
|
+
* @param {Number} minDepth Min recursive depth before accepting solution
|
|
11
|
+
* @param {Number} maxDepth Max recursive depth
|
|
12
|
+
*/
|
|
13
|
+
static bisect(func: fx, minLimit?: number, maxLimit?: number, tolerance?: number, minDepth?: number, maxDepth?: number): number;
|
|
14
|
+
/**
|
|
15
|
+
* Calculate using trapezoid method
|
|
16
|
+
* @param {Number} func Curve function returning [x,y]
|
|
17
|
+
* @param {Number} minLimit Min limit
|
|
18
|
+
* @param {Number} maxLimit Max limit
|
|
19
|
+
* @param {Number} segments Number of segments
|
|
20
|
+
*/
|
|
21
|
+
static trapezoid(func: fx, minLimit?: number, maxLimit?: number, segments?: number): number;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find index where value[index] =< searchValue and value[index+1] >= searchValue using binary search
|
|
3
|
+
* @param {Number} values Array of sorted values
|
|
4
|
+
* @param {Number} searchValue Value to search for
|
|
5
|
+
*/
|
|
6
|
+
export declare class BinarySearch {
|
|
7
|
+
static search(values: number[], searchValue: number): number;
|
|
8
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare type fx = (n: number) => number;
|
|
2
|
+
export declare class RootFinder {
|
|
3
|
+
/**
|
|
4
|
+
* Find root using newthons method
|
|
5
|
+
* @param {Number} func f(x)
|
|
6
|
+
* @param {Number} precision Accuracy of result
|
|
7
|
+
* @param {Number} maxIterations Max number of iterations to use
|
|
8
|
+
* @param {Number} start Starting position
|
|
9
|
+
* @param {Number} minLimit Min limit of result
|
|
10
|
+
* @param {Number} maxLimit Max limit of result
|
|
11
|
+
*/
|
|
12
|
+
static newton(func: fx, precision?: number, maxIterations?: number, start?: number, minLimit?: number, maxLimit?: number): number;
|
|
13
|
+
/**
|
|
14
|
+
* Find root using bisect method
|
|
15
|
+
* @param {Number} func f(x)
|
|
16
|
+
* @param {Number} precision Accuracy of result
|
|
17
|
+
* @param {Number} maxIterations Max number of iterations to use
|
|
18
|
+
* @param {Number} start Starting position
|
|
19
|
+
* @param {Number} minLimit Min limit of result
|
|
20
|
+
* @param {Number} maxLimit Max limit of result
|
|
21
|
+
*/
|
|
22
|
+
static bisect(func: fx, precision?: number, maxIterations?: number, start?: number, minLimit?: number, maxLimit?: number): number;
|
|
23
|
+
/**
|
|
24
|
+
* Find root by trying available methods
|
|
25
|
+
* @param {Number} func f(x)
|
|
26
|
+
* @param {Number} precision Accuracy of result
|
|
27
|
+
* @param {Number} maxIterations Max number of iterations to use
|
|
28
|
+
* @param {Number} start Starting position
|
|
29
|
+
* @param {Number} minLimit Min limit of result
|
|
30
|
+
* @param {Number} maxLimit Max limit of result
|
|
31
|
+
*/
|
|
32
|
+
static findRoot(func: fx, precision?: number, maxIterations?: number, start?: number, minLimit?: number, maxLimit?: number): number;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/esv-intersection",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Intersection component package with testing and automatic documentation.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"prepub": "npm run build",
|
|
16
16
|
"pub": "npm publish --access=public",
|
|
17
17
|
"lint": "eslint --ext .js,.jsx,.ts,.tsx src",
|
|
18
|
-
"test": "jest",
|
|
18
|
+
"test": "tsc --project tsconfig.test.json && jest",
|
|
19
19
|
"test:watch": "jest --watchAll",
|
|
20
20
|
"predocs": "rimraf docs_out",
|
|
21
21
|
"docs": "typedoc --out docs_out src",
|
|
@@ -40,19 +40,25 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/equinor/esv-intersection#readme",
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
43
|
+
"@babel/core": "^7.16.7",
|
|
44
|
+
"@babel/preset-env": "^7.16.8",
|
|
45
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
46
|
+
"@storybook/addon-docs": "^6.4.18",
|
|
47
|
+
"@storybook/addon-storysource": "^6.4.18",
|
|
48
|
+
"@storybook/html": "^6.4.18",
|
|
49
|
+
"@types/d3": "^7.1.0",
|
|
50
|
+
"@types/jest": "^27.4.0",
|
|
51
|
+
"@types/mock-raf": "^1.0.2",
|
|
47
52
|
"@typescript-eslint/eslint-plugin": "^4.15.2",
|
|
48
53
|
"@typescript-eslint/parser": "^4.15.2",
|
|
49
|
-
"
|
|
54
|
+
"babel-jest": "^27.4.6",
|
|
50
55
|
"copyfiles": "^2.4.1",
|
|
51
56
|
"eslint": "^7.20.0",
|
|
52
57
|
"eslint-config-prettier": "^8.1.0",
|
|
53
58
|
"eslint-plugin-prettier": "^3.3.1",
|
|
54
|
-
"jest": "^
|
|
59
|
+
"jest": "^27.4.7",
|
|
55
60
|
"jest-canvas-mock": "^2.3.1",
|
|
61
|
+
"mock-raf": "^1.0.1",
|
|
56
62
|
"pixi.js": "^5.3.8",
|
|
57
63
|
"prettier": "^2.2.1",
|
|
58
64
|
"rimraf": "^3.0.2",
|
|
@@ -61,16 +67,12 @@
|
|
|
61
67
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
62
68
|
"rollup-plugin-terser": "^7.0.2",
|
|
63
69
|
"rollup-plugin-typescript2": "^0.30.0",
|
|
64
|
-
"storybook-dark-mode": "^1.0.
|
|
65
|
-
"ts-jest": "^26.5.2",
|
|
70
|
+
"storybook-dark-mode": "^1.0.8",
|
|
66
71
|
"tslib": "^2.1.0",
|
|
67
72
|
"typedoc": "^0.20.28",
|
|
68
73
|
"typescript": "^4.2.2"
|
|
69
74
|
},
|
|
70
75
|
"jest": {
|
|
71
|
-
"transform": {
|
|
72
|
-
".(ts|tsx)": "ts-jest"
|
|
73
|
-
},
|
|
74
76
|
"setupFiles": [
|
|
75
77
|
"jest-canvas-mock"
|
|
76
78
|
],
|
|
@@ -79,7 +81,9 @@
|
|
|
79
81
|
"ts",
|
|
80
82
|
"tsx",
|
|
81
83
|
"js"
|
|
82
|
-
]
|
|
84
|
+
],
|
|
85
|
+
"testEnvironment": "jsdom",
|
|
86
|
+
"transformIgnorePatterns": ["/node_modules/(?!d3)"]
|
|
83
87
|
},
|
|
84
88
|
"peerDependencies": {
|
|
85
89
|
"pixi.js": "^5.2.1"
|
|
@@ -87,13 +91,12 @@
|
|
|
87
91
|
"dependencies": {
|
|
88
92
|
"@equinor/videx-math": "^1.0.12",
|
|
89
93
|
"@equinor/videx-vector2": "^1.0.44",
|
|
90
|
-
"@types/d3": "^5.7.2",
|
|
91
94
|
"curve-interpolator": "2.0.8",
|
|
92
|
-
"d3-array": "^
|
|
93
|
-
"d3-axis": "^
|
|
94
|
-
"d3-scale": "^
|
|
95
|
-
"d3-selection": "^
|
|
96
|
-
"d3-shape": "^1.
|
|
97
|
-
"d3-zoom": "^
|
|
95
|
+
"d3-array": "^3.1.1",
|
|
96
|
+
"d3-axis": "^3.0.0",
|
|
97
|
+
"d3-scale": "^4.0.2",
|
|
98
|
+
"d3-selection": "^3.0.0",
|
|
99
|
+
"d3-shape": "^3.1.0",
|
|
100
|
+
"d3-zoom": "^3.0.0"
|
|
98
101
|
}
|
|
99
102
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## New changes not yet released
|
|
4
|
-
|
|
5
|
-
## v1.4.4
|
|
6
|
-
- Add option to override interpolators in the IntersectionReferenceSystem
|
|
7
|
-
- Update react-dev-utils to 11.0.4
|
|
8
|
-
|
|
9
|
-
## v1.4.3
|
|
10
|
-
- Add option to use a optional range for generating seismic image
|
|
11
|
-
|
|
12
|
-
## v1.4.2
|
|
13
|
-
|
|
14
|
-
- Improve wellborelayers textures
|
|
15
|
-
- Update typescript to 4.2.2
|
|
16
|
-
|
|
17
|
-
## v1.4.1
|
|
18
|
-
|
|
19
|
-
- Matching surface name checks are now case insensitive
|
|
20
|
-
- Bumped d3-array package
|
|
21
|
-
|
|
22
|
-
## v1.4.0
|
|
23
|
-
|
|
24
|
-
- added option to override arc division and tension in the reference system
|
|
25
|
-
- removed group labels from being render in surface labels
|
|
26
|
-
- pixi-layers skip render without referenceSystem
|
|
27
|
-
- upgrade vulnerable packages
|
|
28
|
-
- cleanup GeomodelLayerV2
|
|
29
|
-
- cleanup render method on WellboreBaseComponentLayers
|
|
30
|
-
|
|
31
|
-
## v1.3.1
|
|
32
|
-
|
|
33
|
-
- fix skip render without referenceSystem in CalloutCanvasLayer
|
|
34
|
-
|
|
35
|
-
## v1.3.0
|
|
36
|
-
|
|
37
|
-
- fix CalloutCanvasLayer to always render on data update
|
|
38
|
-
- fix position callout with displacement calculated from bottom
|
|
39
|
-
- fix issue with missing labels in geomodel
|
|
40
|
-
- fix onUnmount on PixiLayers
|
|
41
|
-
- add export of interfaces AxisOptions, ControllerOptions, OverlayEvents and OverlayCallbacks
|
|
42
|
-
- add destroy method to Controller
|
|
43
|
-
|
|
44
|
-
## v1.2.1
|
|
45
|
-
|
|
46
|
-
- improved surface and surface label rendering order
|
|
47
|
-
- improved setting data on layer creation
|
|
48
|
-
- added fallback for various rendering functions when webGL is not available
|
|
49
|
-
|
|
50
|
-
## v1.2.0
|
|
51
|
-
|
|
52
|
-
- deprecate GeomodelLayer (keeping api util next major release)
|
|
53
|
-
- add support for inverse xBounds on several layers
|
|
54
|
-
- add support for cement spanning multiple casings
|
|
55
|
-
- fix issue in HighlightLayer storybook demo layer
|
|
56
|
-
- use typescript types from curve-interpolator
|
|
57
|
-
- add solid color casing option
|
|
58
|
-
- compensate for zFactor in WellboreBaseComponentLayers
|
|
59
|
-
- add calculateDisplacementFromBottom option to IntersectionReferenceSystem
|
|
60
|
-
|
|
61
|
-
## v1.1.0
|
|
62
|
-
|
|
63
|
-
- surface labels improvement
|
|
64
|
-
- bugfix: well layers rendering artifacts
|
|
65
|
-
- bugfix: fix distortion in GeomodelLayer and GeomodelLayerV2 lines when increasing zFactor
|
|
66
|
-
|
|
67
|
-
## v1.0.0
|
|
68
|
-
|
|
69
|
-
- bring package out of alpha
|
|
70
|
-
- bugfix: corrected overlapping logic for WellboreItemShapeGenerator
|
|
71
|
-
- minor refactoring
|
|
72
|
-
|
|
73
|
-
## v0.9.6-alpha
|
|
74
|
-
|
|
75
|
-
- improve validation on trajectoryAngle in IntersectionReferenceSystem
|
|
76
|
-
- handle cases where a curve is vertical
|
|
77
|
-
|
|
78
|
-
## v0.9.5-alpha
|
|
79
|
-
|
|
80
|
-
- Added option to remove reference system when clearing data on layers
|
|
81
|
-
- misc: added validation when missing data
|
|
82
|
-
|
|
83
|
-
## v0.9.4-alpha
|
|
84
|
-
|
|
85
|
-
- bugfix: use only extensionStart as offset
|
|
86
|
-
- bump websocket-extensions version
|
|
87
|
-
|
|
88
|
-
## v0.9.3-alpha
|
|
89
|
-
|
|
90
|
-
- improve input validation on getExtendedTrajectory
|
|
91
|
-
|
|
92
|
-
## v0.9.2-alpha
|
|
93
|
-
|
|
94
|
-
- bugfix: correctly handle position when md or position is supplied in callout layer
|
|
95
|
-
|
|
96
|
-
## v0.9.1-alpha
|
|
97
|
-
|
|
98
|
-
- bugfix: corrected input validation on getExtendedTrajectory
|
|
99
|
-
|
|
100
|
-
## v0.9.0-alpha
|
|
101
|
-
|
|
102
|
-
- added method in the IntersectionReferenceSystem to get an extended trajectory
|
|
103
|
-
- added option to pass in increment, which help specify distance between points on various layers like cement, casing, and holesize layers
|
|
104
|
-
- fixed a bug with z-index on html layers
|
|
105
|
-
- improved perfomance on cement layer
|
|
106
|
-
- add posibility to pass in either a curve length (measured depth, md) or a set of coordinates to the callout layer
|
|
107
|
-
- resolve vulnerability
|
|
108
|
-
- misc bugfixes and improvements
|
|
109
|
-
|
|
110
|
-
## v0.8.1-alpha
|
|
111
|
-
|
|
112
|
-
- misc bugfixes
|
|
113
|
-
|
|
114
|
-
## v0.8.0-alpha
|
|
115
|
-
|
|
116
|
-
- added clearAllData method to controller and layer manager
|
|
117
|
-
- reworked callout layer
|
|
118
|
-
- improved geolabel layer label positioning
|
|
119
|
-
- improved input validation
|
|
120
|
-
- improved error handling
|
|
121
|
-
- misc bugfixes
|
|
122
|
-
|
|
123
|
-
## v0.7.1-alpha
|
|
124
|
-
|
|
125
|
-
- improved documentation in the reference system
|
|
126
|
-
- removed existing options when creating a reference system
|
|
127
|
-
- added the option to pass in a trajectory angle in the reference system
|
|
128
|
-
|
|
129
|
-
## v0.7.0-alpha
|
|
130
|
-
|
|
131
|
-
- added cement layer
|
|
132
|
-
- fixed issue with peer dependency
|
|
133
|
-
- misc bugfixes
|
|
134
|
-
|
|
135
|
-
## v0.6.4-alpha
|
|
136
|
-
|
|
137
|
-
- set z-index for overlay and axis dynamically
|
|
138
|
-
- misc bugfixes
|
|
139
|
-
- improved documentation
|
|
140
|
-
|
|
141
|
-
## v0.6.3-alpha
|
|
142
|
-
|
|
143
|
-
- methods show/hide axis label
|
|
144
|
-
- methods for flipping axes
|
|
145
|
-
- getter for axis in layer manager and controller
|
|
146
|
-
|
|
147
|
-
## v0.6.2-alpha
|
|
148
|
-
|
|
149
|
-
- option to add offset in grid layer
|
|
150
|
-
- toggle axis
|
|
151
|
-
- set interactivity on layers, off by default
|
|
152
|
-
- moved base layers to sub-folders
|
|
153
|
-
|
|
154
|
-
## v0.6.1-alpha
|
|
155
|
-
|
|
156
|
-
- Expose offset methods in the layer manager and controller
|
|
157
|
-
- Allow flipping axis in canvas layer and flip domain in geo labels
|
|
158
|
-
- Set zoom levels
|
|
159
|
-
|
|
160
|
-
## v0.6.0-alpha
|
|
161
|
-
|
|
162
|
-
- misc optimizations
|
|
163
|
-
- improved value handling in IRS
|
|
164
|
-
- allow for offset in IRS
|
|
165
|
-
- allow for offset in axis
|
|
166
|
-
|
|
167
|
-
## v0.5.0-alpha
|
|
168
|
-
|
|
169
|
-
- Added HTML base layer
|
|
170
|
-
- Added story featuring point highlighting based on md input
|
|
171
|
-
|
|
172
|
-
## v0.4.0-alpha
|
|
173
|
-
|
|
174
|
-
- Added event overlay
|
|
175
|
-
- updated stories
|
|
176
|
-
- bugfixes
|
|
177
|
-
|
|
178
|
-
## v0.3.2-alpha
|
|
179
|
-
|
|
180
|
-
- Basic completion layer
|
|
181
|
-
- Pixi.js is now a peer dependency
|
|
182
|
-
|
|
183
|
-
## v0.3.1-alpha
|
|
184
|
-
|
|
185
|
-
- functioning defaults for layers
|
|
186
|
-
- made setData and clearData available for layers
|
|
187
|
-
- minor improvements
|
|
188
|
-
|
|
189
|
-
## v0.3.0-alpha
|
|
190
|
-
|
|
191
|
-
- added top level interface
|
|
192
|
-
- renamed WebglLayer to PixiLayer
|
|
193
|
-
- small fixes
|
|
194
|
-
|
|
195
|
-
## v0.2.0-alpha
|
|
196
|
-
|
|
197
|
-
Controls:
|
|
198
|
-
|
|
199
|
-
- Layer manager
|
|
200
|
-
- Reference system
|
|
201
|
-
|
|
202
|
-
Custom Layers:
|
|
203
|
-
|
|
204
|
-
- Geomodel label
|
|
205
|
-
- Casing
|
|
206
|
-
|
|
207
|
-
This release also features some miscellaneous improvements and optimizations
|
|
208
|
-
|
|
209
|
-
## v0.1.3-alpha
|
|
210
|
-
|
|
211
|
-
Made interfaces and zoom and pan handler available
|
|
212
|
-
|
|
213
|
-
## v0.1.2-alpha
|
|
214
|
-
|
|
215
|
-
Include actual files
|
|
216
|
-
|
|
217
|
-
## v0.1.1-alpha
|
|
218
|
-
|
|
219
|
-
Initial release
|
|
220
|
-
|
|
221
|
-
Contains Base, SVG, Canvas, Wellborepath, Callout, Image, and WebGL layers
|