X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FGEOM_I%2FGEOM_IBlocksOperations_i.cc;h=c71432528a43e0597f7e7fbc411e0332bab9365f;hb=89c42a4f37bca4013a3a9cdf7f0a9907975cc34e;hp=f765856d0950c94be2e4b519909ff49de0064f42;hpb=16f91b82f447624718787d47955b307588fa9fa8;p=modules%2Fgeom.git diff --git a/src/GEOM_I/GEOM_IBlocksOperations_i.cc b/src/GEOM_I/GEOM_IBlocksOperations_i.cc index f765856d0..c71432528 100644 --- a/src/GEOM_I/GEOM_IBlocksOperations_i.cc +++ b/src/GEOM_I/GEOM_IBlocksOperations_i.cc @@ -1,24 +1,23 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 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 +// 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. +// 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. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com #include @@ -742,6 +741,39 @@ char* GEOM_IBlocksOperations_i::PrintBCErrors return CORBA::string_dup(aDescr.ToCString()); } +//============================================================================= +/*! + * GetNonBlocks + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetNonBlocks + (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_out theNonQuads) +{ + GEOM::GEOM_Object_var aGEOMObject; + GEOM::GEOM_Object_var aNonQuads; + + theNonQuads = aNonQuads._retn(); + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Get the reference Objects + Handle(GEOM_Object) aShape = GetObjectImpl(theShape); + if (aShape.IsNull()) return aGEOMObject._retn(); + + //Get the result + Handle(GEOM_Object) aFaces; + Handle(GEOM_Object) anObject = GetOperations()->GetNonBlocks(aShape, aFaces); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + if (!aFaces.IsNull()) + theNonQuads = GetObject(aFaces); + + return GetObject(anObject); +} + //============================================================================= /*! * RemoveExtraEdges