From a33055ee5bbad57c2c01ec47a8aca5322566c1f0 Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 4 Jul 2012 10:00:00 +0000 Subject: [PATCH] Mantis issue 0021682: EDF 2224 : T-shape fails with specific values --- src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx index 7c415bc08..1ede66bc7 100644 --- a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx @@ -56,8 +56,10 @@ #include #include #include + #include #include + #include #include @@ -757,13 +759,13 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t break; } Handle(GEOM_Object) edge_e1, edge_e2; - + edge_e1 = myBasicOperations->MakeLineTwoPnt(ve1, vi1); if (edge_e1.IsNull()) { SetErrorCode("Edge 1 could not be built"); return false; } - + edge_e2 = myBasicOperations->MakeLineTwoPnt(ve2, vi2); if (edge_e2.IsNull()) { SetErrorCode("Edge 2 could not be built"); @@ -790,7 +792,7 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t return false; } face_t->GetLastFunction()->SetDescription(""); - + theShapes.push_back(theShape); theShapes.push_back(vi1); theShapes.push_back(vi2); @@ -996,7 +998,10 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t //wire_t2->GetLastFunction()->SetDescription(""); // std::cerr << "Creating face 2" << std::endl; //face_t2 = myShapesOperations->MakeFace(wire_t2, false); - face_t2 = my3DPrimOperations->MakePrismVecH(edge_chan_inc, Cote_4, - 2.0*theR2); + + // Mantis issue 0021682 + face_t2 = my3DPrimOperations->MakePrismVecH(edge_chan_inc, Cote_4, - (theR2 + theW2)); + //face_t2 = my3DPrimOperations->MakePrismVecH(edge_chan_inc, Cote_4, - 2.0*theR2); if (face_t2.IsNull()) { SetErrorCode("Impossible to build face"); return false; @@ -1025,9 +1030,10 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t Handle(TColStd_HSequenceOfTransient) theKeepInside = new TColStd_HSequenceOfTransient; Handle(TColStd_HSequenceOfTransient) theRemoveInside = new TColStd_HSequenceOfTransient; Handle(TColStd_HArray1OfInteger) theMaterials; + partitionShapes->Append(theShape); theTools->Append(aPlnOZ); - if (Abs(aR1Ext - aR2Ext) > Precision::Confusion() ) + if (Abs(aR1Ext - aR2Ext) > Precision::Confusion()) theTools->Append(aPlnOXZ); theTools->Append(face_t); if (!isNormal) @@ -1048,7 +1054,7 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t SetErrorCode("TShape is not a compound of block"); return false; } - + // // BEGIN Compound of created shapes - Only for debug purpose // theShapes.clear(); // theShapes.push_back(theShape); @@ -1058,12 +1064,12 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(Handle(GEOM_Object) t // theShapes.push_back(face_t); // if (!isNormal) // theShapes.push_back(face_t2); -// +// // Handle(GEOM_Object) aCompound = myShapesOperations->MakeCompound(theShapes); // TopoDS_Shape aCompoundShape = aCompound->GetValue(); // theShape->GetLastFunction()->SetValue(aCompoundShape); // // END Compound of created shapes - Only for debug purpose - + TopoDS_Shape aShape = Te3->GetValue(); theShape->GetLastFunction()->SetValue(aShape); } catch (Standard_Failure) { -- 2.39.2