1 // Copyright (C) 2007-2015 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 // GEOM GEOMGUI : GUI for Geometry component
24 // File : MeasureGUI_FastCheckIntersectionsDlg.cxx
26 #include "MeasureGUI_FastCheckIntersectionsDlg.h"
27 #include "MeasureGUI.h"
29 #include <SUIT_OverrideCursor.h>
30 #include <SUIT_Session.h>
31 #include <SUIT_ResourceMgr.h>
32 #include <SUIT_MessageBox.h>
33 #include <LightApp_SelectionMgr.h>
34 #include <SalomeApp_Tools.h>
35 #include <SalomeApp_Application.h>
37 #include <TopTools_IndexedMapOfShape.hxx>
39 #include <TColStd_IndexedMapOfInteger.hxx>
40 #include <TColStd_MapOfInteger.hxx>
43 #include <GeometryGUI.h>
45 #include <GEOMImpl_Types.hxx>
47 #include <QListWidget>
49 #define TEXTEDIT_FONT_FAMILY "Courier"
50 #define TEXTEDIT_FONT_SIZE 11
51 //=================================================================================
52 // class : MeasureGUI_FastCheckIntersectionsDlg()
53 // purpose : Constructs a MeasureGUI_FastCheckIntersectionsDlg which is a child of 'parent', with the
54 // name 'name' and widget flags set to 'f'.
55 // The dialog will by default be modeless, unless you set 'modal' to
56 // true to construct a modal dialog.
57 //=================================================================================
58 MeasureGUI_FastCheckIntersectionsDlg::MeasureGUI_FastCheckIntersectionsDlg (GeometryGUI* GUI, QWidget* parent)
59 : GEOMBase_Skeleton (GUI, parent, false)
61 SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
62 QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_FAST_CHECK_INTERSECTIONS")));
63 QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
65 setWindowTitle(tr("GEOM_FAST_CHECK_INTERSECTIONS"));
67 /***************************************************************/
68 mainFrame()->GroupConstructors->setTitle(tr("GEOM_FAST_CHECK_INTERSECTIONS"));
69 mainFrame()->RadioButton1->setIcon(image0);
70 mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
71 mainFrame()->RadioButton2->close();
72 mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
73 mainFrame()->RadioButton3->close();
75 QGroupBox* aGrp = new QGroupBox(tr("GEOM_FAST_CHECK_OBJ"), centralWidget());
76 QLabel* anObjLbl1 = new QLabel(tr("GEOM_OBJECT_I").arg("1"), aGrp);
77 QLabel* anObjLbl2 = new QLabel(tr("GEOM_OBJECT_I").arg("2"), aGrp);
78 QLabel* aShapeLbl1 = new QLabel(tr("GEOM_FAST_CHECK_INT_SUBSHAPES").arg("1"), aGrp);
79 QLabel* aShapeLbl2 = new QLabel(tr("GEOM_FAST_CHECK_INT_SUBSHAPES").arg("2"), aGrp);
80 QLabel* aDeflectLbl = new QLabel(tr("GEOM_FAST_CHECK_INT_DEFLECT"), aGrp);
82 mySelButton1 = new QPushButton(aGrp);
83 mySelButton1->setIcon(image1);
84 mySelButton1->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
85 mySelButton2 = new QPushButton(aGrp);
86 mySelButton2->setIcon(image1);
87 mySelButton2->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
89 myEditObjName1 = new QLineEdit(aGrp);
90 myEditObjName1->setReadOnly(true);
91 myEditObjName2 = new QLineEdit(aGrp);
92 myEditObjName2->setReadOnly(true);
94 myDetGaps = new QCheckBox(tr( "GEOM_FAST_CHECK_INT_DETECT_GAPS" ));
95 myTolerance = new SalomeApp_DoubleSpinBox(aGrp);
96 myDeflection = new SalomeApp_DoubleSpinBox(aGrp);
97 myShapeList1 = new QListWidget(aGrp);
98 myShapeList2 = new QListWidget(aGrp);
99 myShapeList1->setSelectionMode(QAbstractItemView::ExtendedSelection);
100 myShapeList2->setSelectionMode(QAbstractItemView::ExtendedSelection);
102 myComputeButton = new QPushButton(tr("GEOM_FAST_CHECK_INT_COMPUTE"));
104 QGridLayout *aGrpLayout = new QGridLayout(aGrp);
105 aGrpLayout->setMargin(9);
106 aGrpLayout->setSpacing(6);
107 aGrpLayout->addWidget(anObjLbl1, 0, 0);
108 aGrpLayout->addWidget(mySelButton1, 0, 1);
109 aGrpLayout->addWidget(myEditObjName1, 0, 2);
110 aGrpLayout->addWidget(anObjLbl2, 1, 0);
111 aGrpLayout->addWidget(mySelButton2, 1, 1);
112 aGrpLayout->addWidget(myEditObjName2, 1, 2);
113 aGrpLayout->addWidget(aDeflectLbl, 2, 0);
114 aGrpLayout->addWidget(myDeflection, 2, 1, 1, 2);
115 aGrpLayout->addWidget(myDetGaps, 3, 0);
116 aGrpLayout->addWidget(myTolerance, 3, 1, 1, 2);
117 aGrpLayout->addWidget(myComputeButton, 4, 0, 1, 3);
119 QGridLayout *aGrpLayout2 = new QGridLayout();
120 aGrpLayout->addLayout(aGrpLayout2, 5, 0, 1, 3);
121 aGrpLayout2->addWidget(aShapeLbl1, 0, 0);
122 aGrpLayout2->addWidget(aShapeLbl2, 0, 1);
123 aGrpLayout2->addWidget(myShapeList1, 1, 0);
124 aGrpLayout2->addWidget(myShapeList2, 1, 1);
126 QVBoxLayout* layout = new QVBoxLayout (centralWidget());
127 layout->setMargin(0); layout->setSpacing(6);
128 layout->addWidget(aGrp);
130 /***************************************************************/
132 myHelpFileName = "fast_intersection_page.html";
138 //=================================================================================
139 // function : ~MeasureGUI_FastCheckIntersectionsDlg()
140 // purpose : Destroys the object and frees any allocated resources
141 //=================================================================================
142 MeasureGUI_FastCheckIntersectionsDlg::~MeasureGUI_FastCheckIntersectionsDlg()
146 //=================================================================================
149 //=================================================================================
150 void MeasureGUI_FastCheckIntersectionsDlg::Init()
154 myEditObjName1->setText("");
155 myEditObjName2->setText("");
156 myEditObjName1->setEnabled(true);
157 myEditObjName2->setEnabled(false);
159 myDetGaps->setChecked(false);
160 initSpinBox(myTolerance, 0, MAX_NUMBER, 1);
161 myTolerance->setValue(0);
162 myTolerance->setEnabled(false);
164 // Obtain deflection from preferences
165 SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
166 initSpinBox(myDeflection, 1e-3, 1.0, 1e-3);
167 myDeflection->setValue(qMax(1e-3, resMgr->doubleValue("Geometry", "deflection_coeff", 1e-3)));
169 myEditCurrentArgument = myEditObjName1;
171 connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()),
172 this, SLOT(DeactivateActiveDialog()));
173 connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()),
174 this, SLOT(ClickOnCancel()));
175 connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
176 connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
177 connect(mySelButton1, SIGNAL(clicked()),
178 this, SLOT(SetEditCurrentArgument()));
179 connect(mySelButton2, SIGNAL(clicked()),
180 this, SLOT(SetEditCurrentArgument()));
181 connect(myDetGaps, SIGNAL(toggled(bool)), this, SLOT(OnGaps(bool)));
182 connect( myTolerance, SIGNAL(valueChanged(double)), this, SLOT(clear()));
183 connect( myDeflection, SIGNAL(valueChanged(double)), this, SLOT(clear()));
184 connect(myShapeList1, SIGNAL(itemSelectionChanged()),
185 SLOT(onSubShapesListSelectionChanged()));
186 connect(myShapeList2, SIGNAL(itemSelectionChanged()),
187 SLOT(onSubShapesListSelectionChanged()));
188 connect(myComputeButton, SIGNAL(clicked()), this, SLOT(onCompute()));
190 LightApp_SelectionMgr* aSel = myGeomGUI->getApp()->selectionMgr();
192 connect(aSel, SIGNAL(currentSelectionChanged()),
193 this, SLOT(SelectionIntoArgument()));
195 initName(tr("GEOM_FAST_INTERSECTION_NAME"));
196 buttonOk()->setEnabled(false);
197 buttonApply()->setEnabled(false);
198 myComputeButton->setEnabled(false);
201 mySelButton1->click();
202 SelectionIntoArgument();
205 //=================================================================================
208 //=================================================================================
209 void MeasureGUI_FastCheckIntersectionsDlg::clear()
211 disconnect(myShapeList1, SIGNAL(itemSelectionChanged()), this, 0);
212 disconnect(myShapeList2, SIGNAL(itemSelectionChanged()), this, 0);
213 myShapeList1->clear();
214 myShapeList2->clear();
215 connect(myShapeList1, SIGNAL(itemSelectionChanged()),
216 SLOT(onSubShapesListSelectionChanged()));
217 connect(myShapeList2, SIGNAL(itemSelectionChanged()),
218 SLOT(onSubShapesListSelectionChanged()));
220 buttonOk()->setEnabled(false);
221 buttonApply()->setEnabled(false);
222 myComputeButton->setEnabled(true);
225 //=================================================================================
226 // function : onCompute
228 //=================================================================================
229 void MeasureGUI_FastCheckIntersectionsDlg::onCompute()
231 myShapeList1->clear();
232 myShapeList2->clear();
234 if (!findIntersections()) {
235 myShapeList1->addItem(tr("GEOM_FAST_INTERSECTION_FAILS"));
236 myShapeList1->setEnabled(false);
237 myShapeList2->addItem(tr("GEOM_FAST_INTERSECTION_FAILS"));
238 myShapeList2->setEnabled(false);
242 myShapeList1->setEnabled(true);
243 myShapeList2->setEnabled(true);
244 QStringList aSubShapeList1, aSubShapeList2;
245 TopoDS_Shape aSelShape1, aSelShape2;
246 if (myObj1 && GEOMBase::GetShape(myObj1.get(), aSelShape1) && myObj2
247 && GEOMBase::GetShape(myObj2.get(), aSelShape2)) {
248 TopTools_IndexedMapOfShape anIndices1, anIndices2;
249 TopExp::MapShapes(aSelShape1, anIndices1);
250 TopExp::MapShapes(aSelShape2, anIndices2);
252 //Sub-shapes of 1st Object
253 for (int i = 0; i < myInters1->length(); i++) {
254 TopoDS_Shape aSubShape = anIndices1.FindKey(myInters1[i]);
255 QString aType = GEOMBase::GetShapeTypeString(aSubShape);
256 if (!aType.isEmpty())
257 aSubShapeList1.append(QString("%1_%2").arg(aType).arg(myInters1[i]));
259 myShapeList1->addItems(aSubShapeList1);
260 myShapeList1->selectAll();
262 //Sub-shapes of second Object
263 for (int i = 0; i < myInters2->length(); i++) {
264 TopoDS_Shape aSubShape = anIndices2.FindKey(myInters2[i]);
265 QString aType = GEOMBase::GetShapeTypeString(aSubShape);
266 if (!aType.isEmpty())
267 aSubShapeList2.append(QString("%1_%2").arg(aType).arg(myInters2[i]));
269 myShapeList2->addItems(aSubShapeList2);
270 myShapeList2->selectAll();
273 buttonOk()->setEnabled(true);
274 buttonApply()->setEnabled(true);
275 myComputeButton->setEnabled(false);
278 //=================================================================================
279 // function : ActivateThisDialog
281 //=================================================================================
282 void MeasureGUI_FastCheckIntersectionsDlg::ActivateThisDialog()
284 GEOMBase_Skeleton::ActivateThisDialog();
286 LightApp_SelectionMgr* aSel = myGeomGUI->getApp()->selectionMgr();
288 connect( aSel, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
291 DISPLAY_PREVIEW_MACRO
294 //=================================================================================
295 // function : DeactivateActiveDialog()
296 // purpose : public slot to deactivate if active
297 //=================================================================================
298 void MeasureGUI_FastCheckIntersectionsDlg::DeactivateActiveDialog()
300 GEOMBase_Skeleton::DeactivateActiveDialog();
303 //=================================================================================
304 // function : activateSelection
306 //=================================================================================
307 void MeasureGUI_FastCheckIntersectionsDlg::activateSelection()
309 TColStd_MapOfInteger aTypes;
310 aTypes.Add(GEOM_COMPOUND );
311 aTypes.Add(GEOM_SOLID );
312 aTypes.Add(GEOM_SHELL);
313 aTypes.Add(GEOM_FACE);
314 globalSelection(aTypes);
316 std::list<int> needTypes;
317 needTypes.push_back( TopAbs_FACE ), needTypes.push_back( TopAbs_SHELL ), needTypes.push_back( TopAbs_SOLID ), needTypes.push_back( TopAbs_COMPOUND );
318 localSelection(GEOM::GEOM_Object::_nil(), needTypes );
322 //=================================================================================
323 // function : ClickOnOk()
325 //=================================================================================
326 void MeasureGUI_FastCheckIntersectionsDlg::ClickOnOk()
328 if ( ClickOnApply() )
332 //=================================================================================
333 // function : ClickOnApply()
335 //=================================================================================
336 bool MeasureGUI_FastCheckIntersectionsDlg::ClickOnApply()
346 //=================================================================================
347 // function : extractPrefix
349 //=================================================================================
350 bool MeasureGUI_FastCheckIntersectionsDlg::extractPrefix() const
355 //=================================================================================
356 // function : createOperation
358 //=================================================================================
359 GEOM::GEOM_IOperations_ptr MeasureGUI_FastCheckIntersectionsDlg::createOperation()
361 return getGeomEngine()->GetIMeasureOperations( getStudyId() );
364 //=================================================================================
365 // function : isValid
367 //=================================================================================
368 bool MeasureGUI_FastCheckIntersectionsDlg::isValid( QString& )
370 return myObj1 && myObj2;
373 //=================================================================================
374 // function : SetEditCurrentArgument
376 //=================================================================================
377 void MeasureGUI_FastCheckIntersectionsDlg::SetEditCurrentArgument()
379 QPushButton* send = (QPushButton*)sender();
381 if (send == mySelButton1) {
382 myEditCurrentArgument = myEditObjName1;
384 mySelButton2->setDown(false);
385 myEditObjName2->setEnabled(false);
389 myEditCurrentArgument = myEditObjName2;
391 mySelButton1->setDown(false);
392 myEditObjName1->setEnabled(false);
396 disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
398 connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
399 this, SLOT(SelectionIntoArgument()));
402 myEditCurrentArgument->setEnabled(true);
403 myEditCurrentArgument->setFocus();
404 // after setFocus(), because it will be setDown(false) when loses focus
407 SelectionIntoArgument();
410 //=================================================================================
411 // function : OnGaps()
413 //=================================================================================
414 void MeasureGUI_FastCheckIntersectionsDlg::OnGaps(bool cheked)
417 myTolerance->setEnabled(cheked);
419 //=================================================================================
420 // function : SelectionIntoArgument
422 //=================================================================================
423 void MeasureGUI_FastCheckIntersectionsDlg::SelectionIntoArgument()
425 myEditCurrentArgument->setText("");
429 QList<TopAbs_ShapeEnum> typesLst;
430 typesLst << TopAbs_FACE << TopAbs_SHELL << TopAbs_SOLID << TopAbs_COMPOUND;
431 GEOM::GeomObjPtr aSelectedObject = getSelected( typesLst );
434 disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
435 myGeomGUI->getApp()->selectionMgr()->clearSelected();
436 connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
437 this, SLOT(SelectionIntoArgument()));
439 if (myEditCurrentArgument == myEditObjName1) {
440 myObj1 = aSelectedObject;
441 if (myObj1 && !myObj2)
442 mySelButton2->click();
445 myObj2 = aSelectedObject;
446 if (myObj2 && !myObj1)
447 mySelButton1->click();
449 myEditObjName1->setText(myObj1 ? GEOMBase::GetName(myObj1.get()) : "");
450 myEditObjName2->setText(myObj2 ? GEOMBase::GetName(myObj2.get()) : "");
453 //=================================================================================
454 // function : enterEvent
456 //=================================================================================
457 void MeasureGUI_FastCheckIntersectionsDlg::enterEvent(QEvent *)
459 if (!mainFrame()->GroupConstructors->isEnabled())
460 ActivateThisDialog();
463 //=================================================================================
464 // function : findIntersections
466 //=================================================================================
467 bool MeasureGUI_FastCheckIntersectionsDlg::findIntersections()
469 if (!myObj1 || !myObj2)
472 GEOM::GEOM_IMeasureOperations_var anOper =
473 GEOM::GEOM_IMeasureOperations::_narrow(getOperation());
478 HasInte = anOper->FastIntersect(myObj1.get(), myObj2.get(), getTolerance(), getDeflection(), myInters1, myInters2);
480 catch (const SALOME::SALOME_Exception& e) {
481 SalomeApp_Tools::QtCatchCorbaException(e);
485 bool isDone = anOper->IsDone();
487 CORBA::String_var aMsg = anOper->GetErrorCode();
488 SUIT_MessageBox::warning(this,
489 QObject::tr("WRN_WARNING"),
490 QObject::tr(aMsg.in()));
493 if ( !HasInte || myInters1->length() == 0 || myInters2->length() == 0)
499 //=================================================================================
500 // function : onSubShapesListSelectionChanged
502 //=================================================================================
503 void MeasureGUI_FastCheckIntersectionsDlg::onSubShapesListSelectionChanged()
506 previewSubShapesListSelection(myShapeList1);
507 previewSubShapesListSelection(myShapeList2);
510 //=================================================================================
511 // function : previewSubShapesListSelection
513 //=================================================================================
514 void MeasureGUI_FastCheckIntersectionsDlg::previewSubShapesListSelection(QListWidget* theWidget)
516 GEOM::ListOfLong_var anInters;
517 GEOM::GeomObjPtr anObj;
519 if (theWidget == myShapeList1) { // Sub-Shapes of Object 1
521 anInters = myInters1;
524 if (theWidget == myShapeList2) { // Sub-Shapes of Object 2
526 anInters = myInters2;
532 for (int i = 0, n = theWidget->count(); i < n; i++) {
533 if (theWidget->item(i)->isSelected())
536 if (aIds.count() < 1)
539 TopoDS_Shape aSelShape;
540 TopoDS_Shape aSubShape;
541 TopTools_IndexedMapOfShape anIndices;
542 if (anObj && GEOMBase::GetShape(anObj.get(), aSelShape)) {
543 SALOME_Prs* aPrs = 0;
544 TopExp::MapShapes(aSelShape, anIndices);
545 QList<int>::iterator it;
546 getDisplayer()->SetColor(theWidget == myShapeList1 ? Quantity_NOC_RED : Quantity_NOC_GREEN);
547 getDisplayer()->SetWidth(3);
548 getDisplayer()->SetToActivate(false);
549 for (it = aIds.begin(); it != aIds.end(); ++it) {
550 aSubShape = anIndices.FindKey(anInters[(*it)]);
552 aPrs = !aSubShape.IsNull() ? getDisplayer()->BuildPrs(aSubShape) : 0;
554 displayPreview(aPrs, true);
556 catch (const SALOME::SALOME_Exception& e) {
557 SalomeApp_Tools::QtCatchCorbaException(e);
563 //=================================================================================
564 // function : getLstObjFromListSelection
566 //=================================================================================
567 GEOM::ListOfGO_var MeasureGUI_FastCheckIntersectionsDlg::getLstObjFromListSelection(QListWidget* theWidget)
569 GEOM::ListOfLong_var anInters;
570 GEOM::GeomObjPtr anObj;
571 GEOM::ListOfGO_var anObjLst = new GEOM::ListOfGO();
573 if (theWidget == myShapeList1) { // Sub-Shapes of Object 1
575 anInters = myInters1;
578 if (theWidget == myShapeList2) { // Sub-Shapes of Object 2
580 anInters = myInters2;
585 //Add in study myObj if local selection
586 GEOMBase::PublishSubObject( anObj.get() );
587 // Collect the map of indices and already publised objects
588 TColStd_IndexedMapOfInteger aMapIndex;
589 ObjectList aObjLstExist;
590 for (int i = 0, n = theWidget->count(); i < n; i++) {
591 if (theWidget->item(i)->isSelected()) {
592 GEOM::GEOM_Object_var aTmpObj = GEOMBase_Helper::findObjectInFather(anObj.get(), anInters[i]);
593 if (aTmpObj->_is_nil())
594 aMapIndex.Add(anInters[i]);
596 aObjLstExist.push_back( GEOM::GEOM_Object::_duplicate(aTmpObj));
600 if (aMapIndex.IsEmpty() && aObjLstExist.empty())
604 GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
605 const int aNbShapes = aMapIndex.Extent();
606 anArray->length(aNbShapes);
607 for (int i = 1; i <= aNbShapes; i++) {
608 anArray[i - 1] = aMapIndex.FindKey(i);
611 if (myShapesOper->_is_nil())
612 myShapesOper = getGeomEngine()->GetIShapesOperations(getStudyId());
614 GEOM::ListOfGO_var aObjLstCreate = myShapesOper->MakeSubShapes(anObj.get(), anArray);
616 //Collect all objects in list
617 anObjLst->length(aObjLstCreate->length() + aObjLstExist.size());
619 ObjectList::iterator anIter;
621 for (i=0, anIter = aObjLstExist.begin(); anIter != aObjLstExist.end(); i++, ++anIter) {
622 anObjLst[i] = *anIter;
624 for (int j = 0; j < aObjLstCreate->length(); j++) {
625 anObjLst[aObjLstExist.size()+j]=aObjLstCreate[j];
627 return anObjLst._retn();
630 //=================================================================================
631 // function : execute
633 //=================================================================================
634 bool MeasureGUI_FastCheckIntersectionsDlg::execute(ObjectList& objects)
636 GEOM::ListOfGO_var aList1 = getLstObjFromListSelection(myShapeList1);
637 GEOM::ListOfGO_var aList2 = getLstObjFromListSelection(myShapeList2);
638 GEOM::ListOfGO_var aCompList = new GEOM::ListOfGO();
639 const int nbObj = aList1->length() + aList2->length();
643 //Collect general intersection list
644 aCompList->length(nbObj);
646 for (i = 0; i < aList1->length(); i++) {
647 GEOMBase::PublishSubObject( aList1[i] );
648 aCompList[i]=aList1[i];
650 for (int j = 0; j < aList2->length(); j++) {
651 GEOMBase::PublishSubObject( aList2[j] );
652 aCompList[i+j]=aList2[j];
656 objects.push_back(myShapesOper->MakeCompound(aCompList));
660 //=================================================================================
661 // function : getDeflection
663 //=================================================================================
664 float MeasureGUI_FastCheckIntersectionsDlg::getDeflection()
666 return (float)myDeflection->value();
669 //=================================================================================
670 // function : getTolerance
672 //=================================================================================
673 double MeasureGUI_FastCheckIntersectionsDlg::getTolerance()
675 double aVal = myTolerance->value();
676 if (!myDetGaps->isChecked() || aVal < 0.0)