HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_PolyDoctor.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_PolyDoctorEnums
24 {
25  enum class IllFormedAction
26  {
27  IGNORE = 0,
28  MARK,
29  REPAIR
30  };
31 
34  {
35  using namespace UT::Literal;
36  switch (enum_value) {
37  case IllFormedAction::IGNORE: return "ignore"_sh;
38  case IllFormedAction::MARK: return "mark"_sh;
39  case IllFormedAction::REPAIR: return "repair"_sh;
40  default: UT_ASSERT(false); return ""_sh;
41  }
42  }
43 
44  enum class ManyEdgesAction
45  {
46  IGNORE = 0,
47  MARK,
48  REPAIR
49  };
50 
53  {
54  using namespace UT::Literal;
55  switch (enum_value) {
56  case ManyEdgesAction::IGNORE: return "ignore"_sh;
57  case ManyEdgesAction::MARK: return "mark"_sh;
58  case ManyEdgesAction::REPAIR: return "repair"_sh;
59  default: UT_ASSERT(false); return ""_sh;
60  }
61  }
62 
63  enum class NonConvexAction
64  {
65  IGNORE = 0,
66  MARK,
67  REPAIR
68  };
69 
72  {
73  using namespace UT::Literal;
74  switch (enum_value) {
75  case NonConvexAction::IGNORE: return "ignore"_sh;
76  case NonConvexAction::MARK: return "mark"_sh;
77  case NonConvexAction::REPAIR: return "repair"_sh;
78  default: UT_ASSERT(false); return ""_sh;
79  }
80  }
81 
82  enum class OverlappingAction
83  {
84  IGNORE = 0,
85  MARK,
86  REPAIR
87  };
88 
91  {
92  using namespace UT::Literal;
93  switch (enum_value) {
94  case OverlappingAction::IGNORE: return "ignore"_sh;
95  case OverlappingAction::MARK: return "mark"_sh;
96  case OverlappingAction::REPAIR: return "repair"_sh;
97  default: UT_ASSERT(false); return ""_sh;
98  }
99  }
100 
102  {
103  IGNORE = 0,
104  MARK,
105  REPAIR
106  };
107 
110  {
111  using namespace UT::Literal;
112  switch (enum_value) {
113  case SelfIntersectingAction::IGNORE: return "ignore"_sh;
114  case SelfIntersectingAction::MARK: return "mark"_sh;
115  case SelfIntersectingAction::REPAIR: return "repair"_sh;
116  default: UT_ASSERT(false); return ""_sh;
117  }
118  }
119 
121  {
122  IGNORE = 0,
123  MARK,
124  REPAIR
125  };
126 
129  {
130  using namespace UT::Literal;
131  switch (enum_value) {
132  case GloballySmallAreasAction::IGNORE: return "ignore"_sh;
133  case GloballySmallAreasAction::MARK: return "mark"_sh;
134  case GloballySmallAreasAction::REPAIR: return "repair"_sh;
135  default: UT_ASSERT(false); return ""_sh;
136  }
137  }
138 
140  {
141  IGNORE = 0,
142  MARK,
143  REPAIR
144  };
145 
148  {
149  using namespace UT::Literal;
150  switch (enum_value) {
151  case LocallySmallAreasAction::IGNORE: return "ignore"_sh;
152  case LocallySmallAreasAction::MARK: return "mark"_sh;
153  case LocallySmallAreasAction::REPAIR: return "repair"_sh;
154  default: UT_ASSERT(false); return ""_sh;
155  }
156  }
157 
158  enum class NonUniformAction
159  {
160  IGNORE = 0,
161  MARK,
162  REPAIR
163  };
164 
167  {
168  using namespace UT::Literal;
169  switch (enum_value) {
170  case NonUniformAction::IGNORE: return "ignore"_sh;
171  case NonUniformAction::MARK: return "mark"_sh;
172  case NonUniformAction::REPAIR: return "repair"_sh;
173  default: UT_ASSERT(false); return ""_sh;
174  }
175  }
176 
178  {
179  IGNORE = 0,
180  MARK,
181  REPAIR
182  };
183 
186  {
187  using namespace UT::Literal;
188  switch (enum_value) {
189  case GloballySmallEdgesAction::IGNORE: return "ignore"_sh;
190  case GloballySmallEdgesAction::MARK: return "mark"_sh;
191  case GloballySmallEdgesAction::REPAIR: return "repair"_sh;
192  default: UT_ASSERT(false); return ""_sh;
193  }
194  }
195 
197  {
198  IGNORE = 0,
199  MARK,
200  REPAIR
201  };
202 
205  {
206  using namespace UT::Literal;
207  switch (enum_value) {
208  case LocallySmallEdgesAction::IGNORE: return "ignore"_sh;
209  case LocallySmallEdgesAction::MARK: return "mark"_sh;
210  case LocallySmallEdgesAction::REPAIR: return "repair"_sh;
211  default: UT_ASSERT(false); return ""_sh;
212  }
213  }
214 
216  {
217  IGNORE = 0,
218  MARK,
219  REPAIR
220  };
221 
224  {
225  using namespace UT::Literal;
226  switch (enum_value) {
227  case DisconnectedPointsAction::IGNORE: return "ignore"_sh;
228  case DisconnectedPointsAction::MARK: return "mark"_sh;
229  case DisconnectedPointsAction::REPAIR: return "repair"_sh;
230  default: UT_ASSERT(false); return ""_sh;
231  }
232  }
233 
235  {
236  IGNORE = 0,
237  MARK,
238  REPAIR
239  };
240 
243  {
244  using namespace UT::Literal;
245  switch (enum_value) {
246  case NonManifoldPointsAction::IGNORE: return "ignore"_sh;
247  case NonManifoldPointsAction::MARK: return "mark"_sh;
248  case NonManifoldPointsAction::REPAIR: return "repair"_sh;
249  default: UT_ASSERT(false); return ""_sh;
250  }
251  }
252 
253 }
254 
255 
257 {
258 public:
259  static int version() { return 1; }
260 
262  {
263  myGroup = ""_UTsh;
264  myMaxPasses = 50;
265  myRandomSeed = 3;
266  myIllFormedAction = 2;
267  myManyEdgesAction = 2;
268  myNonConvexAction = 2;
269  myOverlappingAction = 2;
270  myPairOverlaps = false;
271  mySelfIntersectingAction = 1;
272  myThickness = 0.0001;
273  myGloballySmallAreasAction = 0;
274  myGlobalAreaThreshold = 1e-06;
275  myLocallySmallAreasAction = 0;
276  myLocalAreaThreshold = 0.01;
277  myNonUniformAction = 0;
278  myUniformityThreshold = 0.01;
279  myGloballySmallEdgesAction = 0;
280  myGlobalEdgeThreshold = 0.001;
281  myLocallySmallEdgesAction = 0;
282  myLocalEdgeThreshold = 0.3;
283  myDisconnectedPointsAction = 0;
284  myNonManifoldPointsAction = 0;
285  myIgnoreWindings = true;
286  myPreferLargeAngles = false;
287  myVisualizeMaxManifold = false;
288  myExportManifoldNumbers = false;
289  myFixWindings = false;
290  myDeleteSmallManifolds = false;
291  mySmallManifoldSize = 0;
292  myAddValidPolyAttrib = true;
293  myValidPolyAttribName = "valid_poly"_UTsh;
294  myAddRepairedPolyAttrib = true;
295  myRepairedPolyAttribName = "repaired_poly"_UTsh;
296  myAddValidPtsAttrib = true;
297  myValidPtsAttribName = "valid_pt"_UTsh;
298  myAddModifiedPtsAttrib = true;
299  myModifiedPtsAttribName = "modified_pt"_UTsh;
300  myCreateGroups = false;
301  myVisualizeInvalidPts = false;
302  myInvalidPtsColor = UT_Vector3D(0.9,0,0);
303  myVisualizeRepairedPts = false;
304  myRepairedPtsColor = UT_Vector3D(0,0,0.9);
305  myVisualizeInvalidPolys = false;
306  myInvalidPolysColor = UT_Vector3D(0.9,0,0);
307  myVisualizeRepairedPolys = false;
308  myRepairedPolysColor = UT_Vector3D(0,0,0.9);
309 
310  }
311 
312  explicit SOP_PolyDoctorParms(const SOP_PolyDoctorParms &) = default;
314  SOP_PolyDoctorParms(SOP_PolyDoctorParms &&) noexcept = default;
315  SOP_PolyDoctorParms &operator=(SOP_PolyDoctorParms &&) noexcept = default;
316 
317  ~SOP_PolyDoctorParms() override {}
318 
319  bool operator==(const SOP_PolyDoctorParms &src) const
320  {
321  if (myGroup != src.myGroup) return false;
322  if (myMaxPasses != src.myMaxPasses) return false;
323  if (myRandomSeed != src.myRandomSeed) return false;
324  if (myIllFormedAction != src.myIllFormedAction) return false;
325  if (myManyEdgesAction != src.myManyEdgesAction) return false;
326  if (myNonConvexAction != src.myNonConvexAction) return false;
327  if (myOverlappingAction != src.myOverlappingAction) return false;
328  if (myPairOverlaps != src.myPairOverlaps) return false;
329  if (mySelfIntersectingAction != src.mySelfIntersectingAction) return false;
330  if (myThickness != src.myThickness) return false;
331  if (myGloballySmallAreasAction != src.myGloballySmallAreasAction) return false;
332  if (myGlobalAreaThreshold != src.myGlobalAreaThreshold) return false;
333  if (myLocallySmallAreasAction != src.myLocallySmallAreasAction) return false;
334  if (myLocalAreaThreshold != src.myLocalAreaThreshold) return false;
335  if (myNonUniformAction != src.myNonUniformAction) return false;
336  if (myUniformityThreshold != src.myUniformityThreshold) return false;
337  if (myGloballySmallEdgesAction != src.myGloballySmallEdgesAction) return false;
338  if (myGlobalEdgeThreshold != src.myGlobalEdgeThreshold) return false;
339  if (myLocallySmallEdgesAction != src.myLocallySmallEdgesAction) return false;
340  if (myLocalEdgeThreshold != src.myLocalEdgeThreshold) return false;
341  if (myDisconnectedPointsAction != src.myDisconnectedPointsAction) return false;
342  if (myNonManifoldPointsAction != src.myNonManifoldPointsAction) return false;
343  if (myIgnoreWindings != src.myIgnoreWindings) return false;
344  if (myPreferLargeAngles != src.myPreferLargeAngles) return false;
345  if (myVisualizeMaxManifold != src.myVisualizeMaxManifold) return false;
346  if (myExportManifoldNumbers != src.myExportManifoldNumbers) return false;
347  if (myFixWindings != src.myFixWindings) return false;
348  if (myDeleteSmallManifolds != src.myDeleteSmallManifolds) return false;
349  if (mySmallManifoldSize != src.mySmallManifoldSize) return false;
350  if (myAddValidPolyAttrib != src.myAddValidPolyAttrib) return false;
351  if (myValidPolyAttribName != src.myValidPolyAttribName) return false;
352  if (myAddRepairedPolyAttrib != src.myAddRepairedPolyAttrib) return false;
353  if (myRepairedPolyAttribName != src.myRepairedPolyAttribName) return false;
354  if (myAddValidPtsAttrib != src.myAddValidPtsAttrib) return false;
355  if (myValidPtsAttribName != src.myValidPtsAttribName) return false;
356  if (myAddModifiedPtsAttrib != src.myAddModifiedPtsAttrib) return false;
357  if (myModifiedPtsAttribName != src.myModifiedPtsAttribName) return false;
358  if (myCreateGroups != src.myCreateGroups) return false;
359  if (myVisualizeInvalidPts != src.myVisualizeInvalidPts) return false;
360  if (myInvalidPtsColor != src.myInvalidPtsColor) return false;
361  if (myVisualizeRepairedPts != src.myVisualizeRepairedPts) return false;
362  if (myRepairedPtsColor != src.myRepairedPtsColor) return false;
363  if (myVisualizeInvalidPolys != src.myVisualizeInvalidPolys) return false;
364  if (myInvalidPolysColor != src.myInvalidPolysColor) return false;
365  if (myVisualizeRepairedPolys != src.myVisualizeRepairedPolys) return false;
366  if (myRepairedPolysColor != src.myRepairedPolysColor) return false;
367 
368  return true;
369  }
370  bool operator!=(const SOP_PolyDoctorParms &src) const
371  {
372  return !operator==(src);
373  }
386 
387 
388 
389  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
390  {
391  myGroup = ""_UTsh;
392  if (true)
393  graph->evalOpParm(myGroup, nodeidx, "group", time, 0);
394  myMaxPasses = 50;
395  if (true)
396  graph->evalOpParm(myMaxPasses, nodeidx, "maxpasses", time, 0);
397  myRandomSeed = 3;
398  if (true)
399  graph->evalOpParm(myRandomSeed, nodeidx, "randomseed", time, 0);
400  myIllFormedAction = 2;
401  if (true)
402  graph->evalOpParm(myIllFormedAction, nodeidx, "illformed", time, 0);
403  myManyEdgesAction = 2;
404  if (true && ( (true&&!(((int64(getIllFormedAction())==0)))) ) )
405  graph->evalOpParm(myManyEdgesAction, nodeidx, "manyedges", time, 0);
406  myNonConvexAction = 2;
407  if (true && ( (true&&!(((int64(getIllFormedAction())==0))||((int64(getManyEdgesAction())==0)))) ) )
408  graph->evalOpParm(myNonConvexAction, nodeidx, "nonconvex", time, 0);
409  myOverlappingAction = 2;
410  if (true && ( (true&&!(((int64(getIllFormedAction())==0)))) ) )
411  graph->evalOpParm(myOverlappingAction, nodeidx, "overlapping", time, 0);
412  myPairOverlaps = false;
413  if (true && ( (true&&!(((int64(getIllFormedAction())==0))||((int64(getOverlappingAction())==0)))) ) )
414  graph->evalOpParm(myPairOverlaps, nodeidx, "pairoverlaps", time, 0);
415  mySelfIntersectingAction = 1;
416  if (true && ( (true&&!(((int64(getIllFormedAction())==0))||((int64(getManyEdgesAction())==0))||((int64(getNonConvexAction())==0)))) ) )
417  graph->evalOpParm(mySelfIntersectingAction, nodeidx, "intersect", time, 0);
418  myThickness = 0.0001;
419  if (true && ( (true&&!(((int64(getIllFormedAction())==0))||((int64(getManyEdgesAction())==0))||((int64(getNonConvexAction())==0)))) ) )
420  graph->evalOpParm(myThickness, nodeidx, "thickness", time, 0);
421  myGloballySmallAreasAction = 0;
422  if (true && ( (true&&!(((int64(getIllFormedAction())==0)))) ) )
423  graph->evalOpParm(myGloballySmallAreasAction, nodeidx, "glosmallarea", time, 0);
424  myGlobalAreaThreshold = 1e-06;
425  if (true && ( (true&&!(((int64(getIllFormedAction())==0)))) ) )
426  graph->evalOpParm(myGlobalAreaThreshold, nodeidx, "gloareathres", time, 0);
427  myLocallySmallAreasAction = 0;
428  if (true && ( (true&&!(((int64(getIllFormedAction())==0)))) ) )
429  graph->evalOpParm(myLocallySmallAreasAction, nodeidx, "locsmallarea", time, 0);
430  myLocalAreaThreshold = 0.01;
431  if (true && ( (true&&!(((int64(getIllFormedAction())==0)))) ) )
432  graph->evalOpParm(myLocalAreaThreshold, nodeidx, "locareathres", time, 0);
433  myNonUniformAction = 0;
434  if (true && ( (true&&!(((int64(getIllFormedAction())==0))||((int64(getManyEdgesAction())==0))||((int64(getNonConvexAction())==0)))) ) )
435  graph->evalOpParm(myNonUniformAction, nodeidx, "nonuni", time, 0);
436  myUniformityThreshold = 0.01;
437  if (true && ( (true&&!(((int64(getIllFormedAction())==0))||((int64(getManyEdgesAction())==0))||((int64(getNonConvexAction())==0)))) ) )
438  graph->evalOpParm(myUniformityThreshold, nodeidx, "unithres", time, 0);
439  myGloballySmallEdgesAction = 0;
440  if (true)
441  graph->evalOpParm(myGloballySmallEdgesAction, nodeidx, "glosmalledge", time, 0);
442  myGlobalEdgeThreshold = 0.001;
443  if (true)
444  graph->evalOpParm(myGlobalEdgeThreshold, nodeidx, "gloedgethres", time, 0);
445  myLocallySmallEdgesAction = 0;
446  if (true)
447  graph->evalOpParm(myLocallySmallEdgesAction, nodeidx, "locsmalledge", time, 0);
448  myLocalEdgeThreshold = 0.3;
449  if (true)
450  graph->evalOpParm(myLocalEdgeThreshold, nodeidx, "locedgethres", time, 0);
451  myDisconnectedPointsAction = 0;
452  if (true)
453  graph->evalOpParm(myDisconnectedPointsAction, nodeidx, "disconnectpt", time, 0);
454  myNonManifoldPointsAction = 0;
455  if (true)
456  graph->evalOpParm(myNonManifoldPointsAction, nodeidx, "nonmanifoldpt", time, 0);
457  myIgnoreWindings = true;
458  if (true)
459  graph->evalOpParm(myIgnoreWindings, nodeidx, "ignorewindings", time, 0);
460  myPreferLargeAngles = false;
461  if (true && ( (true&&!(((int64(getNonManifoldPointsAction())!=2)))) ) )
462  graph->evalOpParm(myPreferLargeAngles, nodeidx, "preferlargeangles", time, 0);
463  myVisualizeMaxManifold = false;
464  if (true)
465  graph->evalOpParm(myVisualizeMaxManifold, nodeidx, "vismaxmanifold", time, 0);
466  myExportManifoldNumbers = false;
467  if (true)
468  graph->evalOpParm(myExportManifoldNumbers, nodeidx, "exportmanifoldnumbers", time, 0);
469  myFixWindings = false;
470  if (true)
471  graph->evalOpParm(myFixWindings, nodeidx, "fixwindings", time, 0);
472  myDeleteSmallManifolds = false;
473  if (true)
474  graph->evalOpParm(myDeleteSmallManifolds, nodeidx, "deletesmallmanifolds", time, 0);
475  mySmallManifoldSize = 0;
476  if (true && ( (true&&!(((getDeleteSmallManifolds()==0)))) ) )
477  graph->evalOpParm(mySmallManifoldSize, nodeidx, "smallmanifoldsize", time, 0);
478  myAddValidPolyAttrib = true;
479  if (true)
480  graph->evalOpParm(myAddValidPolyAttrib, nodeidx, "usevalidpoly", time, 0);
481  myValidPolyAttribName = "valid_poly"_UTsh;
482  if (true)
483  graph->evalOpParm(myValidPolyAttribName, nodeidx, "validpoly", time, 0);
484  myAddRepairedPolyAttrib = true;
485  if (true)
486  graph->evalOpParm(myAddRepairedPolyAttrib, nodeidx, "userepairedpoly", time, 0);
487  myRepairedPolyAttribName = "repaired_poly"_UTsh;
488  if (true)
489  graph->evalOpParm(myRepairedPolyAttribName, nodeidx, "repairedpoly", time, 0);
490  myAddValidPtsAttrib = true;
491  if (true)
492  graph->evalOpParm(myAddValidPtsAttrib, nodeidx, "usevalidpts", time, 0);
493  myValidPtsAttribName = "valid_pt"_UTsh;
494  if (true)
495  graph->evalOpParm(myValidPtsAttribName, nodeidx, "validpts", time, 0);
496  myAddModifiedPtsAttrib = true;
497  if (true)
498  graph->evalOpParm(myAddModifiedPtsAttrib, nodeidx, "usemodifiedpts", time, 0);
499  myModifiedPtsAttribName = "modified_pt"_UTsh;
500  if (true)
501  graph->evalOpParm(myModifiedPtsAttribName, nodeidx, "modifiedpts", time, 0);
502  myCreateGroups = false;
503  if (true)
504  graph->evalOpParm(myCreateGroups, nodeidx, "creategrps", time, 0);
505  myVisualizeInvalidPts = false;
506  if (true)
507  graph->evalOpParm(myVisualizeInvalidPts, nodeidx, "visinvalidpts", time, 0);
508  myInvalidPtsColor = UT_Vector3D(0.9,0,0);
509  if (true && ( (true&&!(((getVisualizeInvalidPts()==0)))) ) )
510  graph->evalOpParm(myInvalidPtsColor, nodeidx, "visinvalidptsfg", time, 0);
511  myVisualizeRepairedPts = false;
512  if (true)
513  graph->evalOpParm(myVisualizeRepairedPts, nodeidx, "visrepairedpts", time, 0);
514  myRepairedPtsColor = UT_Vector3D(0,0,0.9);
515  if (true && ( (true&&!(((getVisualizeRepairedPts()==0)))) ) )
516  graph->evalOpParm(myRepairedPtsColor, nodeidx, "visrepairedptsfg", time, 0);
517  myVisualizeInvalidPolys = false;
518  if (true)
519  graph->evalOpParm(myVisualizeInvalidPolys, nodeidx, "visinvalidpolys", time, 0);
520  myInvalidPolysColor = UT_Vector3D(0.9,0,0);
521  if (true && ( (true&&!(((getVisualizeInvalidPolys()==0)))) ) )
522  graph->evalOpParm(myInvalidPolysColor, nodeidx, "visinvalidpolysfg", time, 0);
523  myVisualizeRepairedPolys = false;
524  if (true)
525  graph->evalOpParm(myVisualizeRepairedPolys, nodeidx, "visrepairedpolys", time, 0);
526  myRepairedPolysColor = UT_Vector3D(0,0,0.9);
527  if (true && ( (true&&!(((getVisualizeRepairedPolys()==0)))) ) )
528  graph->evalOpParm(myRepairedPolysColor, nodeidx, "visrepairedpolysfg", time, 0);
529 
530  }
531 
532 
533  void loadFromOpSubclass(const LoadParms &loadparms) override
534  {
535  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
536  }
537 
538 
539  void copyFrom(const OP_NodeParms *src) override
540  {
541  *this = *((const SOP_PolyDoctorParms *)src);
542  }
543 
544  template <typename T>
545  void
546  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
547  {
548  if (idx.size() < 1)
549  return;
550  UT_ASSERT(idx.size() == instance.size()+1);
551  if (idx.size() != instance.size()+1)
552  return;
553  switch (idx[0])
554  {
555  case 0:
556  coerceValue(value, myGroup);
557  break;
558  case 1:
559  coerceValue(value, myMaxPasses);
560  break;
561  case 2:
562  coerceValue(value, myRandomSeed);
563  break;
564  case 3:
565  coerceValue(value, myIllFormedAction);
566  break;
567  case 4:
568  coerceValue(value, myManyEdgesAction);
569  break;
570  case 5:
571  coerceValue(value, myNonConvexAction);
572  break;
573  case 6:
574  coerceValue(value, myOverlappingAction);
575  break;
576  case 7:
577  coerceValue(value, myPairOverlaps);
578  break;
579  case 8:
580  coerceValue(value, mySelfIntersectingAction);
581  break;
582  case 9:
583  coerceValue(value, myThickness);
584  break;
585  case 10:
586  coerceValue(value, myGloballySmallAreasAction);
587  break;
588  case 11:
589  coerceValue(value, myGlobalAreaThreshold);
590  break;
591  case 12:
592  coerceValue(value, myLocallySmallAreasAction);
593  break;
594  case 13:
595  coerceValue(value, myLocalAreaThreshold);
596  break;
597  case 14:
598  coerceValue(value, myNonUniformAction);
599  break;
600  case 15:
601  coerceValue(value, myUniformityThreshold);
602  break;
603  case 16:
604  coerceValue(value, myGloballySmallEdgesAction);
605  break;
606  case 17:
607  coerceValue(value, myGlobalEdgeThreshold);
608  break;
609  case 18:
610  coerceValue(value, myLocallySmallEdgesAction);
611  break;
612  case 19:
613  coerceValue(value, myLocalEdgeThreshold);
614  break;
615  case 20:
616  coerceValue(value, myDisconnectedPointsAction);
617  break;
618  case 21:
619  coerceValue(value, myNonManifoldPointsAction);
620  break;
621  case 22:
622  coerceValue(value, myIgnoreWindings);
623  break;
624  case 23:
625  coerceValue(value, myPreferLargeAngles);
626  break;
627  case 24:
628  coerceValue(value, myVisualizeMaxManifold);
629  break;
630  case 25:
631  coerceValue(value, myExportManifoldNumbers);
632  break;
633  case 26:
634  coerceValue(value, myFixWindings);
635  break;
636  case 27:
637  coerceValue(value, myDeleteSmallManifolds);
638  break;
639  case 28:
640  coerceValue(value, mySmallManifoldSize);
641  break;
642  case 29:
643  coerceValue(value, myAddValidPolyAttrib);
644  break;
645  case 30:
646  coerceValue(value, myValidPolyAttribName);
647  break;
648  case 31:
649  coerceValue(value, myAddRepairedPolyAttrib);
650  break;
651  case 32:
652  coerceValue(value, myRepairedPolyAttribName);
653  break;
654  case 33:
655  coerceValue(value, myAddValidPtsAttrib);
656  break;
657  case 34:
658  coerceValue(value, myValidPtsAttribName);
659  break;
660  case 35:
661  coerceValue(value, myAddModifiedPtsAttrib);
662  break;
663  case 36:
664  coerceValue(value, myModifiedPtsAttribName);
665  break;
666  case 37:
667  coerceValue(value, myCreateGroups);
668  break;
669  case 38:
670  coerceValue(value, myVisualizeInvalidPts);
671  break;
672  case 39:
673  coerceValue(value, myInvalidPtsColor);
674  break;
675  case 40:
676  coerceValue(value, myVisualizeRepairedPts);
677  break;
678  case 41:
679  coerceValue(value, myRepairedPtsColor);
680  break;
681  case 42:
682  coerceValue(value, myVisualizeInvalidPolys);
683  break;
684  case 43:
685  coerceValue(value, myInvalidPolysColor);
686  break;
687  case 44:
688  coerceValue(value, myVisualizeRepairedPolys);
689  break;
690  case 45:
691  coerceValue(value, myRepairedPolysColor);
692  break;
693 
694  }
695  }
696 
697  bool isParmColorRamp(exint idx) const override
698  {
699  switch (idx)
700  {
701 
702  }
703  return false;
704  }
705 
706  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
707  { doGetParmValue(idx, instance, value); }
708  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
709  { doGetParmValue(idx, instance, value); }
710  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
711  { doGetParmValue(idx, instance, value); }
712  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
713  { doGetParmValue(idx, instance, value); }
714  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
715  { doGetParmValue(idx, instance, value); }
716  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
717  { doGetParmValue(idx, instance, value); }
718  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
719  { doGetParmValue(idx, instance, value); }
720  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
721  { doGetParmValue(idx, instance, value); }
722  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
723  { doGetParmValue(idx, instance, value); }
724  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
725  { doGetParmValue(idx, instance, value); }
726  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
727  { doGetParmValue(idx, instance, value); }
728 
729  template <typename T>
730  void
731  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
732  {
733  if (idx.size() < 1)
734  return;
735  UT_ASSERT(idx.size() == instance.size()+1);
736  if (idx.size() != instance.size()+1)
737  return;
738  switch (idx[0])
739  {
740  case 0:
741  coerceValue(myGroup, ( ( value ) ));
742  break;
743  case 1:
744  coerceValue(myMaxPasses, clampMinValue(1, ( value ) ));
745  break;
746  case 2:
747  coerceValue(myRandomSeed, clampMinValue(1, ( value ) ));
748  break;
749  case 3:
750  coerceValue(myIllFormedAction, clampMinValue(0, clampMaxValue(2, value ) ));
751  break;
752  case 4:
753  coerceValue(myManyEdgesAction, clampMinValue(0, clampMaxValue(2, value ) ));
754  break;
755  case 5:
756  coerceValue(myNonConvexAction, clampMinValue(0, clampMaxValue(2, value ) ));
757  break;
758  case 6:
759  coerceValue(myOverlappingAction, clampMinValue(0, clampMaxValue(2, value ) ));
760  break;
761  case 7:
762  coerceValue(myPairOverlaps, ( ( value ) ));
763  break;
764  case 8:
765  coerceValue(mySelfIntersectingAction, clampMinValue(0, clampMaxValue(2, value ) ));
766  break;
767  case 9:
768  coerceValue(myThickness, clampMinValue(0, ( value ) ));
769  break;
770  case 10:
771  coerceValue(myGloballySmallAreasAction, clampMinValue(0, clampMaxValue(2, value ) ));
772  break;
773  case 11:
774  coerceValue(myGlobalAreaThreshold, clampMinValue(0, ( value ) ));
775  break;
776  case 12:
777  coerceValue(myLocallySmallAreasAction, clampMinValue(0, clampMaxValue(2, value ) ));
778  break;
779  case 13:
780  coerceValue(myLocalAreaThreshold, clampMinValue(0, ( value ) ));
781  break;
782  case 14:
783  coerceValue(myNonUniformAction, clampMinValue(0, clampMaxValue(2, value ) ));
784  break;
785  case 15:
786  coerceValue(myUniformityThreshold, clampMinValue(0, ( value ) ));
787  break;
788  case 16:
789  coerceValue(myGloballySmallEdgesAction, clampMinValue(0, clampMaxValue(2, value ) ));
790  break;
791  case 17:
792  coerceValue(myGlobalEdgeThreshold, clampMinValue(0, ( value ) ));
793  break;
794  case 18:
795  coerceValue(myLocallySmallEdgesAction, clampMinValue(0, clampMaxValue(2, value ) ));
796  break;
797  case 19:
798  coerceValue(myLocalEdgeThreshold, clampMinValue(0, ( value ) ));
799  break;
800  case 20:
801  coerceValue(myDisconnectedPointsAction, clampMinValue(0, clampMaxValue(2, value ) ));
802  break;
803  case 21:
804  coerceValue(myNonManifoldPointsAction, clampMinValue(0, clampMaxValue(2, value ) ));
805  break;
806  case 22:
807  coerceValue(myIgnoreWindings, ( ( value ) ));
808  break;
809  case 23:
810  coerceValue(myPreferLargeAngles, ( ( value ) ));
811  break;
812  case 24:
813  coerceValue(myVisualizeMaxManifold, ( ( value ) ));
814  break;
815  case 25:
816  coerceValue(myExportManifoldNumbers, ( ( value ) ));
817  break;
818  case 26:
819  coerceValue(myFixWindings, ( ( value ) ));
820  break;
821  case 27:
822  coerceValue(myDeleteSmallManifolds, ( ( value ) ));
823  break;
824  case 28:
825  coerceValue(mySmallManifoldSize, ( ( value ) ));
826  break;
827  case 29:
828  coerceValue(myAddValidPolyAttrib, ( ( value ) ));
829  break;
830  case 30:
831  coerceValue(myValidPolyAttribName, ( ( value ) ));
832  break;
833  case 31:
834  coerceValue(myAddRepairedPolyAttrib, ( ( value ) ));
835  break;
836  case 32:
837  coerceValue(myRepairedPolyAttribName, ( ( value ) ));
838  break;
839  case 33:
840  coerceValue(myAddValidPtsAttrib, ( ( value ) ));
841  break;
842  case 34:
843  coerceValue(myValidPtsAttribName, ( ( value ) ));
844  break;
845  case 35:
846  coerceValue(myAddModifiedPtsAttrib, ( ( value ) ));
847  break;
848  case 36:
849  coerceValue(myModifiedPtsAttribName, ( ( value ) ));
850  break;
851  case 37:
852  coerceValue(myCreateGroups, ( ( value ) ));
853  break;
854  case 38:
855  coerceValue(myVisualizeInvalidPts, ( ( value ) ));
856  break;
857  case 39:
858  coerceValue(myInvalidPtsColor, ( ( value ) ));
859  break;
860  case 40:
861  coerceValue(myVisualizeRepairedPts, ( ( value ) ));
862  break;
863  case 41:
864  coerceValue(myRepairedPtsColor, ( ( value ) ));
865  break;
866  case 42:
867  coerceValue(myVisualizeInvalidPolys, ( ( value ) ));
868  break;
869  case 43:
870  coerceValue(myInvalidPolysColor, ( ( value ) ));
871  break;
872  case 44:
873  coerceValue(myVisualizeRepairedPolys, ( ( value ) ));
874  break;
875  case 45:
876  coerceValue(myRepairedPolysColor, ( ( value ) ));
877  break;
878 
879  }
880  }
881 
882  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
883  { doSetParmValue(idx, instance, value); }
884  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
885  { doSetParmValue(idx, instance, value); }
886  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
887  { doSetParmValue(idx, instance, value); }
888  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
889  { doSetParmValue(idx, instance, value); }
890  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
891  { doSetParmValue(idx, instance, value); }
892  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
893  { doSetParmValue(idx, instance, value); }
894  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
895  { doSetParmValue(idx, instance, value); }
896  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
897  { doSetParmValue(idx, instance, value); }
898  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
899  { doSetParmValue(idx, instance, value); }
900  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
901  { doSetParmValue(idx, instance, value); }
902  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
903  { doSetParmValue(idx, instance, value); }
904 
905  exint getNestNumParms(TempIndex idx) const override
906  {
907  if (idx.size() == 0)
908  return 46;
909  switch (idx[0])
910  {
911 
912  }
913  // Invalid
914  return 0;
915  }
916 
917  const char *getNestParmName(TempIndex fieldnum) const override
918  {
919  if (fieldnum.size() < 1)
920  return 0;
921  switch (fieldnum[0])
922  {
923  case 0:
924  return "group";
925  case 1:
926  return "maxpasses";
927  case 2:
928  return "randomseed";
929  case 3:
930  return "illformed";
931  case 4:
932  return "manyedges";
933  case 5:
934  return "nonconvex";
935  case 6:
936  return "overlapping";
937  case 7:
938  return "pairoverlaps";
939  case 8:
940  return "intersect";
941  case 9:
942  return "thickness";
943  case 10:
944  return "glosmallarea";
945  case 11:
946  return "gloareathres";
947  case 12:
948  return "locsmallarea";
949  case 13:
950  return "locareathres";
951  case 14:
952  return "nonuni";
953  case 15:
954  return "unithres";
955  case 16:
956  return "glosmalledge";
957  case 17:
958  return "gloedgethres";
959  case 18:
960  return "locsmalledge";
961  case 19:
962  return "locedgethres";
963  case 20:
964  return "disconnectpt";
965  case 21:
966  return "nonmanifoldpt";
967  case 22:
968  return "ignorewindings";
969  case 23:
970  return "preferlargeangles";
971  case 24:
972  return "vismaxmanifold";
973  case 25:
974  return "exportmanifoldnumbers";
975  case 26:
976  return "fixwindings";
977  case 27:
978  return "deletesmallmanifolds";
979  case 28:
980  return "smallmanifoldsize";
981  case 29:
982  return "usevalidpoly";
983  case 30:
984  return "validpoly";
985  case 31:
986  return "userepairedpoly";
987  case 32:
988  return "repairedpoly";
989  case 33:
990  return "usevalidpts";
991  case 34:
992  return "validpts";
993  case 35:
994  return "usemodifiedpts";
995  case 36:
996  return "modifiedpts";
997  case 37:
998  return "creategrps";
999  case 38:
1000  return "visinvalidpts";
1001  case 39:
1002  return "visinvalidptsfg";
1003  case 40:
1004  return "visrepairedpts";
1005  case 41:
1006  return "visrepairedptsfg";
1007  case 42:
1008  return "visinvalidpolys";
1009  case 43:
1010  return "visinvalidpolysfg";
1011  case 44:
1012  return "visrepairedpolys";
1013  case 45:
1014  return "visrepairedpolysfg";
1015 
1016  }
1017  return 0;
1018  }
1019 
1020  ParmType getNestParmType(TempIndex fieldnum) const override
1021  {
1022  if (fieldnum.size() < 1)
1023  return PARM_UNSUPPORTED;
1024  switch (fieldnum[0])
1025  {
1026  case 0:
1027  return PARM_STRING;
1028  case 1:
1029  return PARM_INTEGER;
1030  case 2:
1031  return PARM_INTEGER;
1032  case 3:
1033  return PARM_INTEGER;
1034  case 4:
1035  return PARM_INTEGER;
1036  case 5:
1037  return PARM_INTEGER;
1038  case 6:
1039  return PARM_INTEGER;
1040  case 7:
1041  return PARM_INTEGER;
1042  case 8:
1043  return PARM_INTEGER;
1044  case 9:
1045  return PARM_FLOAT;
1046  case 10:
1047  return PARM_INTEGER;
1048  case 11:
1049  return PARM_FLOAT;
1050  case 12:
1051  return PARM_INTEGER;
1052  case 13:
1053  return PARM_FLOAT;
1054  case 14:
1055  return PARM_INTEGER;
1056  case 15:
1057  return PARM_FLOAT;
1058  case 16:
1059  return PARM_INTEGER;
1060  case 17:
1061  return PARM_FLOAT;
1062  case 18:
1063  return PARM_INTEGER;
1064  case 19:
1065  return PARM_FLOAT;
1066  case 20:
1067  return PARM_INTEGER;
1068  case 21:
1069  return PARM_INTEGER;
1070  case 22:
1071  return PARM_INTEGER;
1072  case 23:
1073  return PARM_INTEGER;
1074  case 24:
1075  return PARM_INTEGER;
1076  case 25:
1077  return PARM_INTEGER;
1078  case 26:
1079  return PARM_INTEGER;
1080  case 27:
1081  return PARM_INTEGER;
1082  case 28:
1083  return PARM_INTEGER;
1084  case 29:
1085  return PARM_INTEGER;
1086  case 30:
1087  return PARM_STRING;
1088  case 31:
1089  return PARM_INTEGER;
1090  case 32:
1091  return PARM_STRING;
1092  case 33:
1093  return PARM_INTEGER;
1094  case 34:
1095  return PARM_STRING;
1096  case 35:
1097  return PARM_INTEGER;
1098  case 36:
1099  return PARM_STRING;
1100  case 37:
1101  return PARM_INTEGER;
1102  case 38:
1103  return PARM_INTEGER;
1104  case 39:
1105  return PARM_VECTOR3;
1106  case 40:
1107  return PARM_INTEGER;
1108  case 41:
1109  return PARM_VECTOR3;
1110  case 42:
1111  return PARM_INTEGER;
1112  case 43:
1113  return PARM_VECTOR3;
1114  case 44:
1115  return PARM_INTEGER;
1116  case 45:
1117  return PARM_VECTOR3;
1118 
1119  }
1120  return PARM_UNSUPPORTED;
1121  }
1122 
1123  // Boiler plate to load individual types.
1124  static void loadData(UT_IStream &is, int64 &v)
1125  { is.bread(&v, 1); }
1126  static void loadData(UT_IStream &is, bool &v)
1127  { int64 iv; is.bread(&iv, 1); v = iv; }
1128  static void loadData(UT_IStream &is, fpreal64 &v)
1129  { is.bread<fpreal64>(&v, 1); }
1130  static void loadData(UT_IStream &is, UT_Vector2D &v)
1131  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1132  static void loadData(UT_IStream &is, UT_Vector3D &v)
1133  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1134  is.bread<fpreal64>(&v.z(), 1); }
1135  static void loadData(UT_IStream &is, UT_Vector4D &v)
1136  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1137  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1138  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1139  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1140  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1141  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1142  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1143  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1144  static void loadData(UT_IStream &is, UT_Vector2I &v)
1145  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1146  static void loadData(UT_IStream &is, UT_Vector3I &v)
1147  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1148  is.bread<int64>(&v.z(), 1); }
1149  static void loadData(UT_IStream &is, UT_Vector4I &v)
1150  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1151  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1153  { is.bread(v); }
1155  { UT_StringHolder rampdata;
1156  loadData(is, rampdata);
1157  if (rampdata.isstring())
1158  {
1159  v.reset(new UT_Ramp());
1160  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1161  v->load(istr);
1162  }
1163  else v.reset();
1164  }
1167  loadData(is, data);
1168  if (data.isstring())
1169  {
1170  // Find the data type.
1171  const char *colon = UT_StringWrap(data).findChar(':');
1172  if (colon)
1173  {
1174  int typelen = colon - data.buffer();
1176  type.strncpy(data.buffer(), typelen);
1177  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1178 
1179  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1180  }
1181  }
1182  else v.reset();
1183  }
1184 
1185  static void saveData(std::ostream &os, int64 v)
1186  { UTwrite(os, &v); }
1187  static void saveData(std::ostream &os, bool v)
1188  { int64 iv = v; UTwrite(os, &iv); }
1189  static void saveData(std::ostream &os, fpreal64 v)
1190  { UTwrite<fpreal64>(os, &v); }
1191  static void saveData(std::ostream &os, UT_Vector2D v)
1192  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1193  static void saveData(std::ostream &os, UT_Vector3D v)
1194  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1195  UTwrite<fpreal64>(os, &v.z()); }
1196  static void saveData(std::ostream &os, UT_Vector4D v)
1197  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1198  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1199  static void saveData(std::ostream &os, UT_Matrix2D v)
1201  static void saveData(std::ostream &os, UT_Matrix3D v)
1203  static void saveData(std::ostream &os, UT_Matrix4D v)
1205  static void saveData(std::ostream &os, UT_StringHolder s)
1206  { UT_StringWrap(s).saveBinary(os); }
1207  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1209  UT_OStringStream ostr;
1210  if (s) s->save(ostr);
1211  result = ostr.str();
1212  saveData(os, result);
1213  }
1214  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1216  UT_OStringStream ostr;
1217  if (s)
1218  {
1219  ostr << s->getDataTypeToken();
1220  ostr << ":";
1221  s->saveBinary(ostr);
1222  }
1223  result = ostr.str();
1224  saveData(os, result);
1225  }
1226 
1227 
1228  void save(std::ostream &os) const
1229  {
1230  int32 v = version();
1231  UTwrite(os, &v);
1232  saveData(os, myGroup);
1233  saveData(os, myMaxPasses);
1234  saveData(os, myRandomSeed);
1235  saveData(os, myIllFormedAction);
1236  saveData(os, myManyEdgesAction);
1237  saveData(os, myNonConvexAction);
1238  saveData(os, myOverlappingAction);
1239  saveData(os, myPairOverlaps);
1240  saveData(os, mySelfIntersectingAction);
1241  saveData(os, myThickness);
1242  saveData(os, myGloballySmallAreasAction);
1243  saveData(os, myGlobalAreaThreshold);
1244  saveData(os, myLocallySmallAreasAction);
1245  saveData(os, myLocalAreaThreshold);
1246  saveData(os, myNonUniformAction);
1247  saveData(os, myUniformityThreshold);
1248  saveData(os, myGloballySmallEdgesAction);
1249  saveData(os, myGlobalEdgeThreshold);
1250  saveData(os, myLocallySmallEdgesAction);
1251  saveData(os, myLocalEdgeThreshold);
1252  saveData(os, myDisconnectedPointsAction);
1253  saveData(os, myNonManifoldPointsAction);
1254  saveData(os, myIgnoreWindings);
1255  saveData(os, myPreferLargeAngles);
1256  saveData(os, myVisualizeMaxManifold);
1257  saveData(os, myExportManifoldNumbers);
1258  saveData(os, myFixWindings);
1259  saveData(os, myDeleteSmallManifolds);
1260  saveData(os, mySmallManifoldSize);
1261  saveData(os, myAddValidPolyAttrib);
1262  saveData(os, myValidPolyAttribName);
1263  saveData(os, myAddRepairedPolyAttrib);
1264  saveData(os, myRepairedPolyAttribName);
1265  saveData(os, myAddValidPtsAttrib);
1266  saveData(os, myValidPtsAttribName);
1267  saveData(os, myAddModifiedPtsAttrib);
1268  saveData(os, myModifiedPtsAttribName);
1269  saveData(os, myCreateGroups);
1270  saveData(os, myVisualizeInvalidPts);
1271  saveData(os, myInvalidPtsColor);
1272  saveData(os, myVisualizeRepairedPts);
1273  saveData(os, myRepairedPtsColor);
1274  saveData(os, myVisualizeInvalidPolys);
1275  saveData(os, myInvalidPolysColor);
1276  saveData(os, myVisualizeRepairedPolys);
1277  saveData(os, myRepairedPolysColor);
1278 
1279  }
1280 
1281  bool load(UT_IStream &is)
1282  {
1283  int32 v;
1284  is.bread(&v, 1);
1285  if (version() != v)
1286  {
1287  // Fail incompatible versions
1288  return false;
1289  }
1290  loadData(is, myGroup);
1291  loadData(is, myMaxPasses);
1292  loadData(is, myRandomSeed);
1293  loadData(is, myIllFormedAction);
1294  loadData(is, myManyEdgesAction);
1295  loadData(is, myNonConvexAction);
1296  loadData(is, myOverlappingAction);
1297  loadData(is, myPairOverlaps);
1298  loadData(is, mySelfIntersectingAction);
1299  loadData(is, myThickness);
1300  loadData(is, myGloballySmallAreasAction);
1301  loadData(is, myGlobalAreaThreshold);
1302  loadData(is, myLocallySmallAreasAction);
1303  loadData(is, myLocalAreaThreshold);
1304  loadData(is, myNonUniformAction);
1305  loadData(is, myUniformityThreshold);
1306  loadData(is, myGloballySmallEdgesAction);
1307  loadData(is, myGlobalEdgeThreshold);
1308  loadData(is, myLocallySmallEdgesAction);
1309  loadData(is, myLocalEdgeThreshold);
1310  loadData(is, myDisconnectedPointsAction);
1311  loadData(is, myNonManifoldPointsAction);
1312  loadData(is, myIgnoreWindings);
1313  loadData(is, myPreferLargeAngles);
1314  loadData(is, myVisualizeMaxManifold);
1315  loadData(is, myExportManifoldNumbers);
1316  loadData(is, myFixWindings);
1317  loadData(is, myDeleteSmallManifolds);
1318  loadData(is, mySmallManifoldSize);
1319  loadData(is, myAddValidPolyAttrib);
1320  loadData(is, myValidPolyAttribName);
1321  loadData(is, myAddRepairedPolyAttrib);
1322  loadData(is, myRepairedPolyAttribName);
1323  loadData(is, myAddValidPtsAttrib);
1324  loadData(is, myValidPtsAttribName);
1325  loadData(is, myAddModifiedPtsAttrib);
1326  loadData(is, myModifiedPtsAttribName);
1327  loadData(is, myCreateGroups);
1328  loadData(is, myVisualizeInvalidPts);
1329  loadData(is, myInvalidPtsColor);
1330  loadData(is, myVisualizeRepairedPts);
1331  loadData(is, myRepairedPtsColor);
1332  loadData(is, myVisualizeInvalidPolys);
1333  loadData(is, myInvalidPolysColor);
1334  loadData(is, myVisualizeRepairedPolys);
1335  loadData(is, myRepairedPolysColor);
1336 
1337  return true;
1338  }
1339 
1340  const UT_StringHolder & getGroup() const { return myGroup; }
1341  void setGroup(const UT_StringHolder & val) { myGroup = val; }
1343  {
1344  SOP_Node *thissop = cookparms.getNode();
1345  if (!thissop) return getGroup();
1347  OP_Utils::evalOpParm(result, thissop, "group", cookparms.getCookTime(), 0);
1348  return result;
1349  }
1350  int64 getMaxPasses() const { return myMaxPasses; }
1351  void setMaxPasses(int64 val) { myMaxPasses = val; }
1353  {
1354  SOP_Node *thissop = cookparms.getNode();
1355  if (!thissop) return getMaxPasses();
1356  int64 result;
1357  OP_Utils::evalOpParm(result, thissop, "maxpasses", cookparms.getCookTime(), 0);
1358  return result;
1359  }
1360  int64 getRandomSeed() const { return myRandomSeed; }
1361  void setRandomSeed(int64 val) { myRandomSeed = val; }
1363  {
1364  SOP_Node *thissop = cookparms.getNode();
1365  if (!thissop) return getRandomSeed();
1366  int64 result;
1367  OP_Utils::evalOpParm(result, thissop, "randomseed", cookparms.getCookTime(), 0);
1368  return result;
1369  }
1370  IllFormedAction getIllFormedAction() const { return IllFormedAction(myIllFormedAction); }
1371  void setIllFormedAction(IllFormedAction val) { myIllFormedAction = int64(val); }
1373  {
1374  SOP_Node *thissop = cookparms.getNode();
1375  if (!thissop) return getIllFormedAction();
1376  int64 result;
1377  OP_Utils::evalOpParm(result, thissop, "illformed", cookparms.getCookTime(), 0);
1378  return IllFormedAction(result);
1379  }
1380  ManyEdgesAction getManyEdgesAction() const { return ManyEdgesAction(myManyEdgesAction); }
1381  void setManyEdgesAction(ManyEdgesAction val) { myManyEdgesAction = int64(val); }
1383  {
1384  SOP_Node *thissop = cookparms.getNode();
1385  if (!thissop) return getManyEdgesAction();
1386  int64 result;
1387  OP_Utils::evalOpParm(result, thissop, "manyedges", cookparms.getCookTime(), 0);
1388  return ManyEdgesAction(result);
1389  }
1390  NonConvexAction getNonConvexAction() const { return NonConvexAction(myNonConvexAction); }
1391  void setNonConvexAction(NonConvexAction val) { myNonConvexAction = int64(val); }
1393  {
1394  SOP_Node *thissop = cookparms.getNode();
1395  if (!thissop) return getNonConvexAction();
1396  int64 result;
1397  OP_Utils::evalOpParm(result, thissop, "nonconvex", cookparms.getCookTime(), 0);
1398  return NonConvexAction(result);
1399  }
1400  OverlappingAction getOverlappingAction() const { return OverlappingAction(myOverlappingAction); }
1401  void setOverlappingAction(OverlappingAction val) { myOverlappingAction = int64(val); }
1403  {
1404  SOP_Node *thissop = cookparms.getNode();
1405  if (!thissop) return getOverlappingAction();
1406  int64 result;
1407  OP_Utils::evalOpParm(result, thissop, "overlapping", cookparms.getCookTime(), 0);
1408  return OverlappingAction(result);
1409  }
1410  bool getPairOverlaps() const { return myPairOverlaps; }
1411  void setPairOverlaps(bool val) { myPairOverlaps = val; }
1412  bool opPairOverlaps(const SOP_NodeVerb::CookParms &cookparms) const
1413  {
1414  SOP_Node *thissop = cookparms.getNode();
1415  if (!thissop) return getPairOverlaps();
1416  bool result;
1417  OP_Utils::evalOpParm(result, thissop, "pairoverlaps", cookparms.getCookTime(), 0);
1418  return result;
1419  }
1420  SelfIntersectingAction getSelfIntersectingAction() const { return SelfIntersectingAction(mySelfIntersectingAction); }
1421  void setSelfIntersectingAction(SelfIntersectingAction val) { mySelfIntersectingAction = int64(val); }
1423  {
1424  SOP_Node *thissop = cookparms.getNode();
1425  if (!thissop) return getSelfIntersectingAction();
1426  int64 result;
1427  OP_Utils::evalOpParm(result, thissop, "intersect", cookparms.getCookTime(), 0);
1428  return SelfIntersectingAction(result);
1429  }
1430  fpreal64 getThickness() const { return myThickness; }
1431  void setThickness(fpreal64 val) { myThickness = val; }
1433  {
1434  SOP_Node *thissop = cookparms.getNode();
1435  if (!thissop) return getThickness();
1436  fpreal64 result;
1437  OP_Utils::evalOpParm(result, thissop, "thickness", cookparms.getCookTime(), 0);
1438  return result;
1439  }
1441  void setGloballySmallAreasAction(GloballySmallAreasAction val) { myGloballySmallAreasAction = int64(val); }
1443  {
1444  SOP_Node *thissop = cookparms.getNode();
1445  if (!thissop) return getGloballySmallAreasAction();
1446  int64 result;
1447  OP_Utils::evalOpParm(result, thissop, "glosmallarea", cookparms.getCookTime(), 0);
1448  return GloballySmallAreasAction(result);
1449  }
1450  fpreal64 getGlobalAreaThreshold() const { return myGlobalAreaThreshold; }
1451  void setGlobalAreaThreshold(fpreal64 val) { myGlobalAreaThreshold = val; }
1453  {
1454  SOP_Node *thissop = cookparms.getNode();
1455  if (!thissop) return getGlobalAreaThreshold();
1456  fpreal64 result;
1457  OP_Utils::evalOpParm(result, thissop, "gloareathres", cookparms.getCookTime(), 0);
1458  return result;
1459  }
1460  LocallySmallAreasAction getLocallySmallAreasAction() const { return LocallySmallAreasAction(myLocallySmallAreasAction); }
1461  void setLocallySmallAreasAction(LocallySmallAreasAction val) { myLocallySmallAreasAction = int64(val); }
1463  {
1464  SOP_Node *thissop = cookparms.getNode();
1465  if (!thissop) return getLocallySmallAreasAction();
1466  int64 result;
1467  OP_Utils::evalOpParm(result, thissop, "locsmallarea", cookparms.getCookTime(), 0);
1468  return LocallySmallAreasAction(result);
1469  }
1470  fpreal64 getLocalAreaThreshold() const { return myLocalAreaThreshold; }
1471  void setLocalAreaThreshold(fpreal64 val) { myLocalAreaThreshold = val; }
1473  {
1474  SOP_Node *thissop = cookparms.getNode();
1475  if (!thissop) return getLocalAreaThreshold();
1476  fpreal64 result;
1477  OP_Utils::evalOpParm(result, thissop, "locareathres", cookparms.getCookTime(), 0);
1478  return result;
1479  }
1480  NonUniformAction getNonUniformAction() const { return NonUniformAction(myNonUniformAction); }
1481  void setNonUniformAction(NonUniformAction val) { myNonUniformAction = int64(val); }
1483  {
1484  SOP_Node *thissop = cookparms.getNode();
1485  if (!thissop) return getNonUniformAction();
1486  int64 result;
1487  OP_Utils::evalOpParm(result, thissop, "nonuni", cookparms.getCookTime(), 0);
1488  return NonUniformAction(result);
1489  }
1490  fpreal64 getUniformityThreshold() const { return myUniformityThreshold; }
1491  void setUniformityThreshold(fpreal64 val) { myUniformityThreshold = val; }
1493  {
1494  SOP_Node *thissop = cookparms.getNode();
1495  if (!thissop) return getUniformityThreshold();
1496  fpreal64 result;
1497  OP_Utils::evalOpParm(result, thissop, "unithres", cookparms.getCookTime(), 0);
1498  return result;
1499  }
1501  void setGloballySmallEdgesAction(GloballySmallEdgesAction val) { myGloballySmallEdgesAction = int64(val); }
1503  {
1504  SOP_Node *thissop = cookparms.getNode();
1505  if (!thissop) return getGloballySmallEdgesAction();
1506  int64 result;
1507  OP_Utils::evalOpParm(result, thissop, "glosmalledge", cookparms.getCookTime(), 0);
1508  return GloballySmallEdgesAction(result);
1509  }
1510  fpreal64 getGlobalEdgeThreshold() const { return myGlobalEdgeThreshold; }
1511  void setGlobalEdgeThreshold(fpreal64 val) { myGlobalEdgeThreshold = val; }
1513  {
1514  SOP_Node *thissop = cookparms.getNode();
1515  if (!thissop) return getGlobalEdgeThreshold();
1516  fpreal64 result;
1517  OP_Utils::evalOpParm(result, thissop, "gloedgethres", cookparms.getCookTime(), 0);
1518  return result;
1519  }
1520  LocallySmallEdgesAction getLocallySmallEdgesAction() const { return LocallySmallEdgesAction(myLocallySmallEdgesAction); }
1521  void setLocallySmallEdgesAction(LocallySmallEdgesAction val) { myLocallySmallEdgesAction = int64(val); }
1523  {
1524  SOP_Node *thissop = cookparms.getNode();
1525  if (!thissop) return getLocallySmallEdgesAction();
1526  int64 result;
1527  OP_Utils::evalOpParm(result, thissop, "locsmalledge", cookparms.getCookTime(), 0);
1528  return LocallySmallEdgesAction(result);
1529  }
1530  fpreal64 getLocalEdgeThreshold() const { return myLocalEdgeThreshold; }
1531  void setLocalEdgeThreshold(fpreal64 val) { myLocalEdgeThreshold = val; }
1533  {
1534  SOP_Node *thissop = cookparms.getNode();
1535  if (!thissop) return getLocalEdgeThreshold();
1536  fpreal64 result;
1537  OP_Utils::evalOpParm(result, thissop, "locedgethres", cookparms.getCookTime(), 0);
1538  return result;
1539  }
1541  void setDisconnectedPointsAction(DisconnectedPointsAction val) { myDisconnectedPointsAction = int64(val); }
1543  {
1544  SOP_Node *thissop = cookparms.getNode();
1545  if (!thissop) return getDisconnectedPointsAction();
1546  int64 result;
1547  OP_Utils::evalOpParm(result, thissop, "disconnectpt", cookparms.getCookTime(), 0);
1548  return DisconnectedPointsAction(result);
1549  }
1550  NonManifoldPointsAction getNonManifoldPointsAction() const { return NonManifoldPointsAction(myNonManifoldPointsAction); }
1551  void setNonManifoldPointsAction(NonManifoldPointsAction val) { myNonManifoldPointsAction = int64(val); }
1553  {
1554  SOP_Node *thissop = cookparms.getNode();
1555  if (!thissop) return getNonManifoldPointsAction();
1556  int64 result;
1557  OP_Utils::evalOpParm(result, thissop, "nonmanifoldpt", cookparms.getCookTime(), 0);
1558  return NonManifoldPointsAction(result);
1559  }
1560  bool getIgnoreWindings() const { return myIgnoreWindings; }
1561  void setIgnoreWindings(bool val) { myIgnoreWindings = val; }
1562  bool opIgnoreWindings(const SOP_NodeVerb::CookParms &cookparms) const
1563  {
1564  SOP_Node *thissop = cookparms.getNode();
1565  if (!thissop) return getIgnoreWindings();
1566  bool result;
1567  OP_Utils::evalOpParm(result, thissop, "ignorewindings", cookparms.getCookTime(), 0);
1568  return result;
1569  }
1570  bool getPreferLargeAngles() const { return myPreferLargeAngles; }
1571  void setPreferLargeAngles(bool val) { myPreferLargeAngles = val; }
1572  bool opPreferLargeAngles(const SOP_NodeVerb::CookParms &cookparms) const
1573  {
1574  SOP_Node *thissop = cookparms.getNode();
1575  if (!thissop) return getPreferLargeAngles();
1576  bool result;
1577  OP_Utils::evalOpParm(result, thissop, "preferlargeangles", cookparms.getCookTime(), 0);
1578  return result;
1579  }
1580  bool getVisualizeMaxManifold() const { return myVisualizeMaxManifold; }
1581  void setVisualizeMaxManifold(bool val) { myVisualizeMaxManifold = val; }
1583  {
1584  SOP_Node *thissop = cookparms.getNode();
1585  if (!thissop) return getVisualizeMaxManifold();
1586  bool result;
1587  OP_Utils::evalOpParm(result, thissop, "vismaxmanifold", cookparms.getCookTime(), 0);
1588  return result;
1589  }
1590  bool getExportManifoldNumbers() const { return myExportManifoldNumbers; }
1591  void setExportManifoldNumbers(bool val) { myExportManifoldNumbers = val; }
1593  {
1594  SOP_Node *thissop = cookparms.getNode();
1595  if (!thissop) return getExportManifoldNumbers();
1596  bool result;
1597  OP_Utils::evalOpParm(result, thissop, "exportmanifoldnumbers", cookparms.getCookTime(), 0);
1598  return result;
1599  }
1600  bool getFixWindings() const { return myFixWindings; }
1601  void setFixWindings(bool val) { myFixWindings = val; }
1602  bool opFixWindings(const SOP_NodeVerb::CookParms &cookparms) const
1603  {
1604  SOP_Node *thissop = cookparms.getNode();
1605  if (!thissop) return getFixWindings();
1606  bool result;
1607  OP_Utils::evalOpParm(result, thissop, "fixwindings", cookparms.getCookTime(), 0);
1608  return result;
1609  }
1610  bool getDeleteSmallManifolds() const { return myDeleteSmallManifolds; }
1611  void setDeleteSmallManifolds(bool val) { myDeleteSmallManifolds = val; }
1613  {
1614  SOP_Node *thissop = cookparms.getNode();
1615  if (!thissop) return getDeleteSmallManifolds();
1616  bool result;
1617  OP_Utils::evalOpParm(result, thissop, "deletesmallmanifolds", cookparms.getCookTime(), 0);
1618  return result;
1619  }
1620  int64 getSmallManifoldSize() const { return mySmallManifoldSize; }
1621  void setSmallManifoldSize(int64 val) { mySmallManifoldSize = val; }
1623  {
1624  SOP_Node *thissop = cookparms.getNode();
1625  if (!thissop) return getSmallManifoldSize();
1626  int64 result;
1627  OP_Utils::evalOpParm(result, thissop, "smallmanifoldsize", cookparms.getCookTime(), 0);
1628  return result;
1629  }
1630  bool getAddValidPolyAttrib() const { return myAddValidPolyAttrib; }
1631  void setAddValidPolyAttrib(bool val) { myAddValidPolyAttrib = val; }
1632  bool opAddValidPolyAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1633  {
1634  SOP_Node *thissop = cookparms.getNode();
1635  if (!thissop) return getAddValidPolyAttrib();
1636  bool result;
1637  OP_Utils::evalOpParm(result, thissop, "usevalidpoly", cookparms.getCookTime(), 0);
1638  return result;
1639  }
1640  const UT_StringHolder & getValidPolyAttribName() const { return myValidPolyAttribName; }
1641  void setValidPolyAttribName(const UT_StringHolder & val) { myValidPolyAttribName = val; }
1643  {
1644  SOP_Node *thissop = cookparms.getNode();
1645  if (!thissop) return getValidPolyAttribName();
1647  OP_Utils::evalOpParm(result, thissop, "validpoly", cookparms.getCookTime(), 0);
1648  return result;
1649  }
1650  bool getAddRepairedPolyAttrib() const { return myAddRepairedPolyAttrib; }
1651  void setAddRepairedPolyAttrib(bool val) { myAddRepairedPolyAttrib = val; }
1653  {
1654  SOP_Node *thissop = cookparms.getNode();
1655  if (!thissop) return getAddRepairedPolyAttrib();
1656  bool result;
1657  OP_Utils::evalOpParm(result, thissop, "userepairedpoly", cookparms.getCookTime(), 0);
1658  return result;
1659  }
1660  const UT_StringHolder & getRepairedPolyAttribName() const { return myRepairedPolyAttribName; }
1661  void setRepairedPolyAttribName(const UT_StringHolder & val) { myRepairedPolyAttribName = val; }
1663  {
1664  SOP_Node *thissop = cookparms.getNode();
1665  if (!thissop) return getRepairedPolyAttribName();
1667  OP_Utils::evalOpParm(result, thissop, "repairedpoly", cookparms.getCookTime(), 0);
1668  return result;
1669  }
1670  bool getAddValidPtsAttrib() const { return myAddValidPtsAttrib; }
1671  void setAddValidPtsAttrib(bool val) { myAddValidPtsAttrib = val; }
1672  bool opAddValidPtsAttrib(const SOP_NodeVerb::CookParms &cookparms) const
1673  {
1674  SOP_Node *thissop = cookparms.getNode();
1675  if (!thissop) return getAddValidPtsAttrib();
1676  bool result;
1677  OP_Utils::evalOpParm(result, thissop, "usevalidpts", cookparms.getCookTime(), 0);
1678  return result;
1679  }
1680  const UT_StringHolder & getValidPtsAttribName() const { return myValidPtsAttribName; }
1681  void setValidPtsAttribName(const UT_StringHolder & val) { myValidPtsAttribName = val; }
1683  {
1684  SOP_Node *thissop = cookparms.getNode();
1685  if (!thissop) return getValidPtsAttribName();
1687  OP_Utils::evalOpParm(result, thissop, "validpts", cookparms.getCookTime(), 0);
1688  return result;
1689  }
1690  bool getAddModifiedPtsAttrib() const { return myAddModifiedPtsAttrib; }
1691  void setAddModifiedPtsAttrib(bool val) { myAddModifiedPtsAttrib = val; }
1693  {
1694  SOP_Node *thissop = cookparms.getNode();
1695  if (!thissop) return getAddModifiedPtsAttrib();
1696  bool result;
1697  OP_Utils::evalOpParm(result, thissop, "usemodifiedpts", cookparms.getCookTime(), 0);
1698  return result;
1699  }
1700  const UT_StringHolder & getModifiedPtsAttribName() const { return myModifiedPtsAttribName; }
1701  void setModifiedPtsAttribName(const UT_StringHolder & val) { myModifiedPtsAttribName = val; }
1703  {
1704  SOP_Node *thissop = cookparms.getNode();
1705  if (!thissop) return getModifiedPtsAttribName();
1707  OP_Utils::evalOpParm(result, thissop, "modifiedpts", cookparms.getCookTime(), 0);
1708  return result;
1709  }
1710  bool getCreateGroups() const { return myCreateGroups; }
1711  void setCreateGroups(bool val) { myCreateGroups = val; }
1712  bool opCreateGroups(const SOP_NodeVerb::CookParms &cookparms) const
1713  {
1714  SOP_Node *thissop = cookparms.getNode();
1715  if (!thissop) return getCreateGroups();
1716  bool result;
1717  OP_Utils::evalOpParm(result, thissop, "creategrps", cookparms.getCookTime(), 0);
1718  return result;
1719  }
1720  bool getVisualizeInvalidPts() const { return myVisualizeInvalidPts; }
1721  void setVisualizeInvalidPts(bool val) { myVisualizeInvalidPts = val; }
1722  bool opVisualizeInvalidPts(const SOP_NodeVerb::CookParms &cookparms) const
1723  {
1724  SOP_Node *thissop = cookparms.getNode();
1725  if (!thissop) return getVisualizeInvalidPts();
1726  bool result;
1727  OP_Utils::evalOpParm(result, thissop, "visinvalidpts", cookparms.getCookTime(), 0);
1728  return result;
1729  }
1730  UT_Vector3D getInvalidPtsColor() const { return myInvalidPtsColor; }
1731  void setInvalidPtsColor(UT_Vector3D val) { myInvalidPtsColor = val; }
1733  {
1734  SOP_Node *thissop = cookparms.getNode();
1735  if (!thissop) return getInvalidPtsColor();
1737  OP_Utils::evalOpParm(result, thissop, "visinvalidptsfg", cookparms.getCookTime(), 0);
1738  return result;
1739  }
1740  bool getVisualizeRepairedPts() const { return myVisualizeRepairedPts; }
1741  void setVisualizeRepairedPts(bool val) { myVisualizeRepairedPts = val; }
1743  {
1744  SOP_Node *thissop = cookparms.getNode();
1745  if (!thissop) return getVisualizeRepairedPts();
1746  bool result;
1747  OP_Utils::evalOpParm(result, thissop, "visrepairedpts", cookparms.getCookTime(), 0);
1748  return result;
1749  }
1750  UT_Vector3D getRepairedPtsColor() const { return myRepairedPtsColor; }
1751  void setRepairedPtsColor(UT_Vector3D val) { myRepairedPtsColor = val; }
1753  {
1754  SOP_Node *thissop = cookparms.getNode();
1755  if (!thissop) return getRepairedPtsColor();
1757  OP_Utils::evalOpParm(result, thissop, "visrepairedptsfg", cookparms.getCookTime(), 0);
1758  return result;
1759  }
1760  bool getVisualizeInvalidPolys() const { return myVisualizeInvalidPolys; }
1761  void setVisualizeInvalidPolys(bool val) { myVisualizeInvalidPolys = val; }
1763  {
1764  SOP_Node *thissop = cookparms.getNode();
1765  if (!thissop) return getVisualizeInvalidPolys();
1766  bool result;
1767  OP_Utils::evalOpParm(result, thissop, "visinvalidpolys", cookparms.getCookTime(), 0);
1768  return result;
1769  }
1770  UT_Vector3D getInvalidPolysColor() const { return myInvalidPolysColor; }
1771  void setInvalidPolysColor(UT_Vector3D val) { myInvalidPolysColor = val; }
1773  {
1774  SOP_Node *thissop = cookparms.getNode();
1775  if (!thissop) return getInvalidPolysColor();
1777  OP_Utils::evalOpParm(result, thissop, "visinvalidpolysfg", cookparms.getCookTime(), 0);
1778  return result;
1779  }
1780  bool getVisualizeRepairedPolys() const { return myVisualizeRepairedPolys; }
1781  void setVisualizeRepairedPolys(bool val) { myVisualizeRepairedPolys = val; }
1783  {
1784  SOP_Node *thissop = cookparms.getNode();
1785  if (!thissop) return getVisualizeRepairedPolys();
1786  bool result;
1787  OP_Utils::evalOpParm(result, thissop, "visrepairedpolys", cookparms.getCookTime(), 0);
1788  return result;
1789  }
1790  UT_Vector3D getRepairedPolysColor() const { return myRepairedPolysColor; }
1791  void setRepairedPolysColor(UT_Vector3D val) { myRepairedPolysColor = val; }
1793  {
1794  SOP_Node *thissop = cookparms.getNode();
1795  if (!thissop) return getRepairedPolysColor();
1797  OP_Utils::evalOpParm(result, thissop, "visrepairedpolysfg", cookparms.getCookTime(), 0);
1798  return result;
1799  }
1800 
1801 private:
1802  UT_StringHolder myGroup;
1803  int64 myMaxPasses;
1804  int64 myRandomSeed;
1805  int64 myIllFormedAction;
1806  int64 myManyEdgesAction;
1807  int64 myNonConvexAction;
1808  int64 myOverlappingAction;
1809  bool myPairOverlaps;
1810  int64 mySelfIntersectingAction;
1811  fpreal64 myThickness;
1812  int64 myGloballySmallAreasAction;
1813  fpreal64 myGlobalAreaThreshold;
1814  int64 myLocallySmallAreasAction;
1815  fpreal64 myLocalAreaThreshold;
1816  int64 myNonUniformAction;
1817  fpreal64 myUniformityThreshold;
1818  int64 myGloballySmallEdgesAction;
1819  fpreal64 myGlobalEdgeThreshold;
1820  int64 myLocallySmallEdgesAction;
1821  fpreal64 myLocalEdgeThreshold;
1822  int64 myDisconnectedPointsAction;
1823  int64 myNonManifoldPointsAction;
1824  bool myIgnoreWindings;
1825  bool myPreferLargeAngles;
1826  bool myVisualizeMaxManifold;
1827  bool myExportManifoldNumbers;
1828  bool myFixWindings;
1829  bool myDeleteSmallManifolds;
1830  int64 mySmallManifoldSize;
1831  bool myAddValidPolyAttrib;
1832  UT_StringHolder myValidPolyAttribName;
1833  bool myAddRepairedPolyAttrib;
1834  UT_StringHolder myRepairedPolyAttribName;
1835  bool myAddValidPtsAttrib;
1836  UT_StringHolder myValidPtsAttribName;
1837  bool myAddModifiedPtsAttrib;
1838  UT_StringHolder myModifiedPtsAttribName;
1839  bool myCreateGroups;
1840  bool myVisualizeInvalidPts;
1841  UT_Vector3D myInvalidPtsColor;
1842  bool myVisualizeRepairedPts;
1843  UT_Vector3D myRepairedPtsColor;
1844  bool myVisualizeInvalidPolys;
1845  UT_Vector3D myInvalidPolysColor;
1846  bool myVisualizeRepairedPolys;
1847  UT_Vector3D myRepairedPolysColor;
1848 
1849 };
bool getVisualizeInvalidPts() const
UT_StringHolder opModifiedPtsAttribName(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 getLocalEdgeThreshold() const
const UT_StringHolder & getValidPolyAttribName() const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setRepairedPtsColor(UT_Vector3D val)
const UT_StringHolder & getModifiedPtsAttribName() const
GloballySmallEdgesAction opGloballySmallEdgesAction(const SOP_NodeVerb::CookParms &cookparms) const
ManyEdgesAction opManyEdgesAction(const SOP_NodeVerb::CookParms &cookparms) const
NonUniformAction opNonUniformAction(const SOP_NodeVerb::CookParms &cookparms) const
void setGlobalAreaThreshold(fpreal64 val)
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
fpreal64 getGlobalEdgeThreshold() const
bool opVisualizeRepairedPts(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
SelfIntersectingAction opSelfIntersectingAction(const SOP_NodeVerb::CookParms &cookparms) const
bool isParmColorRamp(exint idx) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
LocallySmallAreasAction getLocallySmallAreasAction() const
const char * getNestParmName(TempIndex fieldnum) const override
int64 opRandomSeed(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix2D v)
fpreal64 opUniformityThreshold(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
fpreal64 opLocalEdgeThreshold(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
bool opVisualizeRepairedPolys(const SOP_NodeVerb::CookParms &cookparms) const
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
void setVisualizeMaxManifold(bool val)
bool opCreateGroups(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
LocallySmallAreasAction opLocallySmallAreasAction(const SOP_NodeVerb::CookParms &cookparms) const
int64 opMaxPasses(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
void setAddRepairedPolyAttrib(bool val)
void setManyEdgesAction(ManyEdgesAction val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
static void loadData(UT_IStream &is, int64 &v)
const UT_StringHolder & getValidPtsAttribName() const
void setInvalidPtsColor(UT_Vector3D val)
const OP_Context & context() const
Definition: OP_NodeParms.h:97
static void saveData(std::ostream &os, fpreal64 v)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
void setSmallManifoldSize(int64 val)
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void loadData(UT_IStream &is, UT_Vector2D &v)
void setGlobalEdgeThreshold(fpreal64 val)
SYS_FORCE_INLINE const char * buffer() const
DisconnectedPointsAction opDisconnectedPointsAction(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, bool v)
bool opIgnoreWindings(const SOP_NodeVerb::CookParms &cookparms) const
void setThickness(fpreal64 val)
GLdouble s
Definition: glad.h:3009
An output stream object that owns its own string buffer storage.
fpreal64 getGlobalAreaThreshold() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
void setMaxPasses(int64 val)
**But if you need a result
Definition: thread.h:613
void copyFrom(const OP_NodeParms *src) override
static void loadData(UT_IStream &is, fpreal64 &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
SYS_FORCE_INLINE UT_StringHolder getToken(IllFormedAction enum_value)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
void setCreateGroups(bool val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
bool getAddValidPtsAttrib() const
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
void setGloballySmallAreasAction(GloballySmallAreasAction val)
bool getVisualizeRepairedPolys() const
GloballySmallAreasAction opGloballySmallAreasAction(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, int64 v)
bool opVisualizeInvalidPts(const SOP_NodeVerb::CookParms &cookparms) const
void setExportManifoldNumbers(bool val)
NonManifoldPointsAction opNonManifoldPointsAction(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
const UT_StringHolder & getRepairedPolyAttribName() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setDeleteSmallManifolds(bool val)
void setVisualizeRepairedPolys(bool val)
void setNonConvexAction(NonConvexAction val)
fpreal64 opGlobalAreaThreshold(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getInvalidPtsColor() const
double fpreal64
Definition: SYS_Types.h:201
bool opAddModifiedPtsAttrib(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
UT_Vector3D getRepairedPolysColor() const
bool opPreferLargeAngles(const SOP_NodeVerb::CookParms &cookparms) const
void setNonManifoldPointsAction(NonManifoldPointsAction val)
bool getExportManifoldNumbers() const
exint length() const
bool opExportManifoldNumbers(const SOP_NodeVerb::CookParms &cookparms) const
bool getAddValidPolyAttrib() const
NonUniformAction getNonUniformAction() const
ParmType getNestParmType(TempIndex fieldnum) const override
bool opDeleteSmallManifolds(const SOP_NodeVerb::CookParms &cookparms) const
void setPreferLargeAngles(bool val)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
UT_StringHolder opGroup(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
void setDisconnectedPointsAction(DisconnectedPointsAction val)
NonManifoldPointsAction getNonManifoldPointsAction() const
void setVisualizeInvalidPolys(bool val)
fpreal64 opGlobalEdgeThreshold(const SOP_NodeVerb::CookParms &cookparms) const
void setUniformityThreshold(fpreal64 val)
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
static void saveData(std::ostream &os, UT_Matrix3D v)
void loadFromOpSubclass(const LoadParms &loadparms) override
NonConvexAction opNonConvexAction(const SOP_NodeVerb::CookParms &cookparms) const
void setValidPolyAttribName(const UT_StringHolder &val)
long long int64
Definition: SYS_Types.h:116
OverlappingAction opOverlappingAction(const SOP_NodeVerb::CookParms &cookparms) const
bool getVisualizeInvalidPolys() const
fpreal64 getLocalAreaThreshold() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
const UT_StringHolder & getGroup() const
UT_Vector3T< fpreal64 > UT_Vector3D
void setVisualizeRepairedPts(bool val)
void setOverlappingAction(OverlappingAction val)
fpreal64 getThickness() const
bool operator!=(const SOP_PolyDoctorParms &src) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
void setModifiedPtsAttribName(const UT_StringHolder &val)
bool getAddModifiedPtsAttrib() const
bool getVisualizeMaxManifold() const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
int64 opSmallManifoldSize(const SOP_NodeVerb::CookParms &cookparms) const
IllFormedAction getIllFormedAction() const
void save(std::ostream &os) const
void setAddValidPolyAttrib(bool val)
bool getPreferLargeAngles() const
void setLocallySmallEdgesAction(LocallySmallEdgesAction val)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
IllFormedAction opIllFormedAction(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D getRepairedPtsColor() const
void setLocalAreaThreshold(fpreal64 val)
GT_API const UT_StringHolder version
void setLocallySmallAreasAction(LocallySmallAreasAction val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
static void saveData(std::ostream &os, UT_StringHolder s)
void setAddModifiedPtsAttrib(bool val)
bool opFixWindings(const SOP_NodeVerb::CookParms &cookparms) const
void setVisualizeInvalidPts(bool val)
void setSelfIntersectingAction(SelfIntersectingAction val)
UT_Vector3D getInvalidPolysColor() const
void setGloballySmallEdgesAction(GloballySmallEdgesAction val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
bool getDeleteSmallManifolds() const
static void saveData(std::ostream &os, UT_Vector2D v)
GloballySmallAreasAction getGloballySmallAreasAction() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setRepairedPolyAttribName(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
fpreal64 opLocalAreaThreshold(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
LeafData & operator=(const LeafData &)=delete
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void setIllFormedAction(IllFormedAction val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
int64 getSmallManifoldSize() const
void setValidPtsAttribName(const UT_StringHolder &val)
GLuint GLfloat * val
Definition: glcorearb.h:1608
static void saveData(std::ostream &os, UT_Vector3D v)
bool getAddRepairedPolyAttrib() const
#define SOP_API
Definition: SOP_API.h:10
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setNonUniformAction(NonUniformAction val)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_Vector3D opRepairedPolysColor(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector3D opInvalidPtsColor(const SOP_NodeVerb::CookParms &cookparms) const
NonConvexAction getNonConvexAction() const
fpreal64 getUniformityThreshold() const
void setInvalidPolysColor(UT_Vector3D val)
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool opPairOverlaps(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Vector4D v)
bool opVisualizeInvalidPolys(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opValidPtsAttribName(const SOP_NodeVerb::CookParms &cookparms) const
void setPairOverlaps(bool val)
static void loadData(UT_IStream &is, bool &v)
bool operator==(const SOP_PolyDoctorParms &src) const
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
GloballySmallEdgesAction getGloballySmallEdgesAction() const
void setIgnoreWindings(bool val)
bool opVisualizeMaxManifold(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
LocallySmallEdgesAction opLocallySmallEdgesAction(const SOP_NodeVerb::CookParms &cookparms) const
ManyEdgesAction getManyEdgesAction() const
GLboolean r
Definition: glcorearb.h:1222
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
DisconnectedPointsAction getDisconnectedPointsAction() const
UT_Vector3D opInvalidPolysColor(const SOP_NodeVerb::CookParms &cookparms) const
LocallySmallEdgesAction getLocallySmallEdgesAction() const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
bool getVisualizeRepairedPts() const
fpreal64 opThickness(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, UT_Matrix4D v)
type
Definition: core.h:1059
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_Vector3D opRepairedPtsColor(const SOP_NodeVerb::CookParms &cookparms) const
void setAddValidPtsAttrib(bool val)
OverlappingAction getOverlappingAction() const
void setRandomSeed(int64 val)
void setRepairedPolysColor(UT_Vector3D val)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_StringHolder opRepairedPolyAttribName(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opValidPolyAttribName(const SOP_NodeVerb::CookParms &cookparms) const
SelfIntersectingAction getSelfIntersectingAction() const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
exint getNestNumParms(TempIndex idx) const override
void setGroup(const UT_StringHolder &val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
bool opAddRepairedPolyAttrib(const SOP_NodeVerb::CookParms &cookparms) const
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
bool opAddValidPtsAttrib(const SOP_NodeVerb::CookParms &cookparms) const
void setLocalEdgeThreshold(fpreal64 val)
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
bool opAddValidPolyAttrib(const SOP_NodeVerb::CookParms &cookparms) const