X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Block.cxx;h=fd4edab3265c9dbc468fc264a3ebe3a363f6be8b;hb=a4d61a7b6f94b6f1c8cf00fb6b966232d834f7fc;hp=59d48a9786386d0c0642aacbb1bf9069e764dce6;hpb=79b1ac2b6df9117f16f11d444b1f165d477a1813;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Block.cxx b/src/SMESH/SMESH_Block.cxx index 59d48a978..fd4edab32 100644 --- a/src/SMESH/SMESH_Block.cxx +++ b/src/SMESH/SMESH_Block.cxx @@ -1,28 +1,28 @@ -// Copyright (C) 2003 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 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 - +// 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 +// 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. +// +// 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 +// // File : SMESH_Pattern.hxx // Created : Mon Aug 2 10:30:00 2004 // Author : Edward AGAPOV (eap) - -using namespace std; - +// #include "SMESH_Block.hxx" #include @@ -36,6 +36,7 @@ using namespace std; #include #include #include +#include #include #include #include @@ -495,7 +496,7 @@ Standard_Boolean SMESH_Block::Values(const math_Vector& theXYZ, return true; } #ifdef DEBUG_PARAM_COMPUTE - cout << "PARAM GUESS: " << params.X() << " "<< params.Y() << " "<< params.X() << endl; + MESSAGE ( "PARAM GUESS: " << params.X() << " "<< params.Y() << " "<< params.X() ); myNbIterations++; // how many times call ShellPoint() #endif ShellPoint( params, P ); @@ -556,8 +557,7 @@ Standard_Boolean SMESH_Block::Values(const math_Vector& theXYZ, #endif } #ifdef DEBUG_PARAM_COMPUTE - cout << "F = " << theFxyz(1) << - " DRV: " << theDf(1,1) << " " << theDf(1,2) << " " << theDf(1,3) << endl; + MESSAGE ( "F = " << theFxyz(1) << " DRV: " << theDf(1,1) << " " << theDf(1,2) << " " << theDf(1,3) ); myNbIterations +=3; // how many times call ShellPoint() #endif @@ -613,9 +613,9 @@ bool SMESH_Block::computeParameters(const gp_Pnt& thePoint, } #ifdef DEBUG_PARAM_COMPUTE mySumDist += distance(); - cout << " ------ SOLUTION: ( "<< myParam.X() <<" "<< myParam.Y() <<" "<< myParam.Z() <<" )"< aWireList; - TopoDS_Wire anOuterWire = BRepTools::OuterWire( theFace ); - aWireList.push_back( anOuterWire ); + //TopoDS_Wire anOuterWire = BRepTools::OuterWire( theFace ); ### issue 0020184 + TopoDS_Wire anOuterWire = ShapeAnalysis::OuterWire( theFace ); + //aWireList.push_back( anOuterWire ); ### issue 0020184 for ( TopoDS_Iterator wIt (theFace); wIt.More(); wIt.Next() ) if ( !anOuterWire.IsSame( wIt.Value() )) aWireList.push_back( TopoDS::Wire( wIt.Value() )); + else + aWireList.push_front( TopoDS::Wire( wIt.Value() ));// ### issue 0020184 // loop on edges of wires theNbVertexInWires.clear(); @@ -1024,10 +1027,10 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face& theFace, if ( iE++ > theNbVertexInWires.back() ) { #ifdef _DEBUG_ gp_Pnt p = BRep_Tool::Pnt( theFirstVertex ); - cout << " : Warning : vertex "<< theFirstVertex.TShape().operator->() - << " ( " << p.X() << " " << p.Y() << " " << p.Z() << " )" - << " not found in outer wire of face "<< theFace.TShape().operator->() - << " with vertices: " << endl; + MESSAGE ( " : Warning : vertex "<< theFirstVertex.TShape().operator->() + << " ( " << p.X() << " " << p.Y() << " " << p.Z() << " )" + << " not found in outer wire of face "<< theFace.TShape().operator->() + << " with vertices: " ); wExp.Init( *wlIt, theFace ); for ( int i = 0; wExp.More(); wExp.Next(), i++ ) { @@ -1035,8 +1038,8 @@ int SMESH_Block::GetOrderedEdges (const TopoDS_Face& theFace, edge = TopoDS::Edge( edge.Oriented( wExp.Orientation() )); TopoDS_Vertex v = TopExp::FirstVertex( edge, true ); gp_Pnt p = BRep_Tool::Pnt( v ); - cout << i << " " << v.TShape().operator->() << " " - << p.X() << " " << p.Y() << " " << p.Z() << " " << endl; + MESSAGE_ADD ( i << " " << v.TShape().operator->() << " " + << p.X() << " " << p.Y() << " " << p.Z() << " " << std::endl ); } #endif break; // break infinite loop