Repository navigation
Expand file tree
/
Copy pathrecognized_welding_result.h
More file actions
2919 lines (2796 loc) · 87.1 KB
/
Copy pathrecognized_welding_result.h
File metadata and controls
2919 lines (2796 loc) · 87.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _WORK_FEATURERECOGNITION_AVRO_FR_RECOGNIZED_WELDING_RESULT_H_3218641067__H_
#define _WORK_FEATURERECOGNITION_AVRO_FR_RECOGNIZED_WELDING_RESULT_H_3218641067__H_
#include <sstream>
#include "boost/any.hpp"
#include "avro/Specific.hh"
#include "avro/Encoder.hh"
#include "avro/Decoder.hh"
namespace fr {
namespace recognize_welding {
struct Point3D {
double x;
double y;
double z;
Point3D() :
x(),
y(),
z()
{ }
Point3D(double v_x, double v_y, double v_z) :
x(v_x),
y(v_y),
z(v_z)
{ }
};
struct Box {
Point3D low;
Point3D high;
Box() :
low(),
high()
{ }
Box(const Point3D& v_low, const Point3D& v_high) :
low(v_low),
high(v_high)
{ }
};
struct UnitVector3D {
double x;
double y;
double z;
UnitVector3D() :
x(),
y(),
z()
{ }
UnitVector3D(double v_x, double v_y, double v_z) :
x(v_x),
y(v_y),
z(v_z)
{ }
};
struct Axis {
Point3D pos;
UnitVector3D dir;
UnitVector3D orthogonalDir;
Axis() :
pos(),
dir(),
orthogonalDir()
{ }
Axis(const Point3D& v_pos, const UnitVector3D& v_dir, const UnitVector3D& v_orthogonalDir) :
pos(v_pos),
dir(v_dir),
orthogonalDir(v_orthogonalDir)
{ }
};
struct SheetAssembly {
std::string id;
Box bound;
std::vector<std::string > products;
std::vector<std::string > weldings;
Axis layoutAxis;
int32_t likelihood;
std::vector<int32_t > errors;
SheetAssembly() :
id(),
bound(),
products(),
weldings(),
layoutAxis(),
likelihood(),
errors()
{ }
SheetAssembly(const std::string& v_id, const Box& v_bound, const std::vector<std::string >& v_products, const std::vector<std::string >& v_weldings, const Axis& v_layoutAxis, int32_t v_likelihood, const std::vector<int32_t >& v_errors) :
id(v_id),
bound(v_bound),
products(v_products),
weldings(v_weldings),
layoutAxis(v_layoutAxis),
likelihood(v_likelihood),
errors(v_errors)
{ }
};
struct SideWelding {
std::string id;
bool isBothSideOnly;
std::string sideWeldingType;
std::string primaryFeature;
std::string secondaryFeature;
std::string topPart;
std::string bottomPart;
SideWelding() :
id(),
isBothSideOnly(),
sideWeldingType(),
primaryFeature(),
secondaryFeature(),
topPart(),
bottomPart()
{ }
SideWelding(const std::string& v_id, bool v_isBothSideOnly, const std::string& v_sideWeldingType, const std::string& v_primaryFeature, const std::string& v_secondaryFeature, const std::string& v_topPart, const std::string& v_bottomPart) :
id(v_id),
isBothSideOnly(v_isBothSideOnly),
sideWeldingType(v_sideWeldingType),
primaryFeature(v_primaryFeature),
secondaryFeature(v_secondaryFeature),
topPart(v_topPart),
bottomPart(v_bottomPart)
{ }
};
struct SurfaceWelding {
std::string id;
std::string primaryFeature;
std::string secondaryFeature;
std::vector<std::string > parts;
SurfaceWelding() :
id(),
primaryFeature(),
secondaryFeature(),
parts()
{ }
SurfaceWelding(const std::string& v_id, const std::string& v_primaryFeature, const std::string& v_secondaryFeature, const std::vector<std::string >& v_parts) :
id(v_id),
primaryFeature(v_primaryFeature),
secondaryFeature(v_secondaryFeature),
parts(v_parts)
{ }
};
struct LineWeldingPart {
std::string id;
std::vector<std::string > primaryFaces;
std::vector<std::string > secondaryFaces;
std::string primaryEdge;
std::string secondaryEdge;
std::vector<std::string > facesRelatedToEdge;
std::vector<std::string > facesProximityToPrimaryEdge;
std::vector<std::string > facesProximityToSecondaryEdge;
std::string holeFeatureId;
double length;
bool isEnabledGrooveWelding;
std::vector<std::string > ignorableReasons;
LineWeldingPart() :
id(),
primaryFaces(),
secondaryFaces(),
primaryEdge(),
secondaryEdge(),
facesRelatedToEdge(),
facesProximityToPrimaryEdge(),
facesProximityToSecondaryEdge(),
holeFeatureId(),
length(),
isEnabledGrooveWelding(),
ignorableReasons()
{ }
LineWeldingPart(const std::string& v_id, const std::vector<std::string >& v_primaryFaces, const std::vector<std::string >& v_secondaryFaces, const std::string& v_primaryEdge, const std::string& v_secondaryEdge, const std::vector<std::string >& v_facesRelatedToEdge, const std::vector<std::string >& v_facesProximityToPrimaryEdge, const std::vector<std::string >& v_facesProximityToSecondaryEdge, const std::string& v_holeFeatureId, double v_length, bool v_isEnabledGrooveWelding, const std::vector<std::string >& v_ignorableReasons) :
id(v_id),
primaryFaces(v_primaryFaces),
secondaryFaces(v_secondaryFaces),
primaryEdge(v_primaryEdge),
secondaryEdge(v_secondaryEdge),
facesRelatedToEdge(v_facesRelatedToEdge),
facesProximityToPrimaryEdge(v_facesProximityToPrimaryEdge),
facesProximityToSecondaryEdge(v_facesProximityToSecondaryEdge),
holeFeatureId(v_holeFeatureId),
length(v_length),
isEnabledGrooveWelding(v_isEnabledGrooveWelding),
ignorableReasons(v_ignorableReasons)
{ }
};
struct NonWeldingPart {
std::string id;
NonWeldingPart() :
id()
{ }
NonWeldingPart(const std::string& v_id) :
id(v_id)
{ }
};
struct SurfaceWeldingPart {
std::string id;
std::string primaryFace;
std::string secondaryFace;
SurfaceWeldingPart() :
id(),
primaryFace(),
secondaryFace()
{ }
SurfaceWeldingPart(const std::string& v_id, const std::string& v_primaryFace, const std::string& v_secondaryFace) :
id(v_id),
primaryFace(v_primaryFace),
secondaryFace(v_secondaryFace)
{ }
};
struct _RecognizedWeldingResultRaw_json_Union__0__ {
private:
size_t idx_;
boost::any value_;
public:
size_t idx() const { return idx_; }
SheetAssembly get_SheetAssembly() const;
void get(SheetAssembly& v) const;
void set_SheetAssembly(const SheetAssembly& v);
void set(const SheetAssembly& v);
SideWelding get_SideWelding() const;
void get(SideWelding& v) const;
void set_SideWelding(const SideWelding& v);
void set(const SideWelding& v);
SurfaceWelding get_SurfaceWelding() const;
void get(SurfaceWelding& v) const;
void set_SurfaceWelding(const SurfaceWelding& v);
void set(const SurfaceWelding& v);
LineWeldingPart get_LineWeldingPart() const;
void get(LineWeldingPart& v) const;
void set_LineWeldingPart(const LineWeldingPart& v);
void set(const LineWeldingPart& v);
NonWeldingPart get_NonWeldingPart() const;
void get(NonWeldingPart& v) const;
void set_NonWeldingPart(const NonWeldingPart& v);
void set(const NonWeldingPart& v);
SurfaceWeldingPart get_SurfaceWeldingPart() const;
void get(SurfaceWeldingPart& v) const;
void set_SurfaceWeldingPart(const SurfaceWeldingPart& v);
void set(const SurfaceWeldingPart& v);
_RecognizedWeldingResultRaw_json_Union__0__();
const boost::any& cref() const {
return value_;
}
template<class DecodeType>
DecodeType get() const {
DecodeType v;
get(v);
return v;
}
static const bool valuetype_is_unique = false;
using unique_valuetype = void;
};
struct Vector3D {
double x;
double y;
double z;
Vector3D() :
x(),
y(),
z()
{ }
Vector3D(double v_x, double v_y, double v_z) :
x(v_x),
y(v_y),
z(v_z)
{ }
};
struct Parameter {
double value;
Parameter() :
value()
{ }
Parameter(double v_value) :
value(v_value)
{ }
};
struct _RecognizedWeldingResultRaw_json_Union__1__ {
private:
size_t idx_;
boost::any value_;
public:
size_t idx() const { return idx_; }
bool is_null() const {
return (idx_ == 0);
}
void set_null() {
idx_ = 0;
value_ = boost::any();
}
double get_double() const;
void get(double& v) const;
void set_double(const double& v);
void set(double v);
_RecognizedWeldingResultRaw_json_Union__1__();
const boost::any& cref() const {
return value_;
}
template<class DecodeType>
DecodeType get() const {
DecodeType v;
get(v);
return v;
}
static const bool valuetype_is_unique = true;
using unique_valuetype = double;
};
struct _RecognizedWeldingResultRaw_json_Union__2__ {
private:
size_t idx_;
boost::any value_;
public:
size_t idx() const { return idx_; }
bool is_null() const {
return (idx_ == 0);
}
void set_null() {
idx_ = 0;
value_ = boost::any();
}
double get_double() const;
void get(double& v) const;
void set_double(const double& v);
void set(double v);
_RecognizedWeldingResultRaw_json_Union__2__();
const boost::any& cref() const {
return value_;
}
template<class DecodeType>
DecodeType get() const {
DecodeType v;
get(v);
return v;
}
static const bool valuetype_is_unique = true;
using unique_valuetype = double;
};
struct Interval {
using start_t = _RecognizedWeldingResultRaw_json_Union__1__;
using end_t = _RecognizedWeldingResultRaw_json_Union__2__;
start_t start;
end_t end;
Interval() :
start(),
end()
{ }
Interval(const start_t& v_start, const end_t& v_end) :
start(v_start),
end(v_end)
{ }
};
struct Circle {
Point3D center;
UnitVector3D normal;
Vector3D majorAxis;
double radiusRatio;
Parameter paramOff;
bool periodic;
Interval paramRange;
Circle() :
center(),
normal(),
majorAxis(),
radiusRatio(),
paramOff(),
periodic(),
paramRange()
{ }
Circle(const Point3D& v_center, const UnitVector3D& v_normal, const Vector3D& v_majorAxis, double v_radiusRatio, const Parameter& v_paramOff, bool v_periodic, const Interval& v_paramRange) :
center(v_center),
normal(v_normal),
majorAxis(v_majorAxis),
radiusRatio(v_radiusRatio),
paramOff(v_paramOff),
periodic(v_periodic),
paramRange(v_paramRange)
{ }
};
struct Ellipse {
Point3D center;
UnitVector3D normal;
Vector3D majorAxis;
double radiusRatio;
Parameter paramOff;
bool periodic;
Interval paramRange;
Ellipse() :
center(),
normal(),
majorAxis(),
radiusRatio(),
paramOff(),
periodic(),
paramRange()
{ }
Ellipse(const Point3D& v_center, const UnitVector3D& v_normal, const Vector3D& v_majorAxis, double v_radiusRatio, const Parameter& v_paramOff, bool v_periodic, const Interval& v_paramRange) :
center(v_center),
normal(v_normal),
majorAxis(v_majorAxis),
radiusRatio(v_radiusRatio),
paramOff(v_paramOff),
periodic(v_periodic),
paramRange(v_paramRange)
{ }
};
struct _RecognizedWeldingResultRaw_json_Union__3__ {
private:
size_t idx_;
boost::any value_;
public:
size_t idx() const { return idx_; }
Circle get_Circle() const;
void get(Circle& v) const;
void set_Circle(const Circle& v);
void set(const Circle& v);
Ellipse get_Ellipse() const;
void get(Ellipse& v) const;
void set_Ellipse(const Ellipse& v);
void set(const Ellipse& v);
_RecognizedWeldingResultRaw_json_Union__3__();
const boost::any& cref() const {
return value_;
}
template<class DecodeType>
DecodeType get() const {
DecodeType v;
get(v);
return v;
}
static const bool valuetype_is_unique = false;
using unique_valuetype = void;
};
struct Cone {
using base_t = _RecognizedWeldingResultRaw_json_Union__3__;
base_t base;
double sineAngle;
double cosineAngle;
bool reverseU;
double uParamScale;
bool isCylinder;
Cone() :
base(),
sineAngle(),
cosineAngle(),
reverseU(),
uParamScale(),
isCylinder()
{ }
Cone(const base_t& v_base, double v_sineAngle, double v_cosineAngle, bool v_reverseU, double v_uParamScale, bool v_isCylinder) :
base(v_base),
sineAngle(v_sineAngle),
cosineAngle(v_cosineAngle),
reverseU(v_reverseU),
uParamScale(v_uParamScale),
isCylinder(v_isCylinder)
{ }
};
struct _RecognizedWeldingResultRaw_json_Union__4__ {
private:
size_t idx_;
boost::any value_;
public:
size_t idx() const { return idx_; }
Circle get_Circle() const;
void get(Circle& v) const;
void set_Circle(const Circle& v);
void set(const Circle& v);
Ellipse get_Ellipse() const;
void get(Ellipse& v) const;
void set_Ellipse(const Ellipse& v);
void set(const Ellipse& v);
_RecognizedWeldingResultRaw_json_Union__4__();
const boost::any& cref() const {
return value_;
}
template<class DecodeType>
DecodeType get() const {
DecodeType v;
get(v);
return v;
}
static const bool valuetype_is_unique = false;
using unique_valuetype = void;
};
struct Cylinder {
using base_t = _RecognizedWeldingResultRaw_json_Union__4__;
base_t base;
double sineAngle;
double cosineAngle;
bool reverseU;
double uParamScale;
bool isCylinder;
double radius;
Cylinder() :
base(),
sineAngle(),
cosineAngle(),
reverseU(),
uParamScale(),
isCylinder(),
radius()
{ }
Cylinder(const base_t& v_base, double v_sineAngle, double v_cosineAngle, bool v_reverseU, double v_uParamScale, bool v_isCylinder, double v_radius) :
base(v_base),
sineAngle(v_sineAngle),
cosineAngle(v_cosineAngle),
reverseU(v_reverseU),
uParamScale(v_uParamScale),
isCylinder(v_isCylinder),
radius(v_radius)
{ }
};
struct Facet {
std::vector<Point3D > points;
std::vector<UnitVector3D > normals;
Facet() :
points(),
normals()
{ }
Facet(const std::vector<Point3D >& v_points, const std::vector<UnitVector3D >& v_normals) :
points(v_points),
normals(v_normals)
{ }
};
struct Sphere {
Point3D center;
UnitVector3D poleDir;
double radius;
bool reverseV;
UnitVector3D uvOridir;
Sphere() :
center(),
poleDir(),
radius(),
reverseV(),
uvOridir()
{ }
Sphere(const Point3D& v_center, const UnitVector3D& v_poleDir, double v_radius, bool v_reverseV, const UnitVector3D& v_uvOridir) :
center(v_center),
poleDir(v_poleDir),
radius(v_radius),
reverseV(v_reverseV),
uvOridir(v_uvOridir)
{ }
};
struct SurfacePlane {
UnitVector3D normal;
bool reverseV;
Point3D rootPoint;
Vector3D uDeriv;
SurfacePlane() :
normal(),
reverseV(),
rootPoint(),
uDeriv()
{ }
SurfacePlane(const UnitVector3D& v_normal, bool v_reverseV, const Point3D& v_rootPoint, const Vector3D& v_uDeriv) :
normal(v_normal),
reverseV(v_reverseV),
rootPoint(v_rootPoint),
uDeriv(v_uDeriv)
{ }
};
struct Torus {
Point3D center;
double majorRadius;
double minorRadius;
UnitVector3D normal;
bool reverseV;
UnitVector3D uvOridir;
Torus() :
center(),
majorRadius(),
minorRadius(),
normal(),
reverseV(),
uvOridir()
{ }
Torus(const Point3D& v_center, double v_majorRadius, double v_minorRadius, const UnitVector3D& v_normal, bool v_reverseV, const UnitVector3D& v_uvOridir) :
center(v_center),
majorRadius(v_majorRadius),
minorRadius(v_minorRadius),
normal(v_normal),
reverseV(v_reverseV),
uvOridir(v_uvOridir)
{ }
};
struct _RecognizedWeldingResultRaw_json_Union__5__ {
private:
size_t idx_;
boost::any value_;
public:
size_t idx() const { return idx_; }
Cone get_Cone() const;
void get(Cone& v) const;
void set_Cone(const Cone& v);
void set(const Cone& v);
Cylinder get_Cylinder() const;
void get(Cylinder& v) const;
void set_Cylinder(const Cylinder& v);
void set(const Cylinder& v);
Facet get_Facet() const;
void get(Facet& v) const;
void set_Facet(const Facet& v);
void set(const Facet& v);
Sphere get_Sphere() const;
void get(Sphere& v) const;
void set_Sphere(const Sphere& v);
void set(const Sphere& v);
SurfacePlane get_SurfacePlane() const;
void get(SurfacePlane& v) const;
void set_SurfacePlane(const SurfacePlane& v);
void set(const SurfacePlane& v);
Torus get_Torus() const;
void get(Torus& v) const;
void set_Torus(const Torus& v);
void set(const Torus& v);
_RecognizedWeldingResultRaw_json_Union__5__();
const boost::any& cref() const {
return value_;
}
template<class DecodeType>
DecodeType get() const {
DecodeType v;
get(v);
return v;
}
static const bool valuetype_is_unique = false;
using unique_valuetype = void;
};
struct Face {
using surface_t = _RecognizedWeldingResultRaw_json_Union__5__;
std::string id;
std::vector<std::string > loops;
surface_t surface;
bool sense;
double area;
Face() :
id(),
loops(),
surface(),
sense(),
area()
{ }
Face(const std::string& v_id, const std::vector<std::string >& v_loops, const surface_t& v_surface, bool v_sense, double v_area) :
id(v_id),
loops(v_loops),
surface(v_surface),
sense(v_sense),
area(v_area)
{ }
};
struct Polyline {
std::vector<Point3D > points;
Polyline() :
points()
{ }
Polyline(const std::vector<Point3D >& v_points) :
points(v_points)
{ }
};
struct Straight {
Point3D rootPoint;
UnitVector3D direction;
double paramScale;
Straight() :
rootPoint(),
direction(),
paramScale()
{ }
Straight(const Point3D& v_rootPoint, const UnitVector3D& v_direction, double v_paramScale) :
rootPoint(v_rootPoint),
direction(v_direction),
paramScale(v_paramScale)
{ }
};
struct _RecognizedWeldingResultRaw_json_Union__6__ {
private:
size_t idx_;
boost::any value_;
public:
size_t idx() const { return idx_; }
Circle get_Circle() const;
void get(Circle& v) const;
void set_Circle(const Circle& v);
void set(const Circle& v);
Ellipse get_Ellipse() const;
void get(Ellipse& v) const;
void set_Ellipse(const Ellipse& v);
void set(const Ellipse& v);
Polyline get_Polyline() const;
void get(Polyline& v) const;
void set_Polyline(const Polyline& v);
void set(const Polyline& v);
Straight get_Straight() const;
void get(Straight& v) const;
void set_Straight(const Straight& v);
void set(const Straight& v);
_RecognizedWeldingResultRaw_json_Union__6__();
const boost::any& cref() const {
return value_;
}
template<class DecodeType>
DecodeType get() const {
DecodeType v;
get(v);
return v;
}
static const bool valuetype_is_unique = false;
using unique_valuetype = void;
};
struct Edge {
using curve_t = _RecognizedWeldingResultRaw_json_Union__6__;
std::string id;
Interval paramRange;
std::string start;
std::string end;
curve_t curve;
bool sense;
Edge() :
id(),
paramRange(),
start(),
end(),
curve(),
sense()
{ }
Edge(const std::string& v_id, const Interval& v_paramRange, const std::string& v_start, const std::string& v_end, const curve_t& v_curve, bool v_sense) :
id(v_id),
paramRange(v_paramRange),
start(v_start),
end(v_end),
curve(v_curve),
sense(v_sense)
{ }
};
struct Vertex {
std::string id;
Point3D position;
Vertex() :
id(),
position()
{ }
Vertex(const std::string& v_id, const Point3D& v_position) :
id(v_id),
position(v_position)
{ }
};
struct Loop {
std::string id;
std::vector<std::string > coedges;
std::string face;
Loop() :
id(),
coedges(),
face()
{ }
Loop(const std::string& v_id, const std::vector<std::string >& v_coedges, const std::string& v_face) :
id(v_id),
coedges(v_coedges),
face(v_face)
{ }
};
struct Coedge {
std::string id;
std::string edge;
std::string loop;
bool sense;
Coedge() :
id(),
edge(),
loop(),
sense()
{ }
Coedge(const std::string& v_id, const std::string& v_edge, const std::string& v_loop, bool v_sense) :
id(v_id),
edge(v_edge),
loop(v_loop),
sense(v_sense)
{ }
};
struct Topologies {
std::vector<Face > faces;
std::vector<Edge > edges;
std::vector<Vertex > vertices;
std::vector<Loop > loops;
std::vector<Coedge > coedges;
Topologies() :
faces(),
edges(),
vertices(),
loops(),
coedges()
{ }
Topologies(const std::vector<Face >& v_faces, const std::vector<Edge >& v_edges, const std::vector<Vertex >& v_vertices, const std::vector<Loop >& v_loops, const std::vector<Coedge >& v_coedges) :
faces(v_faces),
edges(v_edges),
vertices(v_vertices),
loops(v_loops),
coedges(v_coedges)
{ }
};
struct RecognizedWeldingResultRaw {
int32_t version;
std::vector<_RecognizedWeldingResultRaw_json_Union__0__ > features;
std::vector<std::string > solidIdList;
std::vector<std::string > products;
Topologies virtualTopologies;
RecognizedWeldingResultRaw() :
version(),
features(),
solidIdList(),
products(),
virtualTopologies()
{ }
RecognizedWeldingResultRaw(int32_t v_version, const std::vector<_RecognizedWeldingResultRaw_json_Union__0__ >& v_features, const std::vector<std::string >& v_solidIdList, const std::vector<std::string >& v_products, const Topologies& v_virtualTopologies) :
version(v_version),
features(v_features),
solidIdList(v_solidIdList),
products(v_products),
virtualTopologies(v_virtualTopologies)
{ }
};
inline
SheetAssembly _RecognizedWeldingResultRaw_json_Union__0__::get_SheetAssembly() const {
if (idx_ != 0) {
throw avro::Exception("Invalid type for union");
}
return boost::any_cast<SheetAssembly >(value_);
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::get(SheetAssembly& v) const {
v = get_SheetAssembly();
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set(const SheetAssembly& v) {
idx_ = 0;
value_ = v;
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set_SheetAssembly(const SheetAssembly& v) {
set(v);
}
inline
SideWelding _RecognizedWeldingResultRaw_json_Union__0__::get_SideWelding() const {
if (idx_ != 1) {
throw avro::Exception("Invalid type for union");
}
return boost::any_cast<SideWelding >(value_);
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::get(SideWelding& v) const {
v = get_SideWelding();
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set(const SideWelding& v) {
idx_ = 1;
value_ = v;
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set_SideWelding(const SideWelding& v) {
set(v);
}
inline
SurfaceWelding _RecognizedWeldingResultRaw_json_Union__0__::get_SurfaceWelding() const {
if (idx_ != 2) {
throw avro::Exception("Invalid type for union");
}
return boost::any_cast<SurfaceWelding >(value_);
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::get(SurfaceWelding& v) const {
v = get_SurfaceWelding();
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set(const SurfaceWelding& v) {
idx_ = 2;
value_ = v;
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set_SurfaceWelding(const SurfaceWelding& v) {
set(v);
}
inline
LineWeldingPart _RecognizedWeldingResultRaw_json_Union__0__::get_LineWeldingPart() const {
if (idx_ != 3) {
throw avro::Exception("Invalid type for union");
}
return boost::any_cast<LineWeldingPart >(value_);
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::get(LineWeldingPart& v) const {
v = get_LineWeldingPart();
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set(const LineWeldingPart& v) {
idx_ = 3;
value_ = v;
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set_LineWeldingPart(const LineWeldingPart& v) {
set(v);
}
inline
NonWeldingPart _RecognizedWeldingResultRaw_json_Union__0__::get_NonWeldingPart() const {
if (idx_ != 4) {
throw avro::Exception("Invalid type for union");
}
return boost::any_cast<NonWeldingPart >(value_);
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::get(NonWeldingPart& v) const {
v = get_NonWeldingPart();
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set(const NonWeldingPart& v) {
idx_ = 4;
value_ = v;
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set_NonWeldingPart(const NonWeldingPart& v) {
set(v);
}
inline
SurfaceWeldingPart _RecognizedWeldingResultRaw_json_Union__0__::get_SurfaceWeldingPart() const {
if (idx_ != 5) {
throw avro::Exception("Invalid type for union");
}
return boost::any_cast<SurfaceWeldingPart >(value_);
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::get(SurfaceWeldingPart& v) const {
v = get_SurfaceWeldingPart();
}
inline
void _RecognizedWeldingResultRaw_json_Union__0__::set(const SurfaceWeldingPart& v) {