rm-gxf-computing-rusts 0.0.33 → 0.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rm-gxf-computing-rusts",
3
- "version": "0.0.33",
3
+ "version": "0.0.36",
4
4
  "description": "",
5
5
  "author": "初秋",
6
6
  "type": "commonjs",
Binary file
Binary file
package/src/index.d.ts CHANGED
@@ -1,14 +1,38 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
- export declare function checkLineSideVisibility(option: CheckLineSideVisibilityOption): Array<number>
3
+ export interface ArgumentBox3 {
4
+ min: Vector3F64
5
+ max: Vector3F64
6
+ }
4
7
 
5
- export interface CheckLineSideVisibilityOption {
6
- view?: boolean
7
- pcdDir: string
8
- lines: Array<Line>
9
- trajectorys: Record<string, Vector3F64>
8
+ export interface ArgumentBoxInfo {
9
+ box3: ArgumentBox3
10
+ positionArr: Array<Vector3F64>
11
+ }
12
+
13
+ export interface ArgumentBoxInfo {
14
+ box3: ArgumentBox3
15
+ positionArr: Array<Vector3F64>
16
+ }
17
+
18
+ export interface ArgumentLine {
19
+ start?: Vector3F64
20
+ end?: Vector3F64
21
+ missingCheckResults: Array<Quads>
22
+ existSegments: Array<Quads>
23
+ intersectionSegments?: Array<Array<Index>>
24
+ objPositionArr?: Array<Array<number>>
10
25
  }
11
26
 
27
+ export interface ArgumentLine2 {
28
+ start?: Vector3F64
29
+ end?: Vector3F64
30
+ checkResults: Array<Quads>
31
+ existSegments: Array<Quads>
32
+ }
33
+
34
+ export declare function checkLineSideVisibility(option: CheckLineSideVisibilityOption): Array<number>
35
+
12
36
  export interface CheckLineSideVisibilityOption {
13
37
  view?: boolean
14
38
  pcdDir: string
@@ -22,12 +46,6 @@ export interface CheckResult {
22
46
  offsets?: Array<number>
23
47
  }
24
48
 
25
- export interface CheckResult {
26
- originalVertices: Array<Square>
27
- allCenterPoints: Array<Point>
28
- offsets?: Array<number>
29
- }
30
-
31
49
  export interface DepthFilter {
32
50
  searchRadius: number
33
51
  depthThreshold: number
@@ -38,44 +56,32 @@ export interface DepthFilter {
38
56
  depthThreshold: number
39
57
  }
40
58
 
41
- export interface DepthFilter {
42
- searchRadius: number
43
- depthThreshold: number
59
+ export interface HasObjectInFrontOptions {
60
+ view?: boolean
61
+ lines: Array<ArgumentLine2>
62
+ boxInfos: Array<ArgumentBoxInfo>
44
63
  }
45
64
 
46
- export interface DepthFilter {
47
- searchRadius: number
48
- depthThreshold: number
65
+ export interface HasObjectInFrontOptions {
66
+ view?: boolean
67
+ lines: Array<ArgumentLine2>
68
+ boxInfos: Array<ArgumentBoxInfo>
49
69
  }
50
70
 
51
71
  export interface HasQquareBehindOptions {
52
72
  view?: boolean
53
- lines: Array<ParseLineResult>
73
+ lines: Array<ArgumentLine>
54
74
  }
55
75
 
56
76
  export interface HasQquareBehindOptions {
57
77
  view?: boolean
58
- lines: Array<ParseLineResult>
78
+ lines: Array<ArgumentLine>
59
79
  }
60
80
 
61
81
  export interface Index {
62
82
  index: number
63
83
  }
64
84
 
65
- export interface Index {
66
- index: number
67
- }
68
-
69
- export interface Line {
70
- start: Vector3F64
71
- end: Vector3F64
72
- }
73
-
74
- export interface Line {
75
- start: Vector3F64
76
- end: Vector3F64
77
- }
78
-
79
85
  export interface Line {
80
86
  start: Vector3F64
81
87
  end: Vector3F64
@@ -92,36 +98,34 @@ export interface LineData {
92
98
  checkResults: Array<CheckResult>
93
99
  }
94
100
 
95
- export interface LineData {
96
- start: Vector3F64
97
- end: Vector3F64
98
- checkResults: Array<CheckResult>
101
+ export declare function modelPreview(option: Parameter): ModelPreviewResults
102
+
103
+ export interface ModelPreviewResults {
104
+ data: Array<number>
105
+ width: number
106
+ height: number
99
107
  }
100
108
 
101
- export interface ParseLineResult {
102
- start?: Vector3F64
103
- end?: Vector3F64
104
- missingCheckResults: Array<Quads>
105
- existSegments: Array<Quads>
106
- intersectionSegments?: Array<Array<Index>>
107
- objPositionArr?: Array<Array<number>>
109
+ export interface ModelPreviewResults {
110
+ data: Array<number>
111
+ width: number
112
+ height: number
108
113
  }
109
114
 
110
- export interface ParseLineResult {
111
- start?: Vector3F64
112
- end?: Vector3F64
113
- missingCheckResults: Array<Quads>
114
- existSegments: Array<Quads>
115
- intersectionSegments?: Array<Array<Index>>
116
- objPositionArr?: Array<Array<number>>
115
+ export interface Parameter {
116
+ view?: boolean
117
+ width: number
118
+ height: number
119
+ url: string
120
+ outUrl?: string
117
121
  }
118
122
 
119
- export interface PcBackfaceTestOptions {
123
+ export interface Parameter {
120
124
  view?: boolean
121
- pcdDir: string
122
- lines: LineDataList
123
- trajectorys: Record<string, Trajectory>
124
- distProjection: boolean
125
+ width: number
126
+ height: number
127
+ url: string
128
+ outUrl?: string
125
129
  }
126
130
 
127
131
  export interface PcBackfaceTestOptions {
@@ -137,23 +141,6 @@ export interface Quads {
137
141
  allCenterPoints: Array<Vector3F64>
138
142
  }
139
143
 
140
- export interface Quads {
141
- originalVertices: Array<Array<Vector3F64>>
142
- allCenterPoints: Array<Vector3F64>
143
- }
144
-
145
- export interface Results {
146
- results: Array<Array<Array<number>>>
147
- positions: Array<Vector3F64>
148
- objIds: Array<Array<string>>
149
- }
150
-
151
- export interface Results {
152
- results: Array<Array<Array<number>>>
153
- positions: Array<Vector3F64>
154
- objIds: Array<Array<string>>
155
- }
156
-
157
144
  export interface Results {
158
145
  results: Array<Array<Array<number>>>
159
146
  positions: Array<Vector3F64>
@@ -168,50 +155,6 @@ export interface Results {
168
155
 
169
156
  export declare function samplePointsByImage(option: SamplePointsByImageOption): Results
170
157
 
171
- export interface SamplePointsByImageOption {
172
- view?: boolean
173
- /** pcd url,pcd_chunk为true时,该值为目录 */
174
- pcdPath: string
175
- /** 是否使用pcd片段 */
176
- pcdChunk?: boolean
177
- /** 图片url列表 */
178
- imageUrls: Array<string>
179
- /** 点云z轴小于该值的过滤掉 */
180
- minZ?: number
181
- /** 当前使用版本 */
182
- version?: string
183
- /** 点云蔟过滤 */
184
- clusterFilter?: boolean
185
- /** 点云蔟分类距离 */
186
- distanceThreshold?: number
187
- /** 深度过滤 */
188
- depthFilter?: DepthFilter
189
- /** 过滤类型列表 */
190
- excludeCategoryList?: Array<string>
191
- }
192
-
193
- export interface SamplePointsByImageOption {
194
- view?: boolean
195
- /** pcd url,pcd_chunk为true时,该值为目录 */
196
- pcdPath: string
197
- /** 是否使用pcd片段 */
198
- pcdChunk?: boolean
199
- /** 图片url列表 */
200
- imageUrls: Array<string>
201
- /** 点云z轴小于该值的过滤掉 */
202
- minZ?: number
203
- /** 当前使用版本 */
204
- version?: string
205
- /** 点云蔟过滤 */
206
- clusterFilter?: boolean
207
- /** 点云蔟分类距离 */
208
- distanceThreshold?: number
209
- /** 深度过滤 */
210
- depthFilter?: DepthFilter
211
- /** 过滤类型列表 */
212
- excludeCategoryList?: Array<string>
213
- }
214
-
215
158
  export interface SamplePointsByImageOption {
216
159
  view?: boolean
217
160
  /** pcd url,pcd_chunk为true时,该值为目录 */
@@ -266,17 +209,9 @@ export interface SamplePointsByImageOption {
266
209
 
267
210
  export declare function squareBackfacePointCloudTest(option: PcBackfaceTestOptions): Array<number>
268
211
 
269
- export declare function squareHasSquareBehind(option: HasQquareBehindOptions): Array<number>
212
+ export declare function squareHasObjectInFront(option: HasObjectInFrontOptions): Array<number>
270
213
 
271
- export interface Trajectory {
272
- x: number
273
- y: number
274
- z: number
275
- qx: number
276
- qy: number
277
- qz: number
278
- qw: number
279
- }
214
+ export declare function squareHasSquareBehind(option: HasQquareBehindOptions): Array<number>
280
215
 
281
216
  export interface Trajectory {
282
217
  x: number
@@ -294,10 +229,3 @@ export interface Vector3F64 {
294
229
  y: number
295
230
  z: number
296
231
  }
297
-
298
- /** 三维向量,包含 x、y、z 分量 */
299
- export interface Vector3F64 {
300
- x: number
301
- y: number
302
- z: number
303
- }
package/src/index.js CHANGED
@@ -588,6 +588,8 @@ if (!nativeBinding) {
588
588
 
589
589
  module.exports = nativeBinding
590
590
  module.exports.checkLineSideVisibility = nativeBinding.checkLineSideVisibility
591
+ module.exports.modelPreview = nativeBinding.modelPreview
591
592
  module.exports.samplePointsByImage = nativeBinding.samplePointsByImage
592
593
  module.exports.squareBackfacePointCloudTest = nativeBinding.squareBackfacePointCloudTest
594
+ module.exports.squareHasObjectInFront = nativeBinding.squareHasObjectInFront
593
595
  module.exports.squareHasSquareBehind = nativeBinding.squareHasSquareBehind
package/src/main.js CHANGED
@@ -169,7 +169,20 @@ function samplePointsByImage(params) {
169
169
  return gxf.samplePointsByImage(params)
170
170
  }
171
171
 
172
+ /**
173
+ *
174
+ * @param {import("./index").ModelPreviewResults} params
175
+ * @returns
176
+ */
177
+ function modelPreview(params) {
178
+ return gxf.modelPreview(params)
179
+ }
180
+
172
181
  module.exports.checkLineSideVisibility = checkLineSideVisibility
173
182
  module.exports.squareBackfacePointCloudTest = squareBackfacePointCloudTest
174
183
  module.exports.squareHasSquareBehind = squareHasSquareBehind
175
184
  module.exports.samplePointsByImage = samplePointsByImage
185
+ module.exports.modelPreview = modelPreview
186
+ module.exports.squareHasObjectInFront = gxf.squareHasObjectInFront
187
+
188
+