-# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# This library is free software; you can redistribute it and/or
# File : smesh.py
# Author : Francis KLOSS, OCC
# Module : SMESH
-
+#
"""
\namespace smesh
\brief Module smesh
## Sets the current study and Geometry component
# @ingroup l1_auxiliary
def init_smesh(self,theStudy,geompyD):
- self.geompyD=geompyD
- self.SetGeomEngine(geompyD)
- self.SetCurrentStudy(theStudy)
+ self.SetCurrentStudy(theStudy,geompyD)
## Creates an empty Mesh. This mesh can have an underlying geometry.
# @param obj the Geometrical object on which the mesh is built. If not defined,
## Sets the current study
# @ingroup l1_auxiliary
- def SetCurrentStudy( self, theStudy ):
+ def SetCurrentStudy( self, theStudy, geompyD = None ):
#self.SetCurrentStudy(theStudy)
+ if not geompyD:
+ import geompy
+ geompyD = geompy.geom
+ pass
+ self.geompyD=geompyD
+ self.SetGeomEngine(geompyD)
SMESH._objref_SMESH_Gen.SetCurrentStudy(self,theStudy)
## Gets the current study
if not mesh is None and isinstance(mesh, Mesh):
mesh = mesh.GetMesh()
hyp.SetSourceMesh( mesh )
- hyp.SetVertexAssociation( srcV1, srcV2, tgtV1, tgtV2 )
+ if srcV1 and srcV2 and tgtV1 and tgtV2:
+ hyp.SetVertexAssociation( srcV1, srcV2, tgtV1, tgtV2 )
+ #elif srcV1 or srcV2 or tgtV1 or tgtV2:
return hyp
## Checks if the given "SourceShape3D" hypothesis has the same parameters as given arguments