X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMImpl%2FGEOMImpl_GlueDriver.cxx;h=1f03275c5a6da57af76f42aaa621f16523b4a4f3;hb=05e07e916e0cf63eb380ebc85c192d9831100e82;hp=cd6235466f679186621aa693d3d531e4f015f8e6;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx index cd6235466..1f03275c5 100644 --- a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include #include @@ -28,22 +29,26 @@ #include #include -#include -#include "GEOMAlgo_Gluer1.hxx" +#include "GEOMAlgo_Gluer2.hxx" #include "GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx" #include "GEOMAlgo_CoupleOfShapes.hxx" #include "GEOMAlgo_ListOfCoupleOfShapes.hxx" +#include + #include "utilities.h" #include #include #include -#include +#include #include +#include #include +#include + #include #include @@ -72,6 +77,7 @@ const Standard_GUID& GEOMImpl_GlueDriver::GetID() //function : GlueFacesWithWarnings //purpose : //======================================================================= +/* TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesWithWarnings (const TopoDS_Shape& theShape, const Standard_Real theTolerance, const Standard_Boolean doKeepNonSolids, @@ -146,6 +152,12 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesWithWarnings (const TopoDS_Shape& the aRes = aGluer.Result(); + // SKL 18.01.2010 - patch for 20662 + Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aRes); + aSfs->SetPrecision(Precision::Confusion()); + aSfs->Perform(); + aRes = aSfs->Shape(); + // Fill history to be used by GetInPlace functionality TopTools_IndexedMapOfShape aResIndices; TopExp::MapShapes(aRes, aResIndices); @@ -194,7 +206,6 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesWithWarnings (const TopoDS_Shape& the return aRes; } - //======================================================================= //function : GlueFaces //purpose : @@ -203,7 +214,6 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape, const Standard_Real theTolerance, const Standard_Boolean doKeepNonSolids) { - Standard_Integer iErr, iWrn; TopoDS_Shape aRes; GEOMAlgo_Gluer aGluer; @@ -214,7 +224,7 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape, aGluer.Perform(); - iErr = aGluer.ErrorStatus(); + Standard_Integer iErr = aGluer.ErrorStatus(); if (iErr) { switch (iErr) { case 2: @@ -241,7 +251,7 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape, return aRes; } - iWrn = aGluer.WarningStatus(); + Standard_Integer iWrn = aGluer.WarningStatus(); if (iWrn) { switch (iWrn) { case 1: @@ -259,15 +269,14 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape, return aRes; } - //======================================================================= //function : GlueFacesByList //purpose : //======================================================================= TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesByList (const TopoDS_Shape& theShape, - const Standard_Real theTolerance, + const Standard_Real theTolerance, const Standard_Boolean doKeepNonSolids, - const TopTools_MapOfShape& aFaces) + const TopTools_MapOfShape& aFaces) { TopoDS_Shape aRes; @@ -291,14 +300,14 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesByList (const TopoDS_Shape& theShape, const GEOMAlgo_CoupleOfShapes& aCSG = aItCS.Value(); const TopoDS_Shape& aF1 = aCSG.Shape1(); const TopoDS_Shape& aF2 = aCSG.Shape2(); - if( aFaces.Contains(aF1) || aFaces.Contains(aF2) ) + if (aFaces.Contains(aF1) || aFaces.Contains(aF2)) continue; aCS.SetShapes(aF1,aF2); aLCS.Append(aCS); } //cout<<"aLCS.Extent() = "<0) { + if (aLCS.Extent()>0) { aGluer.SetFacesToUnglue(aLCS); aGluer.UnglueFaces(); iErr = aGluer.ErrorStatus(); @@ -309,7 +318,401 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesByList (const TopoDS_Shape& theShape, return aRes; } +*/ + +//======================================================================= +//function : GlueFaces +//purpose : +//======================================================================= +TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape, + const Standard_Real theTolerance, + const Standard_Boolean doKeepNonSolids) +{ + TopoDS_Shape aRes; + + GEOMAlgo_Gluer2 aGA; + + // 1. Initialization + aGA.SetArgument(theShape); + aGA.SetTolerance(theTolerance); + aGA.SetKeepNonSolids(doKeepNonSolids); + + // 2. Detect interferred shapes + aGA.Detect(); + + //Standard_Integer iWrnDetect = aGA.WarningStatus(); + //if (iWrnDetect == 2) { + // Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES"); + //} + + Standard_Integer iErr = aGA.ErrorStatus(); + if (iErr) { + switch (iErr) { + case 11: + Standard_Failure::Raise("GEOMAlgo_GlueDetector failed"); + break; + case 13: + case 14: + Standard_Failure::Raise("PerformImagesToWork failed"); + break; + default: + { + // description of all errors see in GEOMAlgo_Gluer2.cxx + TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code "); + aMsg += TCollection_AsciiString(iErr); + Standard_Failure::Raise(aMsg.ToCString()); + break; + } + } + return aRes; + } + + // 3. Set shapes to glue. If the operator is absent, the whole gluing will be done + //aGA.SetShapesToGlue(aMSG); + + // 4. Gluing + aGA.Perform(); + iErr = aGA.ErrorStatus(); + if (iErr) { + switch (iErr) { + case 11: + Standard_Failure::Raise("GEOMAlgo_GlueDetector failed"); + break; + case 13: + case 14: + Standard_Failure::Raise("PerformImagesToWork failed"); + break; + default: + { + // description of all errors see in GEOMAlgo_Gluer2.cxx + TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code "); + aMsg += TCollection_AsciiString(iErr); + Standard_Failure::Raise(aMsg.ToCString()); + break; + } + } + return aRes; + } + + Standard_Integer iWrn = aGA.WarningStatus(); + if (iWrn) { + switch (iWrn) { + case 1: + MESSAGE("No shapes to glue"); + break; + default: + // description of all warnings see in GEOMAlgo_Gluer2.cxx + MESSAGE("Warning in GEOMAlgo_Gluer2 with code " << iWrn); + break; + } + } + + // 5. Result + aRes = aGA.Shape(); + + return aRes; +} + +//======================================================================= +//function : GlueWithWarnings +//purpose : +//======================================================================= +TopoDS_Shape GEOMImpl_GlueDriver::GlueWithWarnings (const TopoDS_Shape& theShape, + const Standard_Real theTolerance, + const TopAbs_ShapeEnum theShapeType, + const Standard_Boolean doKeepNonSolids, + TCollection_AsciiString& theWarning) const +{ + TopoDS_Shape aRes; + + GEOMAlgo_Gluer2 aGA; + + // 1. Initialization + aGA.SetArgument(theShape); + aGA.SetTolerance(theTolerance); + aGA.SetKeepNonSolids(doKeepNonSolids); + + // 2. Detect interferred shapes + aGA.Detect(); + + //modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f + Standard_Integer iWrnDetect = aGA.WarningStatus(); + if (iWrnDetect == 2) { + Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES"); + } + //modified by NIZNHY-PKV Tue Mar 13 14:07:14 2012t + + Standard_Integer iErr = aGA.ErrorStatus(); + if (iErr) { + switch (iErr) { + case 11: + Standard_Failure::Raise("GEOMAlgo_GlueDetector failed"); + break; + case 13: + case 14: + Standard_Failure::Raise("PerformImagesToWork failed"); + break; + default: + { + // description of all errors see in GEOMAlgo_Gluer2.cxx + TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code "); + aMsg += TCollection_AsciiString(iErr); + Standard_Failure::Raise(aMsg.ToCString()); + break; + } + } + return aRes; + } + + if (theShapeType != TopAbs_FACE) { + // 3. Fill shapes to glue aMSG + TopTools_DataMapOfShapeListOfShape aMSG; + const TopTools_DataMapOfShapeListOfShape& aMSD = aGA.ShapesDetected(); + TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSD; + aItMSD.Initialize(aMSD); + for (; aItMSD.More(); aItMSD.Next()) { + const TopoDS_Shape& aSx = aItMSD.Key(); + const TopTools_ListOfShape& aLSD = aItMSD.Value(); + if (aSx.ShapeType() == theShapeType) { + aMSG.Bind(aSx, aLSD); + } + } + + // 4. Set shapes to glue. If the operator is absent, the whole gluing will be done + aGA.SetShapesToGlue(aMSG); + } + + // 5. Gluing + aGA.Perform(); + iErr = aGA.ErrorStatus(); + if (iErr) { + switch (iErr) { + case 11: + Standard_Failure::Raise("GEOMAlgo_GlueDetector failed"); + break; + case 13: + case 14: + Standard_Failure::Raise("PerformImagesToWork failed"); + break; + default: + { + // description of all errors see in GEOMAlgo_Gluer2.cxx + TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code "); + aMsg += TCollection_AsciiString(iErr); + Standard_Failure::Raise(aMsg.ToCString()); + break; + } + } + return aRes; + } + + Standard_Integer iWrn = aGA.WarningStatus(); + if (iWrn) { + switch (iWrn) { + case 1: + theWarning = "No shapes to glue"; + break; + default: + // description of all warnings see in GEOMAlgo_Gluer2.cxx + theWarning = "Warning in GEOMAlgo_Gluer2 with code "; + theWarning += TCollection_AsciiString(iWrn); + break; + } + } + + // 6. Result + aRes = aGA.Shape(); + + // 7. Fill history to be used by GetInPlace functionality + TopTools_IndexedMapOfShape aResIndices; + TopExp::MapShapes(aRes, aResIndices); + + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + // history for all argument shapes + TDF_LabelSequence aLabelSeq; + aFunction->GetDependency(aLabelSeq); + Standard_Integer nbArg = aLabelSeq.Length(); + + for (Standard_Integer iarg = 1; iarg <= nbArg; iarg++) { + + TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg); + + Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel); + TopoDS_Shape anArgumentShape = anArgumentObject->GetValue(); + + TopTools_IndexedMapOfShape anArgumentIndices; + TopExp::MapShapes(anArgumentShape, anArgumentIndices); + Standard_Integer nbArgumentEntities = anArgumentIndices.Extent(); + + // Find corresponding label in history + TDF_Label anArgumentHistoryLabel = + aFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_True); + + for (Standard_Integer ie = 1; ie <= nbArgumentEntities; ie++) { + TopoDS_Shape anEntity = anArgumentIndices.FindKey(ie); + const TopTools_ListOfShape& aModified = aGA.Modified(anEntity); + Standard_Integer nbModified = aModified.Extent(); + + if (nbModified > 0) { + TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(ie, Standard_True); + Handle(TDataStd_IntegerArray) anAttr = + TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified); + + TopTools_ListIteratorOfListOfShape itM (aModified); + for (int im = 1; itM.More(); itM.Next(), ++im) { + int id = aResIndices.FindIndex(itM.Value()); + anAttr->SetValue(im, id); + } + } + } + } + + return aRes; +} +//======================================================================= +//function : GlueByList +//purpose : +//======================================================================= +TopoDS_Shape GEOMImpl_GlueDriver::GlueByList (const TopoDS_Shape& theShape, + const Standard_Real theTolerance, + const Standard_Boolean doKeepNonSolids, + const TopTools_MapOfShape& theShapesList, + const Standard_Boolean doGlueAllEdges) +{ + TopoDS_Shape aRes; + + GEOMAlgo_Gluer2 aGA; + + // 1. Initialization + aGA.SetArgument(theShape); + aGA.SetTolerance(theTolerance); + aGA.SetKeepNonSolids(doKeepNonSolids); + + // 2. Detect interferred shapes + aGA.Detect(); + + //modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f + Standard_Integer iWrnDetect = aGA.WarningStatus(); + if (iWrnDetect == 2) { + /* + TopTools_ListIteratorOfListOfShape aItLS; + + // Sticked shapes are detected + const TopTools_IndexedDataMapOfShapeListOfShape& aIDMSS = pGluer2->StickedShapes(); + + Standard_Integer i, aNb = aIDMSS.Extent(); + for (i = 1; i <= aNb; ++i) { + // ancestor aSa (edge, wire face,..) + const TopoDS_Shape& aSa = aIDMSS.FindKey(i); + + // successors aSs (vertex, edge, ...) + // of the ancestor that are sticked + // for given value of the tolerance + const TopTools_ListOfShape& aLSS = aIDMSS.FindFromIndex(i); + aItLS.Initialize(aLSS); + for (; aItLS.More(); aItLS.Next()) { + const TopoDS_Shape& aSs = aItLS.Value(); + } + } + */ + Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES"); + } + //modified by NIZNHY-PKV Tue Mar 13 14:07:14 2012t + + Standard_Integer iErr = aGA.ErrorStatus(); + if (iErr) { + switch (iErr) { + case 11: + Standard_Failure::Raise("GEOMAlgo_GlueDetector failed"); + break; + case 13: + case 14: + Standard_Failure::Raise("PerformImagesToWork failed"); + break; + default: + { + // description of all errors see in GEOMAlgo_Gluer2.cxx + TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code "); + aMsg += TCollection_AsciiString(iErr); + Standard_Failure::Raise(aMsg.ToCString()); + break; + } + } + return aRes; + } + + // 3. Fill shapes to glue aMSG + TopTools_DataMapOfShapeListOfShape aMSG; + const TopTools_DataMapOfShapeListOfShape& aMSD = aGA.ShapesDetected(); + TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSD; + aItMSD.Initialize(aMSD); + for (; aItMSD.More(); aItMSD.Next()) { + const TopoDS_Shape& aSx = aItMSD.Key(); + const TopTools_ListOfShape& aLSD = aItMSD.Value(); + TopTools_ListIteratorOfListOfShape anItLSD (aLSD); + bool isToGlue = false; + if (doGlueAllEdges && aSx.ShapeType() == TopAbs_EDGE) { + isToGlue = true; + } + else { + for (; anItLSD.More() && !isToGlue; anItLSD.Next()) { + if (theShapesList.Contains(anItLSD.Value())) { + isToGlue = true; + } + } + } + if (isToGlue) { + aMSG.Bind(aSx, aLSD); + } + } + + // 4. Set shapes to glue. If the operator is absent, the whole gluing will be done + aGA.SetShapesToGlue(aMSG); + + // 5. Gluing + aGA.Perform(); + iErr = aGA.ErrorStatus(); + if (iErr) { + switch (iErr) { + case 11: + Standard_Failure::Raise("GEOMAlgo_GlueDetector failed"); + break; + case 13: + case 14: + Standard_Failure::Raise("PerformImagesToWork failed"); + break; + default: + { + // description of all errors see in GEOMAlgo_Gluer2.cxx + TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code "); + aMsg += TCollection_AsciiString(iErr); + Standard_Failure::Raise(aMsg.ToCString()); + break; + } + } + return aRes; + } + + Standard_Integer iWrn = aGA.WarningStatus(); + if (iWrn) { + switch (iWrn) { + case 1: + MESSAGE("No shapes to glue"); + break; + default: + // description of all warnings see in GEOMAlgo_Gluer2.cxx + MESSAGE("Warning in GEOMAlgo_Gluer2 with code " << iWrn); + break; + } + } + + // 6. Result + aRes = aGA.Shape(); + + return aRes; +} //======================================================================= //function : Execute @@ -337,26 +740,35 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const Standard_Boolean aKeepNonSolids = aCI.GetKeepNonSolids(); if (aType == GLUE_FACES) { - aShape = GlueFacesWithWarnings(aShapeBase, tol3d, aKeepNonSolids, aWrn); + //aShape = GlueFacesWithWarnings(aShapeBase, tol3d, aKeepNonSolids, aWrn); + aShape = GlueWithWarnings(aShapeBase, tol3d, TopAbs_FACE, aKeepNonSolids, aWrn); + } + else if (aType == GLUE_EDGES) { + aShape = GlueWithWarnings(aShapeBase, tol3d, TopAbs_EDGE, aKeepNonSolids, aWrn); } - else { // aType == GLUE_FACES_BY_LIST + else if (aType == GLUE_FACES_BY_LIST || aType == GLUE_EDGES_BY_LIST) { Handle(TColStd_HSequenceOfTransient) SF = aCI.GetFaces(); TopTools_MapOfShape aFaces; - int i=1; - for( ; i <= SF->Length(); i++) { + int i = 1; + for (; i <= SF->Length(); i++) { Handle(Standard_Transient) anItem = SF->Value(i); - if(anItem.IsNull()) - continue; + if (anItem.IsNull()) + continue; Handle(GEOM_Function) aRefSh = Handle(GEOM_Function)::DownCast(anItem); - if(aRefSh.IsNull()) - continue; + if (aRefSh.IsNull()) + continue; TopoDS_Shape aFace = aRefSh->GetValue(); - if(aFace.IsNull()) - continue; - if(!aFaces.Contains(aFace)) - aFaces.Add(aFace); + if (aFace.IsNull()) + continue; + aFaces.Add(aFace); } - aShape = GlueFacesByList(aShapeBase, tol3d, aKeepNonSolids, aFaces); + + Standard_Boolean aGlueAllEdges = Standard_False; + if (aType == GLUE_FACES_BY_LIST) + aGlueAllEdges = aCI.GetGlueAllEdges(); + + //aShape = GlueFacesByList(aShapeBase, tol3d, aKeepNonSolids, aFaces); + aShape = GlueByList(aShapeBase, tol3d, aKeepNonSolids, aFaces, aGlueAllEdges); } if (aShape.IsNull()) return 0; @@ -372,44 +784,54 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const return 1; } -//======================================================================= -//function : GEOMImpl_GlueDriver_Type_ -//purpose : -//======================================================================= -Standard_EXPORT Handle_Standard_Type& GEOMImpl_GlueDriver_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_GlueDriver", - sizeof(GEOMImpl_GlueDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} +//================================================================================ +/*! + * \brief Returns a name of creation operation and names and values of creation parameters + */ +//================================================================================ -//======================================================================= -//function : DownCast -//purpose : -//======================================================================= -const Handle(GEOMImpl_GlueDriver) Handle(GEOMImpl_GlueDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +bool GEOMImpl_GlueDriver:: +GetCreationInformation(std::string& theOperationName, + std::vector& theParams) { - Handle(GEOMImpl_GlueDriver) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_GlueDriver))) { - _anOtherObject = Handle(GEOMImpl_GlueDriver)((Handle(GEOMImpl_GlueDriver)&)AnObject); - } + if (Label().IsNull()) return 0; + Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IGlue aCI( function ); + Standard_Integer aType = function->GetType(); + + switch ( aType ) { + case GLUE_FACES: + theOperationName = "GLUE_FACES"; + AddParam( theParams, "Selected shape", aCI.GetBase() ); + AddParam( theParams, "Tolerance", aCI.GetTolerance() ); + AddParam( theParams, "To keep non solids", aCI.GetKeepNonSolids() ); + break; + case GLUE_EDGES: + theOperationName = "GLUE_EDGES"; + AddParam( theParams, "Selected shape", aCI.GetBase() ); + AddParam( theParams, "Tolerance", aCI.GetTolerance() ); + break; + case GLUE_FACES_BY_LIST: + theOperationName = "GLUE_FACES"; + AddParam( theParams, "Selected shape", aCI.GetBase() ); + AddParam( theParams, "Tolerance", aCI.GetTolerance() ); + AddParam( theParams, "Faces", aCI.GetFaces() ); + AddParam( theParams, "To keep non solids", aCI.GetKeepNonSolids() ); + AddParam( theParams, "To glue all edges", aCI.GetGlueAllEdges() ); + break; + case GLUE_EDGES_BY_LIST: + theOperationName = "GLUE_EDGES"; + AddParam( theParams, "Selected shape", aCI.GetBase() ); + AddParam( theParams, "Tolerance", aCI.GetTolerance() ); + AddParam( theParams, "Edges", aCI.GetFaces() ); + break; + default: + return false; } - - return _anOtherObject ; + + return true; } + +IMPLEMENT_STANDARD_HANDLE (GEOMImpl_GlueDriver,GEOM_BaseDriver); +IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_GlueDriver,GEOM_BaseDriver);