rm-gxf-computing-rusts 0.0.33 → 0.0.34

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.34",
4
4
  "description": "",
5
5
  "author": "初秋",
6
6
  "type": "commonjs",
Binary file
Binary file
package/src/index.d.ts CHANGED
@@ -1,5 +1,57 @@
1
1
  /* auto-generated by NAPI-RS */
2
2
  /* eslint-disable */
3
+ export interface ArgumentBox3 {
4
+ min: Vector3F64
5
+ max: Vector3F64
6
+ }
7
+
8
+ export interface ArgumentBox3 {
9
+ min: Vector3F64
10
+ max: Vector3F64
11
+ }
12
+
13
+ export interface ArgumentBoxInfo {
14
+ box3: ArgumentBox3
15
+ positionArr: Array<Vector3F64>
16
+ }
17
+
18
+ export interface ArgumentBoxInfo {
19
+ box3: ArgumentBox3
20
+ positionArr: Array<Vector3F64>
21
+ }
22
+
23
+ export interface ArgumentLine {
24
+ start?: Vector3F64
25
+ end?: Vector3F64
26
+ missingCheckResults: Array<Quads>
27
+ existSegments: Array<Quads>
28
+ intersectionSegments?: Array<Array<Index>>
29
+ objPositionArr?: Array<Array<number>>
30
+ }
31
+
32
+ export interface ArgumentLine {
33
+ start?: Vector3F64
34
+ end?: Vector3F64
35
+ missingCheckResults: Array<Quads>
36
+ existSegments: Array<Quads>
37
+ intersectionSegments?: Array<Array<Index>>
38
+ objPositionArr?: Array<Array<number>>
39
+ }
40
+
41
+ export interface ArgumentLine2 {
42
+ start?: Vector3F64
43
+ end?: Vector3F64
44
+ checkResults: Array<Quads>
45
+ existSegments: Array<Quads>
46
+ }
47
+
48
+ export interface ArgumentLine2 {
49
+ start?: Vector3F64
50
+ end?: Vector3F64
51
+ checkResults: Array<Quads>
52
+ existSegments: Array<Quads>
53
+ }
54
+
3
55
  export declare function checkLineSideVisibility(option: CheckLineSideVisibilityOption): Array<number>
4
56
 
5
57
  export interface CheckLineSideVisibilityOption {
@@ -38,24 +90,26 @@ export interface DepthFilter {
38
90
  depthThreshold: number
39
91
  }
40
92
 
41
- export interface DepthFilter {
42
- searchRadius: number
43
- depthThreshold: number
93
+ export interface HasObjectInFrontOptions {
94
+ view?: boolean
95
+ lines: Array<ArgumentLine2>
96
+ boxInfos: Array<ArgumentBoxInfo>
44
97
  }
45
98
 
46
- export interface DepthFilter {
47
- searchRadius: number
48
- depthThreshold: number
99
+ export interface HasObjectInFrontOptions {
100
+ view?: boolean
101
+ lines: Array<ArgumentLine2>
102
+ boxInfos: Array<ArgumentBoxInfo>
49
103
  }
50
104
 
51
105
  export interface HasQquareBehindOptions {
52
106
  view?: boolean
53
- lines: Array<ParseLineResult>
107
+ lines: Array<ArgumentLine>
54
108
  }
55
109
 
56
110
  export interface HasQquareBehindOptions {
57
111
  view?: boolean
58
- lines: Array<ParseLineResult>
112
+ lines: Array<ArgumentLine>
59
113
  }
60
114
 
61
115
  export interface Index {
@@ -98,22 +152,34 @@ export interface LineData {
98
152
  checkResults: Array<CheckResult>
99
153
  }
100
154
 
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>>
155
+ export declare function modelPreview(option: Parameter): ModelPreviewResults
156
+
157
+ export interface ModelPreviewResults {
158
+ data: Array<number>
159
+ width: number
160
+ height: number
108
161
  }
109
162
 
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>>
163
+ export interface ModelPreviewResults {
164
+ data: Array<number>
165
+ width: number
166
+ height: number
167
+ }
168
+
169
+ export interface Parameter {
170
+ view?: boolean
171
+ width: number
172
+ height: number
173
+ url: string
174
+ outUrl?: string
175
+ }
176
+
177
+ export interface Parameter {
178
+ view?: boolean
179
+ width: number
180
+ height: number
181
+ url: string
182
+ outUrl?: string
117
183
  }
118
184
 
119
185
  export interface PcBackfaceTestOptions {
@@ -154,64 +220,8 @@ export interface Results {
154
220
  objIds: Array<Array<string>>
155
221
  }
156
222
 
157
- export interface Results {
158
- results: Array<Array<Array<number>>>
159
- positions: Array<Vector3F64>
160
- objIds: Array<Array<string>>
161
- }
162
-
163
- export interface Results {
164
- results: Array<Array<Array<number>>>
165
- positions: Array<Vector3F64>
166
- objIds: Array<Array<string>>
167
- }
168
-
169
223
  export declare function samplePointsByImage(option: SamplePointsByImageOption): Results
170
224
 
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
225
  export interface SamplePointsByImageOption {
216
226
  view?: boolean
217
227
  /** pcd url,pcd_chunk为true时,该值为目录 */
@@ -266,6 +276,8 @@ export interface SamplePointsByImageOption {
266
276
 
267
277
  export declare function squareBackfacePointCloudTest(option: PcBackfaceTestOptions): Array<number>
268
278
 
279
+ export declare function squareHasObjectInFront(option: HasObjectInFrontOptions): Array<number>
280
+
269
281
  export declare function squareHasSquareBehind(option: HasQquareBehindOptions): Array<number>
270
282
 
271
283
  export interface Trajectory {
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
+