bool SMESH_MeshEditor::InverseDiag (const SMDS_MeshElement * theTria1,
const SMDS_MeshElement * theTria2 )
{
- MESSAGE("InverseDiag");
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
- MESSAGE( "::InverseDiag()" );
-
const SMDS_MeshElement *tr1, *tr2;
if ( !findTriangles( theNode1, theNode2, tr1, tr2 ))
return false;
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
- MESSAGE( "::DeleteDiag()" );
-
const SMDS_MeshElement *tr1, *tr2;
if ( !findTriangles( theNode1, theNode2, tr1, tr2 ))
return false;
bool SMESH_MeshEditor::Reorient (const SMDS_MeshElement * theElem)
{
- MESSAGE("Reorient");
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
gp_XY uv [9]; uv[8] = gp_XY(0,0);
gp_XYZ xyz[9];
vector< const SMDS_MeshNode* > nodes;
- SMESHDS_SubMesh* subMeshDS;
+ SMESHDS_SubMesh* subMeshDS = 0;
TopoDS_Face F;
Handle(Geom_Surface) surface;
TopLoc_Location loc;
// No adjacent prisms. Select a variant with a best aspect ratio.
- double badness[2] = { 0, 0 };
+ double badness[2] = { 0., 0. };
static SMESH::Controls::NumericalFunctorPtr aspectRatio( new SMESH::Controls::AspectRatio);
const SMDS_MeshNode** nodes = vol.GetNodes();
for ( int variant = 0; variant < nbVariants; ++variant )
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
- MESSAGE( "::QuadToTri()" );
-
SMESHDS_Mesh * aMesh = GetMeshDS();
Handle(Geom_Surface) surface;
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
- MESSAGE( "::TriToQuad()" );
-
if ( !theCrit.get() )
return false;
if ( startElem ) {
// Get candidates to be fused
const SMDS_MeshElement *tr1 = startElem, *tr2 = 0, *tr3 = 0;
- const SMESH_TLink *link12, *link13;
+ const SMESH_TLink *link12 = 0, *link13 = 0;
startElem = 0;
ASSERT( mapEl_setLi.find( tr1 ) != mapEl_setLi.end() );
set< SMESH_TLink >& setLi = mapEl_setLi[ tr1 ];
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
- MESSAGE((theSmoothMethod==LAPLACIAN ? "LAPLACIAN" : "CENTROIDAL") << "--::Smooth()");
-
if ( theTgtAspectRatio < 1.0 )
theTgtAspectRatio = 1.0;
const size_t nbSteps,
SMESH_SequenceOfElemPtr& srcElements)
{
- //MESSAGE("sweepElement " << nbSteps);
SMESHDS_Mesh* aMesh = GetMeshDS();
const int nbNodes = elem->NbNodes();
// source elements for each generated one
SMESH_SequenceOfElemPtr srcElems, srcNodes;
- MESSAGE( "RotationSweep()");
gp_Trsf aTrsf;
aTrsf.SetRotation( theAxis, theAngle );
gp_Trsf aTrsf2;
const gp_Pnt& theRefPoint,
const bool theMakeGroups)
{
- MESSAGE("ExtrusionAlongTrack");
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
string groupPostfix;
switch ( theTrsf.Form() ) {
case gp_PntMirror:
- MESSAGE("gp_PntMirror");
needReverse = true;
groupPostfix = "mirrored";
break;
case gp_Ax1Mirror:
- MESSAGE("gp_Ax1Mirror");
groupPostfix = "mirrored";
break;
case gp_Ax2Mirror:
- MESSAGE("gp_Ax2Mirror");
needReverse = true;
groupPostfix = "mirrored";
break;
case gp_Rotation:
- MESSAGE("gp_Rotation");
groupPostfix = "rotated";
break;
case gp_Translation:
- MESSAGE("gp_Translation");
groupPostfix = "translated";
break;
case gp_Scale:
- MESSAGE("gp_Scale");
groupPostfix = "scaled";
break;
case gp_CompoundTrsf: // different scale by axis
- MESSAGE("gp_CompoundTrsf");
groupPostfix = "scaled";
break;
default:
- MESSAGE("default");
needReverse = false;
groupPostfix = "transformed";
}
void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes)
{
- MESSAGE("MergeNodes");
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
- MESSAGE("::SewFreeBorder()");
Sew_Error aResult = SEW_OK;
// ====================================
//const SMDS_MeshNode* faceNodes[ 4 ];
const SMDS_MeshNode* sideNode;
- const SMDS_MeshElement* sideElem;
+ const SMDS_MeshElement* sideElem = 0;
const SMDS_MeshNode* prevSideNode = theSideFirstNode;
const SMDS_MeshNode* prevBordNode = theBordFirstNode;
nBordIt = bordNodes.begin();
{
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();
+ int iPrevNode = 0, iNode = 0, nbNodes = elem->NbNodes();
vector< const SMDS_MeshNode* > faceNodes( nbNodes, (const SMDS_MeshNode*)0 );
bool isVolume = volume.Set( elem );
const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : & faceNodes[0];
}
// decide how to split a quadrangle: compare possible variants
// and choose which of splits to be a quadrangle
- int i1, i2, iSplit, nbSplits = nbLinkNodes - 1, iBestQuad;
+ int i1, i2, iSplit, nbSplits = nbLinkNodes - 1, iBestQuad = 0;
if ( nbFaceNodes == 3 ) {
iBestQuad = nbSplits;
i4 = i3;
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
- MESSAGE ("::::SewSideElements()");
if ( theSide1.size() != theSide2.size() )
return SEW_DIFF_NB_OF_ELEMENTS;
// get an element type and an iterator over elements
- SMDSAbs_ElementType type;
+ SMDSAbs_ElementType type = SMDSAbs_All;
SMDS_ElemIteratorPtr elemIt;
vector< const SMDS_MeshElement* > allElems;
if ( theElements.empty() )
TNodeNodeMap& theNodeNodeMap,
const bool theIsDoubleElem )
{
- MESSAGE("doubleNodes");
// iterate through element and duplicate them (by nodes duplication)
bool res = false;
std::vector<const SMDS_MeshNode*> newNodes;
bool SMESH_MeshEditor::DoubleNodes( const std::list< int >& theListOfNodes,
const std::list< int >& theListOfModifiedElems )
{
- MESSAGE("DoubleNodes");
myLastCreatedElems.Clear();
myLastCreatedNodes.Clear();
const SMDS_MeshElement* anElem = anElemToNodesIter->first;
vector<const SMDS_MeshNode*> aNodeArr = anElemToNodesIter->second;
if ( anElem )
- {
- MESSAGE("ChangeElementNodes");
+ {
aMeshDS->ChangeElementNodes( anElem, &aNodeArr[ 0 ], anElem->NbNodes() );
- }
+ }
}
return true;
continue;
gp_XYZ normal;
SMESH_MeshAlgos::FaceNormal( anElem, normal, /*normalized=*/true );
- MESSAGE("element " << ielem++ << " normal " << normal.X() << " " << normal.Y() << " " << normal.Z());
std::set<const SMDS_MeshNode*> nodesElem;
nodesElem.clear();
SMDS_ElemIteratorPtr nodeItr = anElem->nodesIterator();
std::set<const SMDS_MeshNode*>::iterator nodit = nodesElem.begin();
for (; nodit != nodesElem.end(); nodit++)
{
- MESSAGE(" noeud ");
const SMDS_MeshNode* aNode = *nodit;
if ( !aNode || theNodesNot.find(aNode) != theNodesNot.end() )
continue;
SMDS_ElemIteratorPtr backElemItr = aNode->GetInverseElementIterator();
while ( backElemItr->more() )
{
- MESSAGE(" backelem ");
const SMDS_MeshElement* curElem = backElemItr->next();
if (alreadyCheckedElems.find(curElem) != alreadyCheckedElems.end())
continue;
p.SetCoord( x/nb -aNode->X(),
y/nb -aNode->Y(),
z/nb -aNode->Z() );
- MESSAGE(" check " << p.X() << " " << p.Y() << " " << p.Z());
if (normal*p > 0)
{
- MESSAGE(" --- inserted")
theAffectedElems.insert( curElem );
}
else if (curElem->GetType() == SMDSAbs_Edge)
}
if (onside)
{
- MESSAGE(" --- edge onside inserted")
theAffectedElems.insert(anEdge);
}
}
int ielem;
for ( ielem = 1; elemItr != theElems.end(); ++elemItr )
{
- MESSAGE("element " << ielem++);
SMDS_MeshElement* anElem = (SMDS_MeshElement*)*elemItr;
if (!anElem)
continue;
SMDS_ElemIteratorPtr nodeItr = anElem->nodesIterator();
while ( nodeItr->more() )
{
- MESSAGE(" noeud ");
const SMDS_MeshNode* aNode = cast2Node(nodeItr->next());
if ( !aNode || theNodesNot.find(aNode) != theNodesNot.end() )
continue;
SMDS_ElemIteratorPtr backElemItr = aNode->GetInverseElementIterator();
while ( backElemItr->more() )
{
- MESSAGE(" backelem ");
const SMDS_MeshElement* curElem = backElemItr->next();
if ( curElem && theElems.find(curElem) == theElems.end() &&
( bsc3d.get() ?
*/
double SMESH_MeshEditor::OrientedAngle(const gp_Pnt& p0, const gp_Pnt& p1, const gp_Pnt& g1, const gp_Pnt& g2)
{
-// MESSAGE(" p0: " << p0.X() << " " << p0.Y() << " " << p0.Z());
-// MESSAGE(" p1: " << p1.X() << " " << p1.Y() << " " << p1.Z());
-// MESSAGE(" g1: " << g1.X() << " " << g1.Y() << " " << g1.Z());
-// MESSAGE(" g2: " << g2.X() << " " << g2.Y() << " " << g2.Z());
gp_Vec vref(p0, p1);
gp_Vec v1(p0, g1);
gp_Vec v2(p0, g2);