X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_CompositeSegment_1D.cxx;h=aa3f460a4ce0d4a4ada50855217f3f906b7e5fbc;hp=6de7b8e52dc9a8fc4bd6b31f194efd3e4ca7b46e;hb=refs%2Ftags%2FV9_0_0;hpb=b2f41043c8aba7023b5dcfc98080007560d200bc diff --git a/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx b/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx index 6de7b8e52..aa3f460a4 100644 --- a/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx +++ b/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 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 @@ -6,7 +6,7 @@ // 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 @@ -20,23 +20,24 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : implementaion of SMESH idl descriptions +// SMESH SMESH : implementation of SMESH idl descriptions // File : StdMeshers_CompositeSegment_1D.cxx // Module : SMESH // #include "StdMeshers_CompositeSegment_1D.hxx" -#include "StdMeshers_FaceSide.hxx" -#include "StdMeshers_AutomaticLength.hxx" +#include "SMDS_MeshElement.hxx" +#include "SMDS_MeshNode.hxx" +#include "SMESHDS_Mesh.hxx" +#include "SMESH_Comment.hxx" #include "SMESH_Gen.hxx" -#include "SMESH_Mesh.hxx" #include "SMESH_HypoFilter.hxx" +#include "SMESH_Mesh.hxx" +#include "SMESH_TypeDefs.hxx" #include "SMESH_subMesh.hxx" #include "SMESH_subMeshEventListener.hxx" -#include "SMESH_Comment.hxx" - -#include "SMDS_MeshElement.hxx" -#include "SMDS_MeshNode.hxx" +#include "StdMeshers_AutomaticLength.hxx" +#include "StdMeshers_FaceSide.hxx" #include "utilities.h" @@ -125,7 +126,7 @@ namespace { * \brief Restore nodes on internal vertices of a complex side * \param event - algo_event or compute_event itself (of SMESH_subMesh) * \param eventType - ALGO_EVENT or COMPUTE_EVENT (of SMESH_subMesh) - * \param subMesh - the submesh where the event occures + * \param subMesh - the submesh where the event occurs * \param data - listener data stored in the subMesh * \param hyp - hypothesis, if eventType is algo_event */ @@ -173,7 +174,7 @@ namespace { // check if an edge is a part of a complex side TopoDS_Face face; TopoDS_Edge edge = TopoDS::Edge( subMesh->GetSubShape() ); - auto_ptr< StdMeshers_FaceSide > side + SMESHUtils::Deleter< StdMeshers_FaceSide > side ( StdMeshers_CompositeSegment_1D::GetFaceSide(*subMesh->GetFather(), edge, face, false )); if ( side->NbEdges() > 1 && side->NbSegments() ) @@ -242,11 +243,9 @@ namespace { //============================================================================= StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D(int hypId, - int studyId, SMESH_Gen * gen) - :StdMeshers_Regular_1D(hypId, studyId, gen) + :StdMeshers_Regular_1D(hypId, gen) { - MESSAGE("StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D"); _name = AlgoName(); } @@ -287,21 +286,21 @@ void StdMeshers_CompositeSegment_1D::SetEventListener(SMESH_subMesh* subMesh) // check if an edge is a part of a complex side TopoDS_Face face; TopoDS_Edge edge = TopoDS::Edge( subMesh->GetSubShape() ); - auto_ptr< StdMeshers_FaceSide > side - ( StdMeshers_CompositeSegment_1D::GetFaceSide(*subMesh->GetFather(),edge, face, false )); + SMESHUtils::Deleter< StdMeshers_FaceSide > side + ( StdMeshers_CompositeSegment_1D::GetFaceSide( *subMesh->GetFather(), edge, face, false )); if ( side->NbEdges() > 1 ) { // complex // set _alwaysComputed to vertices for ( int iE = 1; iE < side->NbEdges(); ++iE ) { - TopoDS_Vertex V = side->FirstVertex( iE ); + TopoDS_Vertex V = side->FirstVertex( iE ); SMESH_subMesh* sm = side->GetMesh()->GetSubMesh( V ); sm->SetIsAlwaysComputed( true ); } } } // set listener that will remove _alwaysComputed from submeshes at algorithm change - subMesh->SetEventListener( new VertexNodesRestoringListener(), 0, subMesh); + subMesh->SetEventListener( new VertexNodesRestoringListener(), 0, subMesh ); StdMeshers_Regular_1D::SetEventListener( subMesh ); } @@ -368,13 +367,13 @@ bool StdMeshers_CompositeSegment_1D::Compute(SMESH_Mesh & aMesh, // Get edges to be discretized as a whole TopoDS_Face nullFace; - auto_ptr< StdMeshers_FaceSide > side( GetFaceSide(aMesh, edge, nullFace, true )); + SMESHUtils::Deleter< StdMeshers_FaceSide > side( GetFaceSide(aMesh, edge, nullFace, true )); //side->dump("IN COMPOSITE SEG"); if ( side->NbEdges() < 2 ) return StdMeshers_Regular_1D::Compute( aMesh, aShape ); - // update segment lenght computed by StdMeshers_AutomaticLength + // update segment length computed by StdMeshers_AutomaticLength const list & hyps = GetUsedHypothesis(aMesh, aShape); if ( !hyps.empty() ) { StdMeshers_AutomaticLength * autoLenHyp = const_cast @@ -384,7 +383,7 @@ bool StdMeshers_CompositeSegment_1D::Compute(SMESH_Mesh & aMesh, } // Compute node parameters - auto_ptr< BRepAdaptor_CompCurve > C3d ( side->GetCurve3d() ); + SMESHUtils::Deleter< BRepAdaptor_CompCurve > C3d ( side->GetCurve3d() ); double f = C3d->FirstParameter(), l = C3d->LastParameter(); list< double > params; if ( !computeInternalParameters ( aMesh, *C3d, side->Length(), f, l, params, false ))