@equinor/esv-intersection 3.0.0-beta.1 → 3.0.0-beta.3

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.
@@ -1,7 +1,7 @@
1
1
  import { ScaleLinear } from 'd3-scale';
2
2
  import { Graphics, Point, Texture } from 'pixi.js';
3
3
  import { LayerOptions, PixiLayer, PixiRenderApplication } from '.';
4
- import { CasingOptions, CementOptions, CementPlugOptions, CementSqueezeOptions, HoleOptions, SchematicData, ScreenOptions, TubingOptions, InternalLayerOptions } from './schematicInterfaces';
4
+ import { CasingOptions, CementOptions, CementPlugOptions, CementSqueezeOptions, HoleOptions, SchematicData, ScreenOptions, TubingOptions, InternalLayerOptions, PerforationOptions } from './schematicInterfaces';
5
5
  import { OnUpdateEvent, OnRescaleEvent, OnUnmountEvent } from '../interfaces';
6
6
  interface ScalingFactors {
7
7
  height: number;
@@ -18,6 +18,7 @@ export interface SchematicLayerOptions<T extends SchematicData> extends LayerOpt
18
18
  screenOptions?: ScreenOptions;
19
19
  tubingOptions?: TubingOptions;
20
20
  cementPlugOptions?: CementPlugOptions;
21
+ perforationOptions?: PerforationOptions;
21
22
  }
