#include "SMESH_Gen.hxx"
#include "SMESH_subMesh.hxx"
#include "SMESH_HypoFilter.hxx"
+#include "SMESHDS_Document.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
int shapeDim = SMESH_Gen::GetShapeDim( aSubMesh->GetSubShape() );
if (aTopAlgoDim > shapeDim)
{
- INFOS( "ERROR: " << shapeDim << "D algorithm is missing" );
+ MESSAGE( "ERROR: " << shapeDim << "D algorithm is missing" );
ret = false;
theErrors.push_back( SMESH_Gen::TAlgoStateError() );
theErrors.back().Set( SMESH_Hypothesis::HYP_MISSING, shapeDim, true );
SMESH_Hypothesis::Hypothesis_Status status;
algo->CheckHypothesis( aMesh, aSubMesh->GetSubShape(), status );
if ( status == SMESH_Hypothesis::HYP_BAD_PARAMETER ) {
- INFOS( "ERROR: hypothesis of " << (IsGlobalHypothesis ? "Global " : "Local ")
- << "<" << algo->GetName() << "> has a bad parameter value");
+ MESSAGE( "ERROR: hypothesis of " << (IsGlobalHypothesis ? "Global " : "Local ")
+ << "<" << algo->GetName() << "> has a bad parameter value");
errName = status;
} else if ( status == SMESH_Hypothesis::HYP_BAD_GEOMETRY ) {
- INFOS( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ")
- << "<" << algo->GetName() << "> assigned to mismatching geometry");
+ MESSAGE( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ")
+ << "<" << algo->GetName() << "> assigned to mismatching geometry");
errName = status;
} else {
- INFOS( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ")
- << "<" << algo->GetName() << "> misses some hypothesis");
+ MESSAGE( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ")
+ << "<" << algo->GetName() << "> misses some hypothesis");
}
if (IsGlobalHypothesis)
globalChecked[ algo->GetDim() ] = true;
#include "utilities.h"
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <math.h>
-#include <gp_Dir.hxx>
-#include <gp_Vec.hxx>
-#include <gp_Ax1.hxx>
-#include <gp_Trsf.hxx>
-#include <gp_Lin.hxx>
-#include <gp_XYZ.hxx>
-#include <gp_XY.hxx>
-#include <gp.hxx>
-#include <gp_Pln.hxx>
#include <BRep_Tool.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
-#include <Geom2d_Curve.hxx>
+#include <ElCLib.hxx>
#include <Extrema_GenExtPS.hxx>
#include <Extrema_POnSurf.hxx>
+#include <Geom2d_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
-#include <ElCLib.hxx>
+#include <Geom_Curve.hxx>
+#include <Geom_Surface.hxx>
#include <TColStd_ListOfInteger.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
+#include <gp.hxx>
+#include <gp_Ax1.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Trsf.hxx>
+#include <gp_Vec.hxx>
+#include <gp_XY.hxx>
+#include <gp_XYZ.hxx>
+#include <math.h>
#include <map>
#include <set>
// Loop on elem nodes:
// find new nodes and detect same nodes indices
int nbNodes = elem->NbNodes();
- //---PR
- //list<const SMDS_MeshNode*>::const_iterator itNN[ nbNodes ];
- vector<list<const SMDS_MeshNode*>::const_iterator> itNN( nbNodes );
- itNN.reserve(nbNodes);
- //---PR
- //const SMDS_MeshNode* prevNod[ nbNodes ], *nextNod[ nbNodes ];
+ vector < list< const SMDS_MeshNode* >::const_iterator > itNN( nbNodes );
vector<const SMDS_MeshNode*> prevNod( nbNodes );
vector<const SMDS_MeshNode*> nextNod( nbNodes );
vector<const SMDS_MeshNode*> midlNod( nbNodes );
const_cast< SMDS_MeshNode* > ( node )->SetPosition
( SMDS_SpacePosition::originSpacePosition() );
}
- nodeMap.insert( TNodeNodeMap::value_type( node, newNode ));
+ nodeMap.insert( make_pair( node, newNode ));
// keep inverse elements
if ( !theCopy && needReverse ) {
int aShapeId = FindShape( elem );
set<const SMDS_MeshNode*> nodeSet;
- //const SMDS_MeshNode* curNodes[ nbNodes ], *uniqueNodes[ nbNodes ];
- const SMDS_MeshNode** curNodes = new const SMDS_MeshNode*[ nbNodes ];
- const SMDS_MeshNode** uniqueNodes = new const SMDS_MeshNode*[ nbNodes ];
-
+ vector< const SMDS_MeshNode*> curNodes( nbNodes ), uniqueNodes( nbNodes );
int iUnique = 0, iCur = 0, nbRepl = 0;
vector<int> iRepl( nbNodes );
}
else {
// Change regular element or polygon
- aMesh->ChangeElementNodes( elem, uniqueNodes, nbUniqueNodes );
+ aMesh->ChangeElementNodes( elem, & uniqueNodes[0], nbUniqueNodes );
}
}
else {
rmElemIds.push_back( elem->GetID() );
}
- delete curNodes;
- delete uniqueNodes;
} // loop on elements
// Remove equal nodes and bad elements
Remove( rmNodeIds, true );
Remove( rmElemIds, false );
+
}
const SMDS_MeshElement* elem = invElemIt->next();
// prepare data for a loop on links coming to prevSideNode, of a face or a volume
int iPrevNode, iNode = 0, nbNodes = elem->NbNodes();
- //const SMDS_MeshNode* faceNodes[ nbNodes ];
- const SMDS_MeshNode** faceNodes = new const SMDS_MeshNode*[ nbNodes ];
+ vector< const SMDS_MeshNode* > faceNodes( nbNodes, (const SMDS_MeshNode*)0 );
bool isVolume = volume.Set( elem );
- const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : faceNodes;
+ const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : & faceNodes[0];
if ( isVolume ) // --volume
hasVolumes = true;
- //else if ( nbNodes > 2 ) { // --face
else if ( elem->GetType()==SMDSAbs_Face ) { // --face
// retrieve all face nodes and find iPrevNode - an index of the prevSideNode
if(elem->IsQuadratic()) {
else {
SMDS_ElemIteratorPtr nIt = elem->nodesIterator();
while ( nIt->more() ) {
- nodes[ iNode ] = static_cast<const SMDS_MeshNode*>( nIt->next() );
+ nodes[ iNode ] = cast2Node( nIt->next() );
if ( nodes[ iNode++ ] == prevSideNode )
iPrevNode = iNode - 1;
}
}
}
}
- delete faceNodes;
} // loop on inverse elements of prevSideNode
if ( !sideNode ) {
#include <GeomAdaptor_Surface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
-#include <IntAna2d_AnaIntersection.hxx>
+//#include <IntAna2d_AnaIntersection.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <gp_Ax2.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>