-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
*/
//================================================================================
-void SMESH_MeshEditor_i::SplitHexahedraIntoPrisms (SMESH::SMESH_IDSource_ptr elems,
- CORBA::Short methodFlags,
- const SMESH::AxisStruct & facetToSplitNormal,
- CORBA::Boolean allDomains)
+void SMESH_MeshEditor_i::SplitHexahedraIntoPrisms (SMESH::SMESH_IDSource_ptr elems,
+ const SMESH::PointStruct & startHexPoint,
+ const SMESH::DirStruct& facetToSplitNormal,
+ CORBA::Short methodFlags,
+ CORBA::Boolean allDomains)
throw (SALOME::SALOME_Exception)
{
SMESH_TRY;
initData();
prepareIdSource( elems );
- gp_Ax1 facetNorm( gp_Pnt( facetToSplitNormal.x,
- facetToSplitNormal.y,
- facetToSplitNormal.z ),
- gp_Dir( facetToSplitNormal.vx,
- facetToSplitNormal.vy,
- facetToSplitNormal.vz ));
+ gp_Ax1 facetNorm( gp_Pnt( startHexPoint.x,
+ startHexPoint.y,
+ startHexPoint.z ),
+ gp_Dir( facetToSplitNormal.PS.x,
+ facetToSplitNormal.PS.y,
+ facetToSplitNormal.PS.z ));
TIDSortedElemSet elemSet;
SMESH::long_array_var anElementsId = elems->GetIDs();
SMDS_MeshElement::GeomFilter filter( SMDSGeom_HEXA );
declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute()
TPythonDump() << this << ".SplitHexahedraIntoPrisms( "
- << elems << ", " << methodFlags<< ", "
- << facetToSplitNormal<< ", " << allDomains << " )";
+ << elems << ", "
+ << startHexPoint << ", "
+ << facetToSplitNormal<< ", "
+ << methodFlags<< ", "
+ << allDomains << " )";
SMESH_CATCH( SMESH::throwCorbaException );
}
for ( int i = 0; i < foundElems.size(); ++i )
res[i] = foundElems[i]->GetID();
- if ( !myIsPreviewMode ) // call from tui
- TPythonDump() << "res = " << this << ".FindElementsByPoint( "
- << x << ", "
- << y << ", "
- << z << ", "
- << type << " )";
-
return res._retn();
SMESH_CATCH( SMESH::throwCorbaException );
for ( int i = 0; i < foundElems.size(); ++i )
res[i] = foundElems[i]->GetID();
- if ( !myIsPreviewMode ) // call from tui
- TPythonDump() << "res = " << this << ".FindAmongElementsByPoint( "
- << elementIDs << ", "
- << x << ", "
- << y << ", "
- << z << ", "
- << type << " )";
-
return res._retn();
SMESH_CATCH( SMESH::throwCorbaException );