1 // Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #include <Standard_Stream.hxx>
25 #include <GEOMImpl_GlueDriver.hxx>
26 #include <GEOMImpl_IGlue.hxx>
27 #include <GEOMImpl_Types.hxx>
29 #include <GEOM_Object.hxx>
30 #include <GEOM_Function.hxx>
32 #include "GEOMAlgo_Gluer2.hxx"
33 #include "GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx"
34 #include "GEOMAlgo_CoupleOfShapes.hxx"
35 #include "GEOMAlgo_ListOfCoupleOfShapes.hxx"
37 #include <Basics_OCCTVersion.hxx>
39 #include "utilities.h"
41 #include <TDataStd_IntegerArray.hxx>
44 #include <TopoDS_Shape.hxx>
45 #include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
46 #include <TopTools_IndexedMapOfShape.hxx>
47 #include <TopTools_ListOfShape.hxx>
48 #include <TopTools_ListIteratorOfListOfShape.hxx>
50 #include <ShapeFix_Shape.hxx>
52 #include <Standard_NullObject.hxx>
53 #include <Standard_Failure.hxx>
55 #define MSG_BAD_TOLERANCE "Tolerance is too big"
56 #define MSG_BAD_ARG_SHAPE "Argument shape is not a compound of hexahedral solids"
58 //=======================================================================
59 //function : GEOMImpl_GlueDriver
61 //=======================================================================
62 GEOMImpl_GlueDriver::GEOMImpl_GlueDriver()
66 //=======================================================================
69 //=======================================================================
70 const Standard_GUID& GEOMImpl_GlueDriver::GetID()
72 static Standard_GUID aGlueDriver("FF1BBB63-5D14-4df2-980B-3A668264EA16");
76 //=======================================================================
77 //function : GlueFacesWithWarnings
79 //=======================================================================
81 TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesWithWarnings (const TopoDS_Shape& theShape,
82 const Standard_Real theTolerance,
83 const Standard_Boolean doKeepNonSolids,
84 TCollection_AsciiString& theWarning) const
86 Standard_Integer iErr, iWrn;
88 GEOMAlgo_Gluer aGluer;
90 aGluer.SetShape(theShape);
91 aGluer.SetTolerance(theTolerance);
92 aGluer.SetCheckGeometry(Standard_True);
93 aGluer.SetKeepNonSolids(doKeepNonSolids);
97 iErr = aGluer.ErrorStatus();
101 Standard_Failure::Raise("No vertices found in source shape");
105 Standard_Failure::Raise(MSG_BAD_TOLERANCE " or " MSG_BAD_ARG_SHAPE);
108 Standard_Failure::Raise("Source shape is Null");
111 Standard_Failure::Raise("Result shape is Null");
114 Standard_Failure::Raise(MSG_BAD_TOLERANCE);
118 Standard_Failure::Raise(MSG_BAD_ARG_SHAPE);
121 Standard_Failure::Raise("Error occured during check of geometric coincidence");
125 // description of all errors see in GEOMAlgo_Gluer.cxx
126 TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer with code ");
127 aMsg += TCollection_AsciiString(iErr);
128 Standard_Failure::Raise(aMsg.ToCString());
135 iWrn = aGluer.WarningStatus();
140 Standard_Integer nbAlone = aGluer.AloneShapes();
141 theWarning = TCollection_AsciiString(nbAlone);
142 theWarning += " solid(s) can not be glued by faces";
146 // description of all warnings see in GEOMAlgo_Gluer.cxx
147 theWarning = "Warning in GEOMAlgo_Gluer with code ";
148 theWarning += TCollection_AsciiString(iWrn);
153 aRes = aGluer.Result();
155 // SKL 18.01.2010 - patch for 20662
156 Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aRes);
157 aSfs->SetPrecision(Precision::Confusion());
159 aRes = aSfs->Shape();
161 // Fill history to be used by GetInPlace functionality
162 TopTools_IndexedMapOfShape aResIndices;
163 TopExp::MapShapes(aRes, aResIndices);
165 Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
167 // history for all argument shapes
168 TDF_LabelSequence aLabelSeq;
169 aFunction->GetDependency(aLabelSeq);
170 Standard_Integer nbArg = aLabelSeq.Length();
172 for (Standard_Integer iarg = 1; iarg <= nbArg; iarg++) {
174 TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg);
176 Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel);
177 TopoDS_Shape anArgumentShape = anArgumentObject->GetValue();
179 TopTools_IndexedMapOfShape anArgumentIndices;
180 TopExp::MapShapes(anArgumentShape, anArgumentIndices);
181 Standard_Integer nbArgumentEntities = anArgumentIndices.Extent();
183 // Find corresponding label in history
184 TDF_Label anArgumentHistoryLabel =
185 aFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_True);
187 for (Standard_Integer ie = 1; ie <= nbArgumentEntities; ie++) {
188 TopoDS_Shape anEntity = anArgumentIndices.FindKey(ie);
189 const TopTools_ListOfShape& aModified = aGluer.Modified(anEntity);
190 Standard_Integer nbModified = aModified.Extent();
192 if (nbModified > 0) {
193 TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(ie, Standard_True);
194 Handle(TDataStd_IntegerArray) anAttr =
195 TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified);
197 TopTools_ListIteratorOfListOfShape itM (aModified);
198 for (int im = 1; itM.More(); itM.Next(), ++im) {
199 int id = aResIndices.FindIndex(itM.Value());
200 anAttr->SetValue(im, id);
209 //=======================================================================
210 //function : GlueFaces
212 //=======================================================================
213 TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape,
214 const Standard_Real theTolerance,
215 const Standard_Boolean doKeepNonSolids)
218 GEOMAlgo_Gluer aGluer;
220 aGluer.SetShape(theShape);
221 aGluer.SetTolerance(theTolerance);
222 aGluer.SetCheckGeometry(Standard_True);
223 aGluer.SetKeepNonSolids(doKeepNonSolids);
227 Standard_Integer iErr = aGluer.ErrorStatus();
231 Standard_Failure::Raise("No vertices found in source shape");
234 Standard_Failure::Raise("Source shape is Null");
237 Standard_Failure::Raise("Result shape is Null");
240 Standard_Failure::Raise("Error occured during check of geometric coincidence");
244 // description of all errors see in GEOMAlgo_Gluer.cxx
245 TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer with code ");
246 aMsg += TCollection_AsciiString(iErr);
247 Standard_Failure::Raise(aMsg.ToCString());
254 Standard_Integer iWrn = aGluer.WarningStatus();
258 MESSAGE("Some shapes can not be glued by faces");
261 // description of all warnings see in GEOMAlgo_Gluer.cxx
262 MESSAGE("Warning in GEOMAlgo_Gluer with code " << iWrn);
267 aRes = aGluer.Result();
272 //=======================================================================
273 //function : GlueFacesByList
275 //=======================================================================
276 TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesByList (const TopoDS_Shape& theShape,
277 const Standard_Real theTolerance,
278 const Standard_Boolean doKeepNonSolids,
279 const TopTools_MapOfShape& aFaces)
283 GEOMAlgo_Gluer1 aGluer;
284 GEOMAlgo_ListIteratorOfListOfCoupleOfShapes aItCS;
285 GEOMAlgo_CoupleOfShapes aCS;
286 GEOMAlgo_ListOfCoupleOfShapes aLCS;
288 aGluer.SetShape(theShape);
289 aGluer.SetTolerance(theTolerance);
290 aGluer.SetKeepNonSolids(doKeepNonSolids);
292 Standard_Integer iErr = aGluer.ErrorStatus();
293 if (iErr) return aRes;
295 TopTools_ListOfShape listShape;
296 const GEOMAlgo_ListOfCoupleOfShapes& aLCSG = aGluer.GluedFaces();
298 aItCS.Initialize(aLCSG);
299 for (; aItCS.More(); aItCS.Next()) {
300 const GEOMAlgo_CoupleOfShapes& aCSG = aItCS.Value();
301 const TopoDS_Shape& aF1 = aCSG.Shape1();
302 const TopoDS_Shape& aF2 = aCSG.Shape2();
303 if (aFaces.Contains(aF1) || aFaces.Contains(aF2))
305 aCS.SetShapes(aF1,aF2);
309 //cout<<"aLCS.Extent() = "<<aLCS.Extent()<<endl;
310 if (aLCS.Extent()>0) {
311 aGluer.SetFacesToUnglue(aLCS);
312 aGluer.UnglueFaces();
313 iErr = aGluer.ErrorStatus();
314 if (iErr) return aRes;
317 aRes = aGluer.Result();
323 //=======================================================================
324 //function : GlueFaces
326 //=======================================================================
327 TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape,
328 const Standard_Real theTolerance,
329 const Standard_Boolean doKeepNonSolids)
336 aGA.SetArgument(theShape);
337 aGA.SetTolerance(theTolerance);
338 aGA.SetKeepNonSolids(doKeepNonSolids);
340 // 2. Detect interferred shapes
343 //Standard_Integer iWrnDetect = aGA.WarningStatus();
344 //if (iWrnDetect == 2) {
345 // Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES");
348 Standard_Integer iErr = aGA.ErrorStatus();
352 Standard_Failure::Raise("GEOMAlgo_GlueDetector failed");
356 Standard_Failure::Raise("PerformImagesToWork failed");
360 // description of all errors see in GEOMAlgo_Gluer2.cxx
361 TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code ");
362 aMsg += TCollection_AsciiString(iErr);
363 Standard_Failure::Raise(aMsg.ToCString());
370 // 3. Set shapes to glue. If the operator is absent, the whole gluing will be done
371 //aGA.SetShapesToGlue(aMSG);
375 iErr = aGA.ErrorStatus();
379 Standard_Failure::Raise("GEOMAlgo_GlueDetector failed");
383 Standard_Failure::Raise("PerformImagesToWork failed");
387 // description of all errors see in GEOMAlgo_Gluer2.cxx
388 TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code ");
389 aMsg += TCollection_AsciiString(iErr);
390 Standard_Failure::Raise(aMsg.ToCString());
397 Standard_Integer iWrn = aGA.WarningStatus();
401 MESSAGE("No shapes to glue");
404 // description of all warnings see in GEOMAlgo_Gluer2.cxx
405 MESSAGE("Warning in GEOMAlgo_Gluer2 with code " << iWrn);
416 //=======================================================================
417 //function : GlueWithWarnings
419 //=======================================================================
420 TopoDS_Shape GEOMImpl_GlueDriver::GlueWithWarnings (const TopoDS_Shape& theShape,
421 const Standard_Real theTolerance,
422 const TopAbs_ShapeEnum theShapeType,
423 const Standard_Boolean doKeepNonSolids,
424 TCollection_AsciiString& theWarning) const
431 aGA.SetArgument(theShape);
432 aGA.SetTolerance(theTolerance);
433 aGA.SetKeepNonSolids(doKeepNonSolids);
435 // 2. Detect interferred shapes
438 //modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f
439 Standard_Integer iWrnDetect = aGA.WarningStatus();
440 if (iWrnDetect == 2) {
441 Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES");
443 //modified by NIZNHY-PKV Tue Mar 13 14:07:14 2012t
445 Standard_Integer iErr = aGA.ErrorStatus();
449 Standard_Failure::Raise("GEOMAlgo_GlueDetector failed");
453 Standard_Failure::Raise("PerformImagesToWork failed");
457 // description of all errors see in GEOMAlgo_Gluer2.cxx
458 TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code ");
459 aMsg += TCollection_AsciiString(iErr);
460 Standard_Failure::Raise(aMsg.ToCString());
467 if (theShapeType != TopAbs_FACE) {
468 // 3. Fill shapes to glue aMSG
469 TopTools_DataMapOfShapeListOfShape aMSG;
470 const TopTools_DataMapOfShapeListOfShape& aMSD = aGA.ShapesDetected();
471 TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSD;
472 aItMSD.Initialize(aMSD);
473 for (; aItMSD.More(); aItMSD.Next()) {
474 const TopoDS_Shape& aSx = aItMSD.Key();
475 const TopTools_ListOfShape& aLSD = aItMSD.Value();
476 if (aSx.ShapeType() == theShapeType) {
477 aMSG.Bind(aSx, aLSD);
481 // 4. Set shapes to glue. If the operator is absent, the whole gluing will be done
482 aGA.SetShapesToGlue(aMSG);
487 iErr = aGA.ErrorStatus();
491 Standard_Failure::Raise("GEOMAlgo_GlueDetector failed");
495 Standard_Failure::Raise("PerformImagesToWork failed");
499 // description of all errors see in GEOMAlgo_Gluer2.cxx
500 TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code ");
501 aMsg += TCollection_AsciiString(iErr);
502 Standard_Failure::Raise(aMsg.ToCString());
509 Standard_Integer iWrn = aGA.WarningStatus();
513 theWarning = "No shapes to glue";
516 // description of all warnings see in GEOMAlgo_Gluer2.cxx
517 theWarning = "Warning in GEOMAlgo_Gluer2 with code ";
518 theWarning += TCollection_AsciiString(iWrn);
526 // 7. Fill history to be used by GetInPlace functionality
527 TopTools_IndexedMapOfShape aResIndices;
528 TopExp::MapShapes(aRes, aResIndices);
530 Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
532 // history for all argument shapes
533 TDF_LabelSequence aLabelSeq;
534 aFunction->GetDependency(aLabelSeq);
535 Standard_Integer nbArg = aLabelSeq.Length();
537 for (Standard_Integer iarg = 1; iarg <= nbArg; iarg++) {
539 TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg);
541 Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel);
542 TopoDS_Shape anArgumentShape = anArgumentObject->GetValue();
544 TopTools_IndexedMapOfShape anArgumentIndices;
545 TopExp::MapShapes(anArgumentShape, anArgumentIndices);
546 Standard_Integer nbArgumentEntities = anArgumentIndices.Extent();
548 // Find corresponding label in history
549 TDF_Label anArgumentHistoryLabel =
550 aFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_True);
552 for (Standard_Integer ie = 1; ie <= nbArgumentEntities; ie++) {
553 TopoDS_Shape anEntity = anArgumentIndices.FindKey(ie);
554 const TopTools_ListOfShape& aModified = aGA.Modified(anEntity);
555 Standard_Integer nbModified = aModified.Extent();
557 if (nbModified > 0) {
558 TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(ie, Standard_True);
559 Handle(TDataStd_IntegerArray) anAttr =
560 TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified);
562 TopTools_ListIteratorOfListOfShape itM (aModified);
563 for (int im = 1; itM.More(); itM.Next(), ++im) {
564 int id = aResIndices.FindIndex(itM.Value());
565 anAttr->SetValue(im, id);
574 //=======================================================================
575 //function : GlueByList
577 //=======================================================================
578 TopoDS_Shape GEOMImpl_GlueDriver::GlueByList (const TopoDS_Shape& theShape,
579 const Standard_Real theTolerance,
580 const Standard_Boolean doKeepNonSolids,
581 const TopTools_MapOfShape& theShapesList,
582 const Standard_Boolean doGlueAllEdges)
589 aGA.SetArgument(theShape);
590 aGA.SetTolerance(theTolerance);
591 aGA.SetKeepNonSolids(doKeepNonSolids);
593 // 2. Detect interferred shapes
596 //modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f
597 Standard_Integer iWrnDetect = aGA.WarningStatus();
598 if (iWrnDetect == 2) {
600 TopTools_ListIteratorOfListOfShape aItLS;
602 // Sticked shapes are detected
603 const TopTools_IndexedDataMapOfShapeListOfShape& aIDMSS = pGluer2->StickedShapes();
605 Standard_Integer i, aNb = aIDMSS.Extent();
606 for (i = 1; i <= aNb; ++i) {
607 // ancestor aSa (edge, wire face,..)
608 const TopoDS_Shape& aSa = aIDMSS.FindKey(i);
610 // successors aSs (vertex, edge, ...)
611 // of the ancestor that are sticked
612 // for given value of the tolerance
613 const TopTools_ListOfShape& aLSS = aIDMSS.FindFromIndex(i);
614 aItLS.Initialize(aLSS);
615 for (; aItLS.More(); aItLS.Next()) {
616 const TopoDS_Shape& aSs = aItLS.Value();
620 Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES");
622 //modified by NIZNHY-PKV Tue Mar 13 14:07:14 2012t
624 Standard_Integer iErr = aGA.ErrorStatus();
628 Standard_Failure::Raise("GEOMAlgo_GlueDetector failed");
632 Standard_Failure::Raise("PerformImagesToWork failed");
636 // description of all errors see in GEOMAlgo_Gluer2.cxx
637 TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code ");
638 aMsg += TCollection_AsciiString(iErr);
639 Standard_Failure::Raise(aMsg.ToCString());
646 // 3. Fill shapes to glue aMSG
647 TopTools_DataMapOfShapeListOfShape aMSG;
648 const TopTools_DataMapOfShapeListOfShape& aMSD = aGA.ShapesDetected();
649 TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSD;
650 aItMSD.Initialize(aMSD);
651 for (; aItMSD.More(); aItMSD.Next()) {
652 const TopoDS_Shape& aSx = aItMSD.Key();
653 const TopTools_ListOfShape& aLSD = aItMSD.Value();
654 TopTools_ListIteratorOfListOfShape anItLSD (aLSD);
655 bool isToGlue = false;
656 if (doGlueAllEdges && aSx.ShapeType() == TopAbs_EDGE) {
660 for (; anItLSD.More() && !isToGlue; anItLSD.Next()) {
661 if (theShapesList.Contains(anItLSD.Value())) {
667 aMSG.Bind(aSx, aLSD);
671 // 4. Set shapes to glue. If the operator is absent, the whole gluing will be done
672 aGA.SetShapesToGlue(aMSG);
676 iErr = aGA.ErrorStatus();
680 Standard_Failure::Raise("GEOMAlgo_GlueDetector failed");
684 Standard_Failure::Raise("PerformImagesToWork failed");
688 // description of all errors see in GEOMAlgo_Gluer2.cxx
689 TCollection_AsciiString aMsg ("Error in GEOMAlgo_Gluer2 with code ");
690 aMsg += TCollection_AsciiString(iErr);
691 Standard_Failure::Raise(aMsg.ToCString());
698 Standard_Integer iWrn = aGA.WarningStatus();
702 MESSAGE("No shapes to glue");
705 // description of all warnings see in GEOMAlgo_Gluer2.cxx
706 MESSAGE("Warning in GEOMAlgo_Gluer2 with code " << iWrn);
717 //=======================================================================
720 //=======================================================================
721 Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const
723 if (Label().IsNull()) return 0;
724 Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
726 GEOMImpl_IGlue aCI (aFunction);
727 Standard_Integer aType = aFunction->GetType();
730 TCollection_AsciiString aWrn;
732 Handle(GEOM_Function) aRefBase = aCI.GetBase();
733 TopoDS_Shape aShapeBase = aRefBase->GetValue();
734 if (aShapeBase.IsNull()) {
735 Standard_NullObject::Raise("Shape for gluing is null");
738 Standard_Real tol3d = aCI.GetTolerance();
740 Standard_Boolean aKeepNonSolids = aCI.GetKeepNonSolids();
742 if (aType == GLUE_FACES) {
743 //aShape = GlueFacesWithWarnings(aShapeBase, tol3d, aKeepNonSolids, aWrn);
744 aShape = GlueWithWarnings(aShapeBase, tol3d, TopAbs_FACE, aKeepNonSolids, aWrn);
746 else if (aType == GLUE_EDGES) {
747 aShape = GlueWithWarnings(aShapeBase, tol3d, TopAbs_EDGE, aKeepNonSolids, aWrn);
749 else if (aType == GLUE_FACES_BY_LIST || aType == GLUE_EDGES_BY_LIST) {
750 Handle(TColStd_HSequenceOfTransient) SF = aCI.GetFaces();
751 TopTools_MapOfShape aFaces;
753 for (; i <= SF->Length(); i++) {
754 Handle(Standard_Transient) anItem = SF->Value(i);
757 Handle(GEOM_Function) aRefSh = Handle(GEOM_Function)::DownCast(anItem);
760 TopoDS_Shape aFace = aRefSh->GetValue();
766 Standard_Boolean aGlueAllEdges = Standard_False;
767 if (aType == GLUE_FACES_BY_LIST)
768 aGlueAllEdges = aCI.GetGlueAllEdges();
770 //aShape = GlueFacesByList(aShapeBase, tol3d, aKeepNonSolids, aFaces);
771 aShape = GlueByList(aShapeBase, tol3d, aKeepNonSolids, aFaces, aGlueAllEdges);
774 if (aShape.IsNull()) return 0;
776 aFunction->SetValue(aShape);
778 log.SetTouched(Label());
780 if (!aWrn.IsEmpty()) {
781 Standard_Failure::Raise(aWrn.ToCString());
787 //================================================================================
789 * \brief Returns a name of creation operation and names and values of creation parameters
791 //================================================================================
793 bool GEOMImpl_GlueDriver::
794 GetCreationInformation(std::string& theOperationName,
795 std::vector<GEOM_Param>& theParams)
797 if (Label().IsNull()) return 0;
798 Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
800 GEOMImpl_IGlue aCI( function );
801 Standard_Integer aType = function->GetType();
805 theOperationName = "GLUE_FACES";
806 AddParam( theParams, "Selected shape", aCI.GetBase() );
807 AddParam( theParams, "Tolerance", aCI.GetTolerance() );
808 AddParam( theParams, "To keep non solids", aCI.GetKeepNonSolids() );
811 theOperationName = "GLUE_EDGES";
812 AddParam( theParams, "Selected shape", aCI.GetBase() );
813 AddParam( theParams, "Tolerance", aCI.GetTolerance() );
815 case GLUE_FACES_BY_LIST:
816 theOperationName = "GLUE_FACES";
817 AddParam( theParams, "Selected shape", aCI.GetBase() );
818 AddParam( theParams, "Tolerance", aCI.GetTolerance() );
819 AddParam( theParams, "Faces", aCI.GetFaces() );
820 AddParam( theParams, "To keep non solids", aCI.GetKeepNonSolids() );
821 AddParam( theParams, "To glue all edges", aCI.GetGlueAllEdges() );
823 case GLUE_EDGES_BY_LIST:
824 theOperationName = "GLUE_EDGES";
825 AddParam( theParams, "Selected shape", aCI.GetBase() );
826 AddParam( theParams, "Tolerance", aCI.GetTolerance() );
827 AddParam( theParams, "Edges", aCI.GetFaces() );
836 IMPLEMENT_STANDARD_HANDLE (GEOMImpl_GlueDriver,GEOM_BaseDriver);
837 IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_GlueDriver,GEOM_BaseDriver);