+ ## Return the wrapped mesher.
+ def GetAlgorithm(self):
+ return self.algo
+
+ ## Private method. Print error message if a hypothesis was not assigned.
+ def TreatHypoStatus(self, status, hypName, geomName, isAlgo):
+ if isAlgo:
+ hypType = "algorithm"
+ else:
+ hypType = "hypothesis"
+ if status == SMESH.HYP_UNKNOWN_FATAL :
+ reason = "for unknown reason"
+ elif status == SMESH.HYP_INCOMPATIBLE :
+ reason = "this hypothesis mismatches algorithm"
+ elif status == SMESH.HYP_NOTCONFORM :
+ reason = "not conform mesh would be built"
+ elif status == SMESH.HYP_ALREADY_EXIST :
+ reason = hypType + " of the same dimension already assigned to this shape"
+ elif status == SMESH.HYP_BAD_DIM :
+ reason = hypType + " mismatches shape"
+ elif status == SMESH.HYP_CONCURENT :
+ reason = "there are concurrent hypotheses on sub-shapes"
+ elif status == SMESH.HYP_BAD_SUBSHAPE :
+ reason = "shape is neither the main one, nor its subshape, nor a valid group"
+ else:
+ return
+ hypName = '"' + hypName + '"'
+ geomName= '"' + geomName+ '"'
+ if status < SMESH.HYP_UNKNOWN_FATAL:
+ print hypName, "was assigned to", geomName,"but", reason
+ else:
+ print hypName, "was not assigned to",geomName,":", reason
+ pass
+
+ ## Private method.