Salome HOME
22806: EDF SMESH: Regression: Prism_3D error
[modules/smesh.git] / src / SMESH_SWIG / StdMeshersBuilder.py
index 054bd7e7e11b96652aa6515650e35f4c8e61e308..1496202ffeaaf9884fddc74c4e92c65807e2caac 100644 (file)
@@ -183,23 +183,20 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm):
     #  @param minSize defines the minimal allowed segment length
     #  @param maxSize defines the maximal allowed segment length
     #  @param deflection defines the maximal allowed distance from a segment to an edge
-    #  @param grading defines how much size of adjacent elements can differ
     #  @param UseExisting if ==true - searches for an existing hypothesis created with
     #                     the same parameters, else (default) - creates a new one
     #  @return an instance of StdMeshers_Adaptive1D hypothesis
     #  @ingroup l3_hypos_1dhyps
-    def Adaptive(self, minSize, maxSize, deflection, grading, UseExisting=False):
+    def Adaptive(self, minSize, maxSize, deflection, UseExisting=False):
         from salome.smesh.smeshBuilder import IsEqual
         compFun = lambda hyp, args: ( IsEqual(hyp.GetMinSize(), args[0]) and \
                                       IsEqual(hyp.GetMaxSize(), args[1]) and \
-                                      IsEqual(hyp.GetDeflection(), args[2]) and \
-                                      IsEqual(hyp.GetGrading(), args[3]))
-        hyp = self.Hypothesis("Adaptive1D", [minSize, maxSize, deflection, grading],
+                                      IsEqual(hyp.GetDeflection(), args[2]))
+        hyp = self.Hypothesis("Adaptive1D", [minSize, maxSize, deflection],
                               UseExisting=UseExisting, CompareMethod=compFun)
         hyp.SetMinSize(minSize)
         hyp.SetMaxSize(maxSize)
         hyp.SetDeflection(deflection)
-        hyp.SetGrading(grading)
         return hyp
 
     ## Defines "Arithmetic1D" hypothesis to cut an edge in several segments with a length
@@ -388,7 +385,7 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm):
             algo = self.mesh.smeshpyD.CreateHypothesis("SegmentAroundVertex_0D", "libStdMeshersEngine.so")
             pass
         status = self.mesh.mesh.AddHypothesis(self.geom, algo)
-        TreatHypoStatus(status, "SegmentAroundVertex_0D", name, True)
+        TreatHypoStatus(status, "SegmentAroundVertex_0D", name, True, self.mesh)
         #
         from salome.smesh.smeshBuilder import IsEqual
         comFun = lambda hyp, args: IsEqual(hyp.GetLength(), args[0])
@@ -833,12 +830,13 @@ class StdMeshersBuilder_Projection2D(Mesh_Algorithm):
             from salome.smesh.smeshBuilder import AssureGeomPublished
             AssureGeomPublished( self.mesh, geom )
         hyp = self.Hypothesis("ProjectionSource2D", [face,mesh,srcV1,tgtV1,srcV2,tgtV2],
-                              UseExisting=0)
+                              UseExisting=0, toAdd=False)
         # it does not seem to be useful to reuse the existing "SourceFace" hypothesis
                               #UseExisting=UseExisting, CompareMethod=self.CompareSourceFace)
         hyp.SetSourceFace( face )
         hyp.SetSourceMesh( mesh )
         hyp.SetVertexAssociation( srcV1, srcV2, tgtV1, tgtV2 )
+        self.mesh.AddHypothesis(hyp, self.geom)
         return hyp
 
     pass # end of StdMeshersBuilder_Projection2D class