X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_SWIG%2FsmeshDC.py;h=74ad2f65fcc7b5b9f2bcf2537dce32afc08d5866;hb=20ce0ddfa84bbabf932ef373d1555671244a31b5;hp=6419fed8b5744081588315852589f19dcdf0540c;hpb=9f513fd3a3c3a2f32a203189f930e3d5232a9683;p=modules%2Fsmesh.git diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 6419fed8b..74ad2f65f 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -1,4 +1,3 @@ -# -*- coding: iso-8859-1 -*- # Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or @@ -497,6 +496,11 @@ def CheckPlugin(plugin): # All methods of this class are accessible directly from the smesh.py package. class smeshDC(SMESH._objref_SMESH_Gen): + ## Dump component to the Python script + # This method overrides IDL function to allow default values for the parameters. + def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True): + return SMESH._objref_SMESH_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile) + ## Sets the current study and Geometry component # @ingroup l1_auxiliary def init_smesh(self,theStudy,geompyD): @@ -569,7 +573,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"] ) @@ -741,6 +745,7 @@ class smeshDC(SMESH._objref_SMESH_Gen): UnaryOp, BinaryOp, Tolerance, TypeOfElement, Precision) ## Creates a criterion by the given parameters + # \n Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below) # @param elementType the type of elements(NODE, EDGE, FACE, VOLUME) # @param CritType the type of criterion (FT_Taper, FT_Area, FT_RangeOfIds, FT_LyingOnGeom etc.) # @param Compare belongs to {FT_LessThan, FT_MoreThan, FT_EqualTo} @@ -751,6 +756,8 @@ class smeshDC(SMESH._objref_SMESH_Gen): # @param Tolerance the tolerance used by FT_BelongToGeom, FT_BelongToSurface, # FT_LyingOnGeom, FT_CoplanarFaces criteria # @return SMESH.Filter.Criterion + # + # Example of Criteria usage # @ingroup l1_controls def GetCriterion(self,elementType, CritType, @@ -871,6 +878,8 @@ class smeshDC(SMESH._objref_SMESH_Gen): # @param Tolerance the tolerance used by FT_BelongToGeom, FT_BelongToSurface, # FT_LyingOnGeom, FT_CoplanarFaces criteria # @return SMESH_Filter + # + # Example of Filters usage # @ingroup l1_controls def GetFilter(self,elementType, CritType=FT_Undefined, @@ -884,7 +893,7 @@ class smeshDC(SMESH._objref_SMESH_Gen): aCriteria = [] aCriteria.append(aCriterion) aFilter.SetCriteria(aCriteria) - aFilterMgr.Destroy() + aFilterMgr.UnRegister() return aFilter ## Creates a numerical functor by its type @@ -1009,7 +1018,7 @@ class smeshDC(SMESH._objref_SMESH_Gen): pass aMeasurements = self.CreateMeasurements() result = aMeasurements.MinDistance(src1, src2) - aMeasurements.Destroy() + aMeasurements.UnRegister() return result ## Get bounding box of the specified object(s) @@ -1046,7 +1055,7 @@ class smeshDC(SMESH._objref_SMESH_Gen): pass aMeasurements = self.CreateMeasurements() result = aMeasurements.BoundingBox(srclist) - aMeasurements.Destroy() + aMeasurements.UnRegister() return result import omniORB @@ -1091,8 +1100,8 @@ class Mesh: if studyID != geompyD.myStudyId: geompyD.init_geom( smeshpyD.GetCurrentStudy()) pass - name = "%s_%s"%(self.geom.GetShapeType(), id(self.geom)%100) - geompyD.addToStudy( self.geom, name ) + geo_name = "%s_%s"%(self.geom.GetShapeType(), id(self.geom)%100) + geompyD.addToStudy( self.geom, geo_name ) self.mesh = self.smeshpyD.CreateMesh(self.geom) elif isinstance(obj, SMESH._objref_SMESH_Mesh): @@ -1137,12 +1146,25 @@ class Mesh: ## Gets the subMesh object associated to a \a theSubObject geometrical object. # The subMesh object gives access to the IDs of nodes and elements. - # @param theSubObject a geometrical object (shape) - # @param theName a name for the submesh + # @param geom a geometrical object (shape) + # @param name a name for the submesh # @return an object of type SMESH_SubMesh, representing a part of mesh, which lies on the given shape # @ingroup l2_submeshes - def GetSubMesh(self, theSubObject, theName): - submesh = self.mesh.GetSubMesh(theSubObject, theName) + def GetSubMesh(self, geom, name): + if not geom.IsSame( self.geom ) and not geom.GetStudyEntry(): + ## set the study + studyID = self.smeshpyD.GetCurrentStudy()._get_StudyId() + if studyID != self.geompyD.myStudyId: + self.geompyD.init_geom( self.smeshpyD.GetCurrentStudy()) + ## get a name + if not name and geom.GetShapeType() != geompyDC.GEOM.COMPOUND: + # for all groups SubShapeName() returns "Compound_-1" + name = self.geompyD.SubShapeName(geom, self.geom) + if not name: + name = "%s_%s"%(geom.GetShapeType(), id(geom)%10000) + ## publish + self.geompyD.addToStudyInFather( self.geom, geom, name ) + submesh = self.mesh.GetSubMesh( geom, name ) return submesh ## Returns the shape associated to the mesh @@ -1807,7 +1829,7 @@ class Mesh: aCriteria.append(Criterion) aFilter.SetCriteria(aCriteria) group = self.MakeGroupByFilter(groupName, aFilter) - aFilterMgr.Destroy() + aFilterMgr.UnRegister() return group ## Creates a mesh group by the given criteria (list of criteria) @@ -1820,7 +1842,7 @@ class Mesh: aFilter = aFilterMgr.CreateFilter() aFilter.SetCriteria(theCriteria) group = self.MakeGroupByFilter(groupName, aFilter) - aFilterMgr.Destroy() + aFilterMgr.UnRegister() return group ## Creates a mesh group by the given filter @@ -1851,7 +1873,7 @@ class Mesh: aPredicate = aFilterMgr.CreateFreeEdges() aPredicate.SetMesh(self.mesh) aBorders = aPredicate.GetBorders() - aFilterMgr.Destroy() + aFilterMgr.UnRegister() return aBorders ## Removes a group @@ -1934,10 +1956,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): @@ -2415,7 +2437,7 @@ class Mesh: aMeasurements = self.smeshpyD.CreateMeasurements() aMeasure = aMeasurements.MinDistance(id1, id2) - aMeasurements.Destroy() + aMeasurements.UnRegister() return aMeasure ## Get bounding box of the specified object(s) @@ -2464,7 +2486,7 @@ class Mesh: pass aMeasurements = self.smeshpyD.CreateMeasurements() aMeasure = aMeasurements.BoundingBox(srclist) - aMeasurements.Destroy() + aMeasurements.UnRegister() return aMeasure # Mesh edition (SMESH_MeshEditor functionality): @@ -3059,19 +3081,26 @@ class Mesh: ## Converts the mesh to quadratic, deletes old elements, replacing # them with quadratic with the same id. # @param theForce3d new node creation method: - # 0 - the medium node lies at the geometrical edge from which the mesh element is built + # 0 - the medium node lies at the geometrical entity from which the mesh element is built # 1 - the medium node lies at the middle of the line segments connecting start and end node of a mesh element + # @param theSubMesh a group or a sub-mesh to convert; WARNING: in this case the mesh can become not conformal # @ingroup l2_modif_tofromqu - def ConvertToQuadratic(self, theForce3d): - self.editor.ConvertToQuadratic(theForce3d) + def ConvertToQuadratic(self, theForce3d, theSubMesh=None): + if theSubMesh: + self.editor.ConvertToQuadraticObject(theForce3d,theSubMesh) + else: + self.editor.ConvertToQuadratic(theForce3d) ## Converts the mesh from quadratic to ordinary, # deletes old quadratic elements, \n replacing # them with ordinary mesh elements with the same id. - # @return TRUE in case of success, FALSE otherwise. + # @param theSubMesh a group or a sub-mesh to convert; WARNING: in this case the mesh can become not conformal # @ingroup l2_modif_tofromqu - def ConvertFromQuadratic(self): - return self.editor.ConvertFromQuadratic() + def ConvertFromQuadratic(self, theSubMesh=None): + if theSubMesh: + self.editor.ConvertFromQuadraticObject(theSubMesh) + else: + return self.editor.ConvertFromQuadratic() ## Creates 2D mesh as skin on boundary faces of a 3D mesh # @return TRUE if operation has been completed successfully, FALSE otherwise @@ -3082,15 +3111,18 @@ class Mesh: ## Creates missing boundary elements # @param elements - elements whose boundary is to be checked: # mesh, group, sub-mesh or list of elements + # if elements is mesh, it must be the mesh whose MakeBoundaryMesh() is called # @param dimension - defines type of boundary elements to create: # SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D + # SMESH.BND_1DFROM3D creates mesh edges on all borders of free facets of 3D cells # @param groupName - a name of group to store created boundary elements in, # "" means not to create the group # @param meshName - a name of new mesh to store created boundary elements in, # "" means not to create the new mesh - # @param toCopyElements - if true, the checked elements will be copied into the new mesh + # @param toCopyElements - if true, the checked elements will be copied into + # the new mesh else only boundary elements will be copied into the new mesh # @param toCopyExistingBondary - if true, not only new but also pre-existing - # boundary elements will be copied into the new mesh + # boundary elements will be copied into the new mesh # @return tuple (mesh, group) where bondary elements were added to # @ingroup l2_modif_edit def MakeBoundaryMesh(self, elements, dimension=SMESH.BND_2DFROM3D, groupName="", meshName="", @@ -3106,6 +3138,29 @@ class Mesh: if mesh: mesh = self.smeshpyD.Mesh(mesh) return mesh, group + ## + # @brief Creates missing boundary elements around either the whole mesh or + # groups of 2D elements + # @param dimension - defines type of boundary elements to create + # @param groupName - a name of group to store all boundary elements in, + # "" means not to create the group + # @param meshName - a name of a new mesh, which is a copy of the initial + # mesh + created boundary elements; "" means not to create the new mesh + # @param toCopyAll - if true, the whole initial mesh will be copied into + # the new mesh else only boundary elements will be copied into the new mesh + # @param groups - groups of 2D elements to make boundary around + # @retval tuple( long, mesh, groups ) + # long - number of added boundary elements + # mesh - the mesh where elements were added to + # group - the group of boundary elements or None + # + def MakeBoundaryElements(self, dimension=SMESH.BND_2DFROM3D, groupName="", meshName="", + toCopyAll=False, groups=[]): + nb, mesh, group = self.editor.MakeBoundaryElements(dimension,groupName,meshName, + toCopyAll,groups) + if mesh: mesh = self.smeshpyD.Mesh(mesh) + return nb, mesh, group + ## Renumber mesh nodes # @ingroup l2_modif_renumber def RenumberNodes(self): @@ -3261,7 +3316,7 @@ class Mesh: ## Generates new elements by extrusion of the elements with given ids # @param IDsOfElements the list of elements ids for extrusion - # @param StepVector vector or DirStruct, defining the direction and value of extrusion + # @param StepVector vector or DirStruct, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||) # @param NbOfSteps the number of steps # @param MakeGroups forces the generation of new groups from existing ones # @return the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise @@ -3304,7 +3359,7 @@ class Mesh: ## Generates new elements by extrusion of the elements which belong to the object # @param theObject the object which elements should be processed. # It can be a mesh, a sub mesh or a group. - # @param StepVector vector, defining the direction and value of extrusion + # @param StepVector vector, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||) # @param NbOfSteps the number of steps # @param MakeGroups forces the generation of new groups from existing ones # @return list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise @@ -3326,7 +3381,7 @@ class Mesh: ## Generates new elements by extrusion of the elements which belong to the object # @param theObject object which elements should be processed. # It can be a mesh, a sub mesh or a group. - # @param StepVector vector, defining the direction and value of extrusion + # @param StepVector vector, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||) # @param NbOfSteps the number of steps # @param MakeGroups to generate new groups from existing ones # @return list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise @@ -3348,7 +3403,7 @@ class Mesh: ## Generates new elements by extrusion of the elements which belong to the object # @param theObject object which elements should be processed. # It can be a mesh, a sub mesh or a group. - # @param StepVector vector, defining the direction and value of extrusion + # @param StepVector vector, defining the direction and value of extrusion for one step (the total extrusion length will be NbOfSteps * ||StepVector||) # @param NbOfSteps the number of steps # @param MakeGroups forces the generation of new groups from existing ones # @return list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise @@ -4136,6 +4191,16 @@ class Mesh: def DoubleNodesOnGroupBoundaries(self, theDomains, createJointElems ): return self.editor.DoubleNodesOnGroupBoundaries( theDomains, createJointElems ) + ## Double nodes on some external faces and create flat elements. + # Flat elements are mainly used by some types of mechanic calculations. + # + # Each group of the list must be constituted of faces. + # Triangles are transformed in prisms, and quadrangles in hexahedrons. + # @param theGroupsOfFaces - list of groups of faces + # @return TRUE if operation has been completed successfully, FALSE otherwise + def CreateFlatElementsOnFacesGroups(self, theGroupsOfFaces ): + return self.editor.CreateFlatElementsOnFacesGroups( theGroupsOfFaces ) + def _valueFromFunctor(self, funcType, elemId): fn = self.smeshpyD.GetFunctor(funcType) fn.SetMesh(self.mesh) @@ -4357,33 +4422,41 @@ class Mesh_Algorithm: if geom is None: raise RuntimeError, "Attemp to create " + algo + " algoritm on None shape" self.mesh = mesh - piece = mesh.geom name = "" if not geom: - self.geom = piece + self.geom = mesh.geom else: self.geom = geom + self.AssureGeomPublished( geom ) try: name = GetName(geom) pass except: pass - if not name and geom.GetShapeType() != geompyDC.GEOM.COMPOUND: - # for all groups SubShapeName() returns "Compound_-1" - name = mesh.geompyD.SubShapeName(geom, piece) - if not name: - name = "%s_%s"%(geom.GetShapeType(), id(geom)%10000) - # publish geom of sub-mesh (issue 0021122) - if not self.geom.IsSame( self.mesh.geom ) and not self.geom.GetStudyEntry(): - studyID = self.mesh.smeshpyD.GetCurrentStudy()._get_StudyId() - if studyID != self.mesh.geompyD.myStudyId: - self.mesh.geompyD.init_geom( self.mesh.smeshpyD.GetCurrentStudy()) - self.mesh.geompyD.addToStudyInFather( self.mesh.geom, self.geom, name ) - pass self.subm = mesh.mesh.GetSubMesh(geom, algo.GetName()) self.algo = algo status = mesh.mesh.AddHypothesis(self.geom, self.algo) TreatHypoStatus( status, algo.GetName(), name, True ) + return + + ## Private method. Add geom into the study if not yet there + def AssureGeomPublished(self, geom, name=''): + if not isinstance( geom, geompyDC.GEOM._objref_GEOM_Object ): + return + if not geom.IsSame( self.mesh.geom ) and not geom.GetStudyEntry(): + ## set the study + studyID = self.mesh.smeshpyD.GetCurrentStudy()._get_StudyId() + if studyID != self.mesh.geompyD.myStudyId: + self.mesh.geompyD.init_geom( self.mesh.smeshpyD.GetCurrentStudy()) + ## get a name + if not name and geom.GetShapeType() != geompyDC.GEOM.COMPOUND: + # for all groups SubShapeName() returns "Compound_-1" + name = self.mesh.geompyD.SubShapeName(geom, self.mesh.geom) + if not name: + name = "%s_%s"%(geom.GetShapeType(), id(geom)%10000) + ## publish + self.mesh.geompyD.addToStudyInFather( self.mesh.geom, geom, name ) + return def CompareHyp (self, hyp, args): print "CompareHyp is not implemented for ", self.__class__.__name__, ":", hyp.GetName() @@ -4438,7 +4511,7 @@ class Mesh_Algorithm: # @param thickness total thickness of layers of prisms # @param numberOfLayers number of layers of prisms # @param stretchFactor factor (>1.0) of growth of layer thickness towards inside of mesh - # @param ignoreFaces geometrical face (or their ids) not to generate layers on + # @param ignoreFaces list of geometrical faces (or their ids) not to generate layers on # @ingroup l3_hypos_additi def ViscousLayers(self, thickness, numberOfLayers, stretchFactor, ignoreFaces=[]): if not isinstance(self.algo, SMESH._objref_SMESH_3D_Algo): @@ -4734,14 +4807,9 @@ class Mesh_Segment(Mesh_Algorithm): ### 0D algorithm if self.geom is None: raise RuntimeError, "Attemp to create SegmentAroundVertex_0D algoritm on None shape" - try: - name = GetName(self.geom) - pass - except: - piece = self.mesh.geom - name = self.mesh.geompyD.SubShapeName(self.geom, piece) - self.mesh.geompyD.addToStudyInFather(piece, self.geom, name) - pass + self.AssureGeomPublished( self.geom ) + name = GetName(self.geom) + algo = self.FindAlgorithm("SegmentAroundVertex_0D", self.mesh.smeshpyD) if algo is None: algo = self.mesh.smeshpyD.CreateHypothesis("SegmentAroundVertex_0D", "libStdMeshersEngine.so") @@ -4982,6 +5050,20 @@ class Mesh_Triangle(Mesh_Algorithm): # Parameter of BLSURF algo self.Parameters().SetOptionValue(optionName,level) + ## Sets an attractor on the chosen face. The mesh size will decrease exponentially with the distance from theAttractor, following the rule h(d) = theEndSize - (theEndSize - theStartSize) * exp [ - ( d / theInfluenceDistance ) ^ 2 ] + # @param theFace : face on which the attractor will be defined + # @param theAttractor : geometrical object from which the mesh size "h" decreases exponentially + # @param theStartSize : mesh size on theAttractor + # @param theEndSize : maximum size that will be reached on theFace + # @param theInfluenceDistance : influence of the attractor ( the size grow slower on theFace if it's high) + # @param theConstantSizeDistance : distance until which the mesh size will be kept constant on theFace + # @ingroup l3_hypos_blsurf + def SetAttractorGeom(self, theFace, theAttractor, theStartSize, theEndSize, theInfluenceDistance, theConstantSizeDistance): + self.AssureGeomPublished( theFace ) + self.AssureGeomPublished( theAttractor ) + # Parameter of BLSURF algo + self.Parameters().SetAttractorGeom(otheFace, theAttractor, theStartSize, theEndSize, theInfluenceDistance, theConstantSizeDistance) + ## Sets QuadAllowed flag. # Only for algoType == NETGEN(NETGEN_1D2D) || NETGEN_2D || BLSURF # @ingroup l3_hypos_netgen l3_hypos_blsurf @@ -5281,7 +5363,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) @@ -5293,7 +5375,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 @@ -5558,6 +5640,9 @@ class Mesh_Projection1D(Mesh_Algorithm): # @param UseExisting if ==true - searches for the existing hypothesis created with # the same parameters, else (default) - creates a new one def SourceEdge(self, edge, mesh=None, srcV=None, tgtV=None, UseExisting=0): + self.AssureGeomPublished( edge ) + self.AssureGeomPublished( srcV ) + self.AssureGeomPublished( tgtV ) hyp = self.Hypothesis("ProjectionSource1D", [edge,mesh,srcV,tgtV], UseExisting=0) #UseExisting=UseExisting, CompareMethod=self.CompareSourceEdge) @@ -5604,11 +5689,13 @@ class Mesh_Projection2D(Mesh_Algorithm): # Note: all association vertices must belong to one edge of a face def SourceFace(self, face, mesh=None, srcV1=None, tgtV1=None, srcV2=None, tgtV2=None, UseExisting=0): + for geom in [ face, srcV1, tgtV1, srcV2, tgtV2 ]: + self.AssureGeomPublished( geom ) hyp = self.Hypothesis("ProjectionSource2D", [face,mesh,srcV1,tgtV1,srcV2,tgtV2], UseExisting=0) #UseExisting=UseExisting, CompareMethod=self.CompareSourceFace) hyp.SetSourceFace( face ) - if not mesh is None and isinstance(mesh, Mesh): + if isinstance(mesh, Mesh): mesh = mesh.GetMesh() hyp.SetSourceMesh( mesh ) hyp.SetVertexAssociation( srcV1, srcV2, tgtV1, tgtV2 ) @@ -5649,6 +5736,8 @@ class Mesh_Projection3D(Mesh_Algorithm): # Note: association vertices must belong to one edge of a solid def SourceShape3D(self, solid, mesh=0, srcV1=0, tgtV1=0, srcV2=0, tgtV2=0, UseExisting=0): + for geom in [ solid, srcV1, tgtV1, srcV2, tgtV2 ]: + self.AssureGeomPublished( geom ) hyp = self.Hypothesis("ProjectionSource3D", [solid,mesh,srcV1,tgtV1,srcV2,tgtV2], UseExisting=0) @@ -5909,6 +5998,8 @@ class Mesh_UseExistingElements(Mesh_Algorithm): def SourceEdges(self, groups, toCopyMesh=False, toCopyGroups=False, UseExisting=False): if self.algo.GetName() == "Import_2D": raise ValueError, "algoritm dimension mismatch" + for group in groups: + self.AssureGeomPublished( group ) hyp = self.Hypothesis("ImportSource1D", [groups, toCopyMesh, toCopyGroups], UseExisting=UseExisting, CompareMethod=self._compareHyp) hyp.SetSourceEdges(groups) @@ -5924,6 +6015,8 @@ class Mesh_UseExistingElements(Mesh_Algorithm): def SourceFaces(self, groups, toCopyMesh=False, toCopyGroups=False, UseExisting=False): if self.algo.GetName() == "Import_1D": raise ValueError, "algoritm dimension mismatch" + for group in groups: + self.AssureGeomPublished( group ) hyp = self.Hypothesis("ImportSource2D", [groups, toCopyMesh, toCopyGroups], UseExisting=UseExisting, CompareMethod=self._compareHyp) hyp.SetSourceFaces(groups)