22
23
  export declare class SchematicLayer<T extends SchematicData> extends PixiLayer<T> {
23
24
  private internalLayerVisibility;
@@ -59,6 +60,7 @@ export declare class SchematicLayer<T extends SchematicData> extends PixiLayer<T
59
60
  private updateSymbolCache;
60
61
  private drawCementPlug;
61
62
  private getCementPlugTexture;
63
+ private createPerforationTexture;
62
64
  private prepareSymbolRenderObject;
63
65
  private drawSymbolComponent;
64
66
  private drawSVGRope;
@@ -81,7 +83,8 @@ export declare class SchematicLayer<T extends SchematicData> extends PixiLayer<T
81
83
  private generateShoe;
82
84
  private createCementSqueezeShape;
83
85
  private getCementTexture;
84
- private createCementSqueezeTexture;
86
+ private createPerforationShape;
87
+ private getCementSqueezeTexture;
85
88
  private drawScreen;
86
89
  private drawTubing;
87
90
  private getTubingTexture;
@@ -5,12 +5,10 @@ export interface HoleSize {
5
5
  diameter: number;
6
6
  start: number;
7
7
  end: number;
8
- innerDiameter?: number;
9
8
  }
10
9
  export interface Casing {
11
10
  kind: 'casing';
12
11
  id: string;
13
- casingId: string;
14
12
  diameter: number;
15
13
  start: number;
16
14
  end: number;
@@ -31,19 +29,23 @@ export declare const isPAndASymbol: (item: PAndA) => item is PAndASymbol;
31
29
  export interface CementSqueeze {
32
30
  kind: 'cementSqueeze';
33
31
  id: string;
34
- top: number;
35
- bottom: number;
36
- casingIds?: string[];
32
+ start: number;
33
+ end: number;
34
+ /**
35
+ * Referenced Casing and Completion ids
36
+ */
37
+ referenceIds: string[];
37
38
  }
38
39
  export declare const isCementSqueeze: (item: PAndA) => item is CementSqueeze;
39
40
  export interface CementPlug {
40
41
  kind: 'cementPlug';
41
42
  id: string;
42
- top: number;
43
- bottom: number;
44
- holeId?: string;
45
- casingId?: string;
46
- secondCasingId?: string;
43
+ start: number;
44
+ end: number;
45
+ /**
46
+ * Referenced Casing, Completion ids
47
+ */
48
+ referenceIds: string[];
47
49
  }
48
50
  export declare const isCementPlug: (item: PAndA) => item is CementSqueeze;
49
51
  export declare type PAndA = PAndASymbol | CementSqueeze | CementPlug;
@@ -68,9 +70,46 @@ export declare const foldCompletion: <T>(fScreen: (obj: Screen) => T, fTubing: (
68
70
  export interface Cement {
69
71
  kind: 'cement';
70
72
  id: string;
71
- casingIds?: string[];
73
+ /**
74
+ * Referenced Casing and Completion ids
75
+ */
76
+ referenceIds: string[];
72
77
  toc: number;
73
78
  }
79
+ /**
80
+ * 'Open hole' and 'Open hole screen' are not included as they are not visualized and also not included in the ruleset
81
+ */
82
+ export declare type PerforationSubKind = 'Perforation' | 'Open hole gravel pack' | 'Open hole frac pack' | 'Cased hole frac pack' | 'Cased hole gravel pack' | 'Cased hole fracturation';
83
+ export interface Perforation {
84
+ kind: 'perforation';
85
+ subKind: PerforationSubKind;
86
+ id: string;
87
+ start: number;
88
+ end: number;
89
+ /**
90
+ * is the perforation open or sealed?
91
+ */
92
+ isOpen: boolean;
93
+ /**
94
+ * Referenced Casing ids
95
+ */
96
+ referenceIds: string[];
97
+ }
98
+ export declare const foldPerforationSubKind: <T>(options: {
99
+ Perforation: (kind: 'Perforation') => T;
100
+ OpenHoleGravelPack: (kind: 'Open hole gravel pack') => T;
101
+ OpenHoleFracPack: (kind: 'Open hole frac pack') => T;
102
+ CasedHoleGravelPack: (kind: 'Cased hole gravel pack') => T;
103
+ CasedHoleFracPack: (kind: 'Cased hole frac pack') => T;
104
+ CasedHoleFracturation: (kind: 'Cased hole fracturation') => T;
105
+ }, subKind: PerforationSubKind) => T;
106
+ export declare const getPerforationsThatStartAtHoleDiameter: (perforations: Perforation[]) => Perforation[];
107
+ export declare const getPerforationsThatSTartAtCasingDiameter: (perforations: Perforation[]) => Perforation[];
108
+ export declare function hasGravelPack(perf: Perforation): boolean;
109
+ export declare function isSubKindPerforation(perf: Perforation): boolean;
110
+ export declare function isSubKindCasedHoleFracPack(perf: Perforation): boolean;
111
+ export declare function isOpenHoleFracPack(perf: Perforation): boolean;
112
+ export declare const intersect: (a: Perforation, b: Perforation) => boolean;
74
113
  export interface SchematicData {
75
114
  holeSizes: HoleSize[];
76
115
  casings: Casing[];
@@ -80,6 +119,7 @@ export interface SchematicData {
80
119
  symbols: {
81
120
  [key: string]: string;
82
121
  };
122
+ perforations: Perforation[];
83
123
  }
84
124
  export interface InternalLayerOptions {
85
125
  holeLayerId: string;
@@ -87,14 +127,9 @@ export interface InternalLayerOptions {
87
127
  completionLayerId: string;
88
128
  cementLayerId: string;
89
129
  pAndALayerId: string;
130
+ perforationLayerId: string;
90
131
  }
91
- export declare const defaultInternalLayerOptions: (layerId: string) => {
92
- holeLayerId: string;
93
- casingLayerId: string;
94
- completionLayerId: string;
95
- pAndALayerId: string;
96
- cementLayerId: string;
97
- };
132
+ export declare const defaultInternalLayerOptions: (layerId: string) => InternalLayerOptions;
98
133
  export interface HoleOptions {
99
134
  firstColor: string;
100
135
  secondColor: string;
@@ -110,60 +145,47 @@ export interface CasingOptions {
110
145
  lineColor: string;
111
146
  shoeSize: CasingShoeSize;
112
147
  }
113
- export declare const defaultCasingOptions: {
114
- solidColor: string;
115
- lineColor: string;
116
- shoeSize: {
117
- width: number;
118
- length: number;
119
- };
120
- };
121
- export interface CementOptions {
122
- firstColor: string;
123
- secondColor: string;
148
+ export interface PerforationOptions {
149
+ stroke: string;
150
+ yellow: string;
151
+ grey: string;
152
+ red: string;
153
+ transparent: string;
154
+ spikeWidth: number;
155
+ packingOpacity: number;
156
+ fracLineLength: number;
157
+ fracLineHalfWidth: number;
124
158
  scalingFactor: number;
125
159
  }
126
- export declare const defaultCementOptions: {
160
+ export declare const defaultPerforationOptions: PerforationOptions;
161
+ export declare const defaultCasingOptions: CasingOptions;
162
+ export interface CementOptions {
127
163
  firstColor: string;
128
164
  secondColor: string;
129
165
  scalingFactor: number;
130
- };
166
+ }
167
+ export declare const defaultCementOptions: CementOptions;
131
168
  export interface CementSqueezeOptions {
132
169
  firstColor: string;
133
170
  secondColor: string;
134
171
  scalingFactor: number;
135
172
  }
136
- export declare const defaultCementSqueezeOptions: {
137
- firstColor: string;
138
- secondColor: string;
139
- scalingFactor: number;
140
- };
173
+ export declare const defaultCementSqueezeOptions: CementSqueezeOptions;
141
174
  export interface ScreenOptions {
142
175
  scalingFactor: number;
143
176
  lineColor: string;
144
177
  }
145
- export declare const defaultScreenOptions: {
146
- scalingFactor: number;
147
- lineColor: string;
148
- };
178
+ export declare const defaultScreenOptions: ScreenOptions;
149
179
  export interface TubingOptions {
150
180
  innerColor: string;
151
181
  outerColor: string;
152
182
  scalingFactor: number;
153
183
  }
154
- export declare const defaultTubingOptions: {
155
- scalingFactor: number;
156
- innerColor: string;
157
- outerColor: string;
158
- };
184
+ export declare const defaultTubingOptions: TubingOptions;
159
185
  export interface CementPlugOptions {
160
186
  firstColor: string;
161
187
  secondColor: string;
162
188
  scalingFactor: number;
163
189
  }
164
- export declare const defaultCementPlugOptions: {
165
- firstColor: string;
166
- secondColor: string;
167
- scalingFactor: number;
168
- };
190
+ export declare const defaultCementPlugOptions: CementPlugOptions;
169
191
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/esv-intersection",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.3",
4
4
  "description": "Intersection component package with testing and automatic documentation.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",