From: skv Date: Thu, 3 Jul 2014 09:47:17 +0000 (+0400) Subject: 0052436: MakePipeWithDifferentsSections does not work correctly X-Git-Tag: V7_5_0a1~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b5261a981848dacc6b428a95d0e7731ebb8fdc91;p=modules%2Fgeom.git 0052436: MakePipeWithDifferentsSections does not work correctly --- diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx index af4f40df9..3f0f0c986 100644 --- a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx @@ -681,6 +681,7 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections TopTools_SequenceOfShape aSeqBases; TopTools_SequenceOfShape aSeqLocs; TopTools_SequenceOfShape aSeqFaces; + Standard_Boolean NeedCreateSolid = Standard_False; Standard_Integer i = 1; for (i = 1; i <= nbBases; i++) { @@ -697,7 +698,6 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections //if for section was specified face with a few wires then a few // pipes were build and make solid - Standard_Boolean NeedCreateSolid = Standard_False; if (aTypeBase == TopAbs_SHELL) { // create wire as boundary contour if shell is no closed // get free boundary shapes @@ -1015,21 +1015,21 @@ TopoDS_Shape GEOMImpl_PipeDriver::CreatePipeWithDifferentSections aBuilder.SetTolerance(aTolConf, aTolConf, aTolAng); aBuilder.Build(); + + Standard_Boolean isDone = aBuilder.IsDone(); + + if (isDone && NeedCreateSolid) { + isDone = aBuilder.MakeSolid(); + } + + if (!isDone) { + Standard_ConstructionError::Raise("Pipe construction failure"); + } aShape = aBuilder.Shape(); aSeqFaces.Append(aShape); for (j = 1; j <=usedBases.Length(); j++) aBuilder.Delete(usedBases.Value(j)); } - - //for case if section is face - if (aSeqFaces.Length() >1) { - BRep_Builder aB; - TopoDS_Compound aComp; - aB.MakeCompound(aComp); - for (i = 1; i <= aSeqFaces.Length(); i++) - aB.Add(aComp,aSeqFaces.Value(i)); - aShape = aComp; - } } return aShape; diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx index e9ead7a40..edcbec331 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx @@ -165,6 +165,8 @@ void GenerationGUI_PipeDlg::Init() connect(GroupMakePoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupMakePoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupMakePoints->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupMakePoints->CheckBox1, SIGNAL(clicked()), this, SLOT(processPreview())); + connect(GroupMakePoints->CheckBox2, SIGNAL(clicked()), this, SLOT(processPreview())); initName(tr("GEOM_PIPE")); resize(100,100); @@ -264,10 +266,7 @@ bool GenerationGUI_PipeDlg::ClickOnApply() return false; initName(); - if ( getConstructorId() != 1 ) - ConstructorsClicked( getConstructorId() ); - // activate selection and connect selection manager - // GroupPoints->PushButton1->click(); + return true; }