From: gdd Date: Mon, 26 Apr 2010 09:21:00 +0000 (+0000) Subject: Correct help page name X-Git-Tag: V5_1_4rc1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=597d9e3d7f8e724c1ef94e83442dcbbbc7a59107;p=modules%2Fgeom.git Correct help page name Remove std::cerr lines --- diff --git a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx index aa71214dc..846a34a28 100644 --- a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx @@ -159,7 +159,7 @@ AdvancedGUI_PipeTShapeDlg::AdvancedGUI_PipeTShapeDlg(GeometryGUI* theGeometryGUI myMainLayout->addWidget(JunctionPointsSel, rowNewPosVal, colNewPosVal, rowspanNewPosVal, colspanNewPosVal); /***************************************************************/ - setHelpFileName("create__pipetshape__page.html"); + setHelpFileName("create_pipetshape_page.html"); Init(); } @@ -784,24 +784,16 @@ bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var th // SetErrorCode("Junctions points P2 and P3 are identical"); return false; } -// std::cerr << "theL1: " << theL1 << std::endl; -// std::cerr << "theL2: " << theL2 << std::endl; -// std::cerr << "d12: " << d12 << std::endl; -// std::cerr << "d13: " << d13 << std::endl; -// std::cerr << "d23: " << d23 << std::endl; long double newL1 = 0.5 * d12; long double newL2 = sqrt(pow(d13,2)-pow(newL1,2)); JunctionPointsSel->LineEdit4->setText(QString::number(newL1,'f',7)); JunctionPointsSel->LineEdit5->setText(QString::number(newL2,'f',7)); -// std::cerr << "newL1: " << newL1 << std::endl; -// std::cerr << "newL2: " << newL2 << std::endl; if (fabs(newL1 - theL1) > Precision::Approximation()) { if ((newL1 * (1 - theTolerance) - theL1 <= Precision::Approximation()) && (newL1 * (1 + theTolerance) - theL1 >= Precision::Approximation())) { -// std::cerr << "theL1 = newL1" << std::endl; disconnect(MainTubeGroupParams->SpinBox_DZ, 0, this, 0); MainTubeGroupParams->SpinBox_DZ->setValue(newL1); connect(MainTubeGroupParams->SpinBox_DZ, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double))); @@ -820,11 +812,9 @@ bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var th JunctionPointsSel->PushButton4->setStyleSheet(CssNormal); } -// std::cerr << "fabs(newL2 - theL2) = " << fabs(newL2 - theL2) << std::endl; if (fabs(newL2 - theL2) > Precision::Approximation()) { if ((newL2 * (1 - theTolerance) - theL2 <= Precision::Approximation()) && (newL2 * (1 + theTolerance) - theL2 >= Precision::Approximation())) { -// std::cerr << "theL2 = newL2" << std::endl; disconnect(IncidentTubeGroupParams->SpinBox_DZ, 0, this, 0); IncidentTubeGroupParams->SpinBox_DZ->setValue(newL2); connect(IncidentTubeGroupParams->SpinBox_DZ, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double))); @@ -961,7 +951,6 @@ void AdvancedGUI_PipeTShapeDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy, S ObjectList::iterator it = pipeTShapeGroupObjects.begin(); for (int i = 0; it != pipeTShapeGroupObjects.end(); it++, i++) { - // std::cerr << "Add group " << (*it)->GetName() << std::endl; getGeomEngine()->AddInStudy(theStudy, (*it), tr((*it)->GetName()).toStdString().c_str(), theFather); } diff --git a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx index b1741c923..86718bcf5 100644 --- a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx @@ -812,7 +812,7 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(/*std::vectorGetShapesOnCylinder(theShape, TopAbs_VERTEX, Vector_Z, theVertCylinderRadius, GEOMAlgo_ST_ONIN); if (extremVertices.IsNull() || extremVertices->Length() == 0) { - std::cerr << "extremVertices.IsNull() || extremVertices->Length() == 0" << std::endl; +// std::cerr << "extremVertices.IsNull() || extremVertices->Length() == 0" << std::endl; if (theRF == 0) SetErrorCode("Vertices on chamfer not found"); else @@ -1248,7 +1248,7 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapeMirrorAndGlue(/*std::vectorComputeFunction(aFunction)) { -// SetErrorCode("TShape driver failed"); - std::cerr << "TShape driver failed" << std::endl; + SetErrorCode("TShape driver failed"); +// MESSAGE("TShape driver failed"); return NULL; } // std::cerr << "aShape->GetName(): " << aShape->GetName() << std::endl; @@ -1445,14 +1445,14 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap theOperations.push_back(aTransformOperations); if (theHexMesh) { - std::cerr << "Creating partition" << std::endl; +// std::cerr << "Creating partition" << std::endl; if (!MakePipeTShapePartition(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2)) return NULL; - std::cerr << "Done" << std::endl; - std::cerr << "Creating mirrors and glue" << std::endl; +// std::cerr << "Done" << std::endl; +// std::cerr << "Creating mirrors and glue" << std::endl; if (!MakePipeTShapeMirrorAndGlue(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2)) return NULL; - std::cerr << "Done" << std::endl; +// std::cerr << "Done" << std::endl; } TopoDS_Shape Te = aShape->GetValue(); @@ -1604,29 +1604,22 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap box_e->GetLastFunction()->SetDescription(""); if (edges_e.IsNull() || edges_e->Length() == 0) { -// std::cerr << "Internal edges not found" << std::endl; SetErrorCode("External edges not found"); return false; } -// std::cerr << "External edges found" << std::endl; int nbEdgesInChamfer = 0; std::list theEdges; for (int i=1; i<=edges_e->Length();i++) { -// Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(edges_e->Value(i)); -// anObj->GetLastFunction()->SetDescription(""); int edgeID = edges_e->Value(i); -// std::cerr << "Edge #" << edgeID << std::endl; TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID); TopExp_Explorer Ex(theEdge,TopAbs_VERTEX); int iv=0; while (Ex.More()) { iv ++; gp_Pnt aPt = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current())); -// std::cerr << "Vertex #" << iv << ": aPt.Z() - (theR1+theW1) = " << aPt.Z() - (theR1+theW1) << std::endl; if (Abs(aPt.Z() - (theR1+theW1)) <= Precision::Confusion()) { nbEdgesInChamfer ++; theEdges.push_back(edgeID); -// std::cerr << "Edge #" << edgeID << " added" << std::endl; } Ex.Next(); } @@ -1652,61 +1645,60 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap aFunction->SetValue(aChamferShape); // END of chamfer - bool doMesh = false; + // bool doMesh = false; if (theHexMesh) { - doMesh = true; - std::cerr << "Creating partition" << std::endl; +// doMesh = true; if (!MakePipeTShapePartition(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, 0, false)) { - std::cerr << "PipeTShape partition failed" << std::endl; - doMesh = false; -// return NULL; + MESSAGE("PipeTShape partition failed"); +// doMesh = false; + return NULL; } - std::cerr << "Done" << std::endl; - std::cerr << "Creating mirrors and glue" << std::endl; if (!MakePipeTShapeMirrorAndGlue(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2)) { - std::cerr << "PipeTShape mirrors and glue failed" << std::endl; - doMesh = false; -// return NULL; + MESSAGE("PipeTShape mirrors and glue failed"); +// doMesh = false; + return NULL; } - std::cerr << "Done" << std::endl; } Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient; aSeq->Append(aShape); - if (doMesh) { +// if (doMesh) { + if (theHexMesh) { // // Get the groups: BEGIN // - if (!MakeGroups(/*theOperations, */aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, gp_Trsf())) { - //Make a Python command - GEOM::TPythonDump(aFunction) << "[" << aShape << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1 - << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW - << ", " << theHexMesh << ")"; -// return NULL; - } - else { - TCollection_AsciiString aListRes, anEntry; - // Iterate over the sequence aSeq - Standard_Integer aNbGroups = aSeq->Length(); - Standard_Integer i = 2; - for (; i <= aNbGroups; i++) { - Handle(Standard_Transient) anItem = aSeq->Value(i); - if (anItem.IsNull()) continue; - Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem); - if (aGroup.IsNull()) continue; - //Make a Python command - TDF_Tool::Entry(aGroup->GetEntry(), anEntry); - aListRes += anEntry + ", "; - } - - aListRes.Trunc(aListRes.Length() - 2); - - //Make a Python command - GEOM::TPythonDump(aFunction) << "[" << aShape << ", " << aListRes.ToCString() - << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2 - << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW << ", " << theHexMesh << ")"; - } +// if (!MakeGroups(/*theOperations, */aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, gp_Trsf())) { +// //Make a Python command +// GEOM::TPythonDump(aFunction) << "[" << aShape << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1 +// << ", " << theL1 << ", " << theR2 << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW +// << ", " << theHexMesh << ")"; +// } +// else { + if (!MakeGroups(/*theOperations, */aShape, TSHAPE_CHAMFER, theR1, theW1, theL1, theR2, theW2, theL2, aSeq, gp_Trsf())) + return NULL; + + TCollection_AsciiString aListRes, anEntry; + // Iterate over the sequence aSeq + Standard_Integer aNbGroups = aSeq->Length(); + Standard_Integer i = 2; + for (; i <= aNbGroups; i++) { + Handle(Standard_Transient) anItem = aSeq->Value(i); + if (anItem.IsNull()) continue; + Handle(GEOM_Object) aGroup = Handle(GEOM_Object)::DownCast(anItem); + if (aGroup.IsNull()) continue; + //Make a Python command + TDF_Tool::Entry(aGroup->GetEntry(), anEntry); + aListRes += anEntry + ", "; + } + + aListRes.Trunc(aListRes.Length() - 2); + + //Make a Python command + GEOM::TPythonDump(aFunction) << "[" << aShape << ", " << aListRes.ToCString() + << "] = geompy.MakePipeTShapeChamfer(" << theR1 << ", " << theW1 << ", " << theL1 << ", " << theR2 + << ", " << theW2 << ", " << theL2 << ", " << theH << ", " << theW << ", " << theHexMesh << ")"; + // } } // // Get the groups: END @@ -1826,16 +1818,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap box_e->GetLastFunction()->SetDescription(""); if (edges_e.IsNull() || edges_e->Length() == 0) { -// std::cerr << "Internal edges not found" << std::endl; SetErrorCode("External edges not found"); return false; } -// std::cerr << "External edges found" << std::endl; int nbEdgesInChamfer = 0; std::list theEdges; for (int i=1; i<=edges_e->Length();i++) { -// Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(edges_e->Value(i)); -// anObj->GetLastFunction()->SetDescription(""); int edgeID = edges_e->Value(i); TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID); TopExp_Explorer Ex(theEdge,TopAbs_VERTEX); @@ -1870,14 +1858,10 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap // END of chamfer if (theHexMesh) { - std::cerr << "Creating partition" << std::endl; if (!MakePipeTShapePartition(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, 0, false)) return NULL; - std::cerr << "Done" << std::endl; - std::cerr << "Creating mirrors and glue" << std::endl; if (!MakePipeTShapeMirrorAndGlue(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2)) return NULL; - std::cerr << "Done" << std::endl; } TopoDS_Shape Te = aShape->GetValue(); @@ -2024,16 +2008,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap box_e->GetLastFunction()->SetDescription(""); if (edges_e.IsNull() || edges_e->Length() == 0) { -// std::cerr << "Internal edges not found" << std::endl; SetErrorCode("External edges not found"); return false; } -// std::cerr << "External edges found" << std::endl; int nbEdgesInFillet = 0; std::list theEdges; for (int i=1; i<=edges_e->Length();i++) { -// Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(edges_e->Value(i)); -// anObj->GetLastFunction()->SetDescription(""); int edgeID = edges_e->Value(i); TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID); TopExp_Explorer Ex(theEdge,TopAbs_VERTEX); @@ -2069,14 +2049,10 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap // END of fillet if (theHexMesh) { - std::cerr << "Creating partition" << std::endl; if (!MakePipeTShapePartition(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2, 0, 0, theRF, false)) return NULL; - std::cerr << "Done" << std::endl; - std::cerr << "Creating mirrors and glue" << std::endl; if (!MakePipeTShapeMirrorAndGlue(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2)) return NULL; - std::cerr << "Done" << std::endl; } Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient; @@ -2227,16 +2203,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap box_e->GetLastFunction()->SetDescription(""); if (edges_e.IsNull() || edges_e->Length() == 0) { -// std::cerr << "Internal edges not found" << std::endl; SetErrorCode("External edges not found"); return false; } -// std::cerr << "External edges found" << std::endl; int nbEdgesInFillet = 0; std::list theEdges; for (int i=1; i<=edges_e->Length();i++) { -// Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(edges_e->Value(i)); -// anObj->GetLastFunction()->SetDescription(""); int edgeID = edges_e->Value(i); TopoDS_Shape theEdge = anEdgesIndices.FindKey(edgeID); TopExp_Explorer Ex(theEdge,TopAbs_VERTEX); @@ -2272,14 +2244,10 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap // END of fillet if (theHexMesh) { - std::cerr << "Creating partition" << std::endl; if (!MakePipeTShapePartition(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2, 0, 0, theRF, false)) return NULL; - std::cerr << "Done" << std::endl; - std::cerr << "Creating mirrors and glue" << std::endl; if (!MakePipeTShapeMirrorAndGlue(/*theOperations, */aShape, theR1, theW1, theL1, theR2, theW2, theL2)) return NULL; - std::cerr << "Done" << std::endl; } TopoDS_Shape Te = aShape->GetValue(); diff --git a/src/GEOMImpl/GEOMImpl_PipeTShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeTShapeDriver.cxx index 4b5747870..05e83c04a 100644 --- a/src/GEOMImpl/GEOMImpl_PipeTShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PipeTShapeDriver.cxx @@ -153,10 +153,8 @@ GEOMImpl_PipeTShapeDriver::GetShapesOnBoxIDs(const TopoDS_Shape& aBox, TopTools_ListIteratorOfListOfShape itSub (listSS); for (int index = 1; itSub.More(); itSub.Next(), ++index) { int id = anIndices.FindIndex(itSub.Value()); - std::cerr << "Shape with ID " << id << " found" << std::endl; -// TopoDS_Shape s = anIndices.FindKey(id); +// std::cerr << "Shape with ID " << id << " found" << std::endl; aSeqOfIDs->Append(id); -// aSeqOfIDs->Append(itSub.Value()); } return aSeqOfIDs; @@ -288,9 +286,9 @@ void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& t // # Search in theShape for common shape of type theShapeType on the intersection of 2 pipes found = false; for (int i=1; i<=aSeqExt2->Length();i++) { - std::cerr << "aSeqExt2->Value(i): " << aSeqExt2->Value(i) << std::endl; +// std::cerr << "aSeqExt2->Value(i): " << aSeqExt2->Value(i) << std::endl; for (int j=1; j<=aSeqExt1->Length();j++) { - std::cerr << "aSeqExt1->Value(j): " << aSeqExt1->Value(j) << std::endl; +// std::cerr << "aSeqExt1->Value(j): " << aSeqExt1->Value(j) << std::endl; if (aSeqExt1->Value(j) == aSeqExt2->Value(i)) { myID = aSeqExt1->Value(j); commonShapes->Append(aMapOfShapes.FindKey(myID)); @@ -412,14 +410,10 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons double aR2Ext = aData.GetR2() + aData.GetW2(); if (aData.GetR2() > aData.GetR1() + epsilon) { - std::cerr << "aData.GetR1(): " << aData.GetR1() << std::endl; - std::cerr << "aData.GetR2(): " << aData.GetR2() << std::endl; StdFail_NotDone::Raise("TShape cannot be computed if R2 > R1"); } if (aR2Ext > aR1Ext + epsilon) { - std::cerr << "aR1Ext: " << aR1Ext << std::endl; - std::cerr << "aR2Ext: " << aR2Ext << std::endl; StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 > R1+W1"); } @@ -431,10 +425,6 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons StdFail_NotDone::Raise("TShape with fillet cannot be computed if R2+W2 = R1+W1"); // internal radius are different => not possible if (fabs(aData.GetR2() - aData.GetR1()) > epsilon) { - std::cerr << "R1Ext: " << aR1Ext << std::endl; - std::cerr << "R2Ext: " << aR2Ext << std::endl; - std::cerr << "R1: " << aData.GetR1() << std::endl; - std::cerr << "R2: " << aData.GetR2() << std::endl; StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 = R1+W1 and R2 != R1"); } } @@ -449,10 +439,6 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons if (aType == TSHAPE_CHAMFER) { if (aData.GetH() >= (aData.GetL2() - aR1Ext + epsilon)) { - std::cerr << "H: " << aData.GetH() << std::endl; - std::cerr << "L2: " << aData.GetL2() << std::endl; - std::cerr << "R1Ext: " << aR1Ext << std::endl; - std::cerr << "aData.GetL2() - aR1Ext: " << aData.GetL2() - aR1Ext << std::endl; StdFail_NotDone::Raise("TShape cannot be computed: height of chamfer is too high"); } @@ -468,13 +454,13 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons if (hexMesh) { // Create a quarter of a basic T-Shape pipe - std::cerr << "Create a quarter of a basic T-Shape pipe" << std::endl; +// std::cerr << "Create a quarter of a basic T-Shape pipe" << std::endl; Te4 = MakeQuarterPipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(), aData.GetR2(), aData.GetW2(), aData.GetL2()); } else { // No need to cut pipe t-shape - std::cerr << "Create a basic T-Shape pipe" << std::endl; +// std::cerr << "Create a basic T-Shape pipe" << std::endl; Te4 = MakePipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(), aData.GetR2(), aData.GetW2(), aData.GetL2()); }