X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_SWIG%2FsmeshDC.py;h=a5dce4df87e8f919fb2f6a386958c7a2a6ef76cd;hb=5613f2a33cb6e155bf286d3bbcdc671472880890;hp=288851cc6cfc0f4a969067335473114d04d0452b;hpb=6beb289c1a3eb9cbf1ad744d528cc5c5938a794d;p=modules%2Fsmesh.git diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 288851cc6..a5dce4df8 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -569,7 +569,7 @@ class smeshDC(SMESH._objref_SMESH_Gen): # @return SMESH.AxisStruct # @ingroup l1_auxiliary def GetAxisStruct(self,theObj): - edges = self.geompyD.ExtractShapes( theObj, geompyDC.ShapeType["EDGE"] ) + edges = self.geompyD.SubShapeAll( theObj, geompyDC.ShapeType["EDGE"] ) if len(edges) > 1: vertex1, vertex2 = self.geompyD.SubShapeAll( edges[0], geompyDC.ShapeType["VERTEX"] ) vertex3, vertex4 = self.geompyD.SubShapeAll( edges[1], geompyDC.ShapeType["VERTEX"] ) @@ -787,6 +787,10 @@ class smeshDC(SMESH._objref_SMESH_Gen): else: print "Error: The treshold should be a shape." return None + if isinstance(UnaryOp,float): + aCriterion.Tolerance = UnaryOp + UnaryOp = FT_Undefined + pass elif CritType == FT_RangeOfIds: # Checks the treshold if isinstance(aTreshold, str): @@ -1361,8 +1365,8 @@ class Mesh: shape = geom if shape==0: shape = self.geom - nbSolids = len( self.geompyD.ExtractShapes( shape, geompyDC.ShapeType["SOLID"] )) - nbShells = len( self.geompyD.ExtractShapes( shape, geompyDC.ShapeType["SHELL"] )) + nbSolids = len( self.geompyD.SubShapeAll( shape, geompyDC.ShapeType["SOLID"] )) + nbShells = len( self.geompyD.SubShapeAll( shape, geompyDC.ShapeType["SHELL"] )) if nbSolids == 0 or nbSolids == nbShells: return Mesh_Prism3D(self, geom) return Mesh_RadialPrism3D(self, geom) @@ -1930,10 +1934,10 @@ class Mesh: def CutListOfGroups(self, main_groups, tool_groups, name): return self.mesh.CutListOfGroups(main_groups, tool_groups, name) - ## Produces a group of elements with specified element type using list of existing groups + ## Produces a group of elements of specified type using list of existing groups # A new group is created. System - # 1) extract all nodes on which groups elements are built - # 2) combine all elements of specified dimension laying on these nodes + # 1) extracts all nodes on which groups elements are built + # 2) combines all elements of specified dimension laying on these nodes # @return an instance of SMESH_Group # @ingroup l2_grps_operon def CreateDimGroup(self, groups, elem_type, name): @@ -5277,7 +5281,7 @@ class Mesh_Tetrahedron(Mesh_Algorithm): self.params = self.Hypothesis("NETGEN_Parameters", [], "libNETGENEngine.so", UseExisting=0) - if self.algoType == NETGEN: + elif self.algoType == NETGEN: self.params = self.Hypothesis("NETGEN_Parameters_3D", [], "libNETGENEngine.so", UseExisting=0) @@ -5289,7 +5293,7 @@ class Mesh_Tetrahedron(Mesh_Algorithm): self.params = self.Hypothesis("GHS3DPRL_Parameters", [], "libGHS3DPRLEngine.so", UseExisting=0) else: - print "Algo supports no multi-parameter hypothesis" + print "Warning: %s supports no multi-parameter hypothesis"%self.algo.GetName() return self.params