1 // Copyright (C) 2019-2020 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include <PartSet_WidgetBSplinePoints.h>
22 #include <PartSet_CenterPrs.h>
23 #include <PartSet_ExternalObjectsMgr.h>
24 #include <PartSet_Module.h>
25 #include <PartSet_SketcherReentrantMgr.h>
26 #include <PartSet_WidgetPoint2d.h>
28 #include <XGUI_Tools.h>
29 #include <XGUI_Workshop.h>
30 #include <XGUI_Displayer.h>
32 #include <ModuleBase_ISelection.h>
33 #include <ModuleBase_IViewer.h>
34 #include <ModuleBase_IViewWindow.h>
35 #include <ModuleBase_LabelValue.h>
36 #include <ModuleBase_Tools.h>
37 #include <ModuleBase_ViewerPrs.h>
38 #include <ModuleBase_WidgetValidator.h>
39 #include <ModuleBase_WidgetValidated.h>
41 #include <Config_Keywords.h>
42 #include <Config_WidgetAPI.h>
44 #include <Events_Loop.h>
46 #include <ModelAPI_Events.h>
47 #include <ModelAPI_AttributeDoubleArray.h>
48 #include <ModelAPI_AttributeRefAttrList.h>
49 #include <ModelAPI_CompositeFeature.h>
51 #include <GeomDataAPI_Point2D.h>
52 #include <GeomDataAPI_Point2DArray.h>
54 #include <GeomAPI_Pnt2d.h>
56 #include <SketchPlugin_ConstraintCoincidence.h>
58 #include <QGridLayout>
60 #include <QMouseEvent>
62 static const double MaxCoordinate = 1e12;
64 PartSet_WidgetBSplinePoints::PartSet_WidgetBSplinePoints(QWidget* theParent,
65 ModuleBase_IWorkshop* theWorkshop,
66 const Config_WidgetAPI* theData)
67 : ModuleBase_ModelWidget(theParent, theData), myWorkshop(theWorkshop),
68 myValueIsCashed(false), myIsFeatureVisibleInCash(true),
69 myXValueInCash(0), myYValueInCash(0),
70 myPointIndex(0), myFinished(false)
72 myRefAttribute = theData->getProperty("reference_attribute");
74 // the control should accept the focus, so the boolean flag is corrected to be true
75 myIsObligatory = true;
76 QString aPageName = translate(theData->getProperty(CONTAINER_PAGE_NAME));
77 myGroupBox = new QGroupBox(aPageName, theParent);
78 myGroupBox->setFlat(false);
80 bool aAcceptVariables = theData->getBooleanAttribute(DOUBLE_WDG_ACCEPT_EXPRESSIONS, true);
82 // B-spline weights attribute
83 myWeightsAttr = theData->getProperty("weights");
85 QGridLayout* aGroupLay = new QGridLayout(myGroupBox);
86 ModuleBase_Tools::adjustMargins(aGroupLay);
87 aGroupLay->setSpacing(4);
88 aGroupLay->setColumnStretch(1, 1);
91 QVBoxLayout* aLayout = new QVBoxLayout(this);
92 ModuleBase_Tools::zeroMargins(aLayout);
93 aLayout->addWidget(myGroupBox);
96 myWidgetValidator = new ModuleBase_WidgetValidator(this, myWorkshop);
97 myExternalObjectMgr = new PartSet_ExternalObjectsMgr(theData->getProperty("use_external"),
98 theData->getProperty("can_create_external"), true);
101 void PartSet_WidgetBSplinePoints::createNextPoint()
105 QGridLayout* aGroupLay = dynamic_cast<QGridLayout*>(myGroupBox->layout());
106 int row = (int)(myXSpin.size() + myWeightSpin.size());
108 QString aPoleStr = tr("Pole %1");
109 aPoleStr = aPoleStr.arg(myXSpin.size() + 1);
111 QGroupBox* aPoleGroupBox = new QGroupBox(aPoleStr, myGroupBox);
112 QGridLayout* aPoleLay = new QGridLayout(aPoleGroupBox);
113 ModuleBase_Tools::adjustMargins(aPoleLay);
114 aPoleLay->setSpacing(2);
115 aPoleLay->setColumnStretch(1, 1);
117 myXSpin.push_back(new ModuleBase_LabelValue(aPoleGroupBox, tr("X")));
118 aPoleLay->addWidget(myXSpin.back(), 0, 1);
119 myYSpin.push_back(new ModuleBase_LabelValue(aPoleGroupBox, tr("Y")));
120 aPoleLay->addWidget(myYSpin.back(), 1, 1);
122 aGroupLay->addWidget(aPoleGroupBox, row, 1);
124 QString aWeightStr = tr("Weight %1");
125 aWeightStr = aWeightStr.arg(myWeightSpin.size() + 1);
127 myWeightSpin.push_back(new ModuleBase_LabelValue(myGroupBox, aWeightStr));
128 aGroupLay->addWidget(myWeightSpin.back(), ++row, 1);
131 void PartSet_WidgetBSplinePoints::removeLastPoint()
133 QGridLayout* aGroupLay = dynamic_cast<QGridLayout*>(myGroupBox->layout());
134 aGroupLay->removeWidget(myWeightSpin.back());
135 myWeightSpin.pop_back();
136 aGroupLay->removeWidget(myYSpin.back());
137 aGroupLay->removeWidget(myXSpin.back());
138 aGroupLay->removeWidget(myXSpin.back()->parentWidget());
142 // update B-spline feature attributes
146 bool PartSet_WidgetBSplinePoints::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& theValue)
150 PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
151 if (aModule->sketchReentranceMgr()->isInternalEditActive())
152 return true; // when internal edit is started a new feature is created. I has not results, AIS
154 // the selection is not possible if the current feature has no presentation for the current
155 // attribute not in AIS not in results. If so, no object in current feature where make
156 // coincidence, so selection is not necessary
157 GeomShapePtr anAISShape;
158 GeomPresentablePtr aPrs = std::dynamic_pointer_cast<GeomAPI_IPresentable>(myFeature);
161 anAIS = aPrs->getAISObject(anAIS);
163 anAISShape = anAIS->getShape();
166 const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = myFeature->results();
167 if (!anAISShape.get() && aResults.empty())
170 AttributeRefAttrListPtr aRefAttrList = attributeRefAttrList();
172 return isValidSelectionForAttribute_(theValue, myFeature->attribute(attributeID()));
176 bool PartSet_WidgetBSplinePoints::isValidSelectionForAttribute_(
177 const ModuleBase_ViewerPrsPtr& theValue,
178 const AttributePtr& theAttribute)
182 // stores the current values of the widget attribute
183 bool isFlushesActived, isAttributeSetInitializedBlocked, isAttributeSendUpdatedBlocked;
185 AttributeRefAttrListPtr aRefAttrList = attributeRefAttrList();
186 ModuleBase_WidgetValidated::blockFeatureAttribute(aRefAttrList, myFeature, true,
187 isFlushesActived, isAttributeSetInitializedBlocked, isAttributeSendUpdatedBlocked);
188 myWidgetValidator->storeAttributeValue(aRefAttrList);
190 // saves the owner value to the widget attribute
191 aValid = setSelectionCustom(theValue);
193 // checks the attribute validity
194 aValid = myWidgetValidator->isValidAttribute(theAttribute);
196 // restores the current values of the widget attribute
197 myWidgetValidator->restoreAttributeValue(aRefAttrList, aValid);
198 myExternalObjectMgr->removeExternal(sketch(), myFeature, myWorkshop, true);
200 ModuleBase_WidgetValidated::blockFeatureAttribute(aRefAttrList, myFeature, false,
201 isFlushesActived, isAttributeSetInitializedBlocked, isAttributeSendUpdatedBlocked);
205 bool PartSet_WidgetBSplinePoints::setSelectionCustom(const ModuleBase_ViewerPrsPtr& theValue)
208 GeomShapePtr aShape = theValue->shape();
209 if (aShape.get() && !aShape->isNull()) {
210 Handle(V3d_View) aView = myWorkshop->viewer()->activeView();
211 const TopoDS_Shape& aTDShape = aShape->impl<TopoDS_Shape>();
212 GeomPnt2dPtr aPnt = PartSet_Tools::getPnt2d(aView, aTDShape, mySketch);
214 fillRefAttribute(aPnt, theValue);
217 else if (aTDShape.ShapeType() == TopAbs_EDGE) {
218 fillRefAttribute(theValue);
225 static void fillLabels(std::vector<ModuleBase_LabelValue*>& theLabels, const double theValue)
227 for (std::vector<ModuleBase_LabelValue*>::iterator anIt = theLabels.begin();
228 anIt != theLabels.end(); ++anIt)
229 (*anIt)->setValue(theValue);
232 bool PartSet_WidgetBSplinePoints::resetCustom()
235 if (!isUseReset() || isComputedDefault())
238 if (myValueIsCashed) {
239 // if the restored value should be hidden, aDone = true to set
240 // reset state for the widget in the parent
241 aDone = restoreCurentValue();
242 emit objectUpdated();
245 // it is important to block the spin box control in order to do not through out the
246 // locking of the validating state.
247 fillLabels(myXSpin, 0.0);
248 fillLabels(myYSpin, 0.0);
249 fillLabels(myWeightSpin, 1.0);
258 PartSet_WidgetBSplinePoints::~PartSet_WidgetBSplinePoints()
260 delete myExternalObjectMgr;
263 bool PartSet_WidgetBSplinePoints::setPoint(double theX, double theY)
265 if (fabs(theX) >= MaxCoordinate || fabs(theY) >= MaxCoordinate)
268 myXSpin.back()->setValue(theX);
269 myYSpin.back()->setValue(theY);
270 myWeightSpin.back()->setValue(1.0);
276 void PartSet_WidgetBSplinePoints::storePolesAndWeights() const
278 std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
279 AttributePoint2DArrayPtr aPointArray = std::dynamic_pointer_cast<GeomDataAPI_Point2DArray>(
280 aData->attribute(attributeID()));
281 AttributeDoubleArrayPtr aWeightsArray = aData->realArray(myWeightsAttr);
283 aPointArray->setSize((int)myXSpin.size());
284 aWeightsArray->setSize((int)myWeightSpin.size());
286 std::vector<ModuleBase_LabelValue*>::const_iterator aXIt = myXSpin.begin();
287 std::vector<ModuleBase_LabelValue*>::const_iterator aYIt = myYSpin.begin();
288 for (int anIndex = 0; aXIt != myXSpin.end() && aYIt != myYSpin.end(); ++anIndex, ++aXIt, ++aYIt)
289 aPointArray->setPnt(anIndex, (*aXIt)->value(), (*aYIt)->value());
291 std::vector<ModuleBase_LabelValue*>::const_iterator aWIt = myWeightSpin.begin();
292 for (int anIndex = 0; aWIt != myWeightSpin.end(); ++anIndex, ++aWIt)
293 aWeightsArray->setValue(anIndex, (*aWIt)->value());
296 bool PartSet_WidgetBSplinePoints::storeValueCustom()
298 std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
299 if (!aData || !aData->isValid()) // can be on abort of sketcher element
301 AttributePoint2DArrayPtr aPointArray = std::dynamic_pointer_cast<GeomDataAPI_Point2DArray>(
302 aData->attribute(attributeID()));
303 AttributeDoubleArrayPtr aWeightsArray = aData->realArray(myWeightsAttr);
305 PartSet_WidgetBSplinePoints* that = (PartSet_WidgetBSplinePoints*) this;
306 bool isBlocked = that->blockSignals(true);
307 bool isImmutable = aPointArray->setImmutable(true);
309 if (myFeature->isMacro()) {
310 // Moving points of macro-features has been processed directly (without solver)
311 storePolesAndWeights();
312 updateObject(myFeature);
315 if (!aPointArray->isInitialized()) {
316 storePolesAndWeights();
319 std::shared_ptr<ModelAPI_ObjectMovedMessage> aMessage(
320 new ModelAPI_ObjectMovedMessage(this));
321 aMessage->setMovedAttribute(aPointArray, aPointArray->size() - 1);
322 aMessage->setOriginalPosition(aPointArray->pnt(aPointArray->size() - 1));
323 aMessage->setCurrentPosition(myXSpin.back()->value(), myYSpin.back()->value());
324 Events_Loop::loop()->send(aMessage);
327 aPointArray->setImmutable(isImmutable);
328 that->blockSignals(isBlocked);
333 bool PartSet_WidgetBSplinePoints::restoreValueCustom()
335 std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
336 AttributePoint2DArrayPtr aPointArray = std::dynamic_pointer_cast<GeomDataAPI_Point2DArray>(
337 aData->attribute(attributeID()));
338 AttributeDoubleArrayPtr aWeightsArray = aData->realArray(myWeightsAttr);
340 if (aPointArray->isInitialized()) {
341 while (myXSpin.size() < aPointArray->size())
344 std::vector<ModuleBase_LabelValue*>::iterator aXIt = myXSpin.begin();
345 std::vector<ModuleBase_LabelValue*>::iterator aYIt = myYSpin.begin();
346 for (int anIndex = 0; aXIt != myXSpin.end() && aYIt != myYSpin.end();
347 ++anIndex, ++aXIt, ++aYIt) {
348 GeomPnt2dPtr aPoint = aPointArray->pnt(anIndex);
349 (*aXIt)->setValue(aPoint->x());
350 (*aYIt)->setValue(aPoint->y());
353 std::vector<ModuleBase_LabelValue*>::iterator aWIt = myWeightSpin.begin();
354 for (int anIndex = 0; aWIt != myWeightSpin.end(); ++anIndex, ++aWIt)
355 (*aWIt)->setValue(aWeightsArray->value(anIndex));
361 myXSpin.back()->setValue(0.0);
362 myYSpin.back()->setValue(0.0);
363 myWeightSpin.back()->setValue(0.0);
369 static void storeArray(const std::vector<ModuleBase_LabelValue*>& theLabels,
370 std::vector<double>& theValues)
373 theValues.reserve(theLabels.size());
374 for (std::vector<ModuleBase_LabelValue*>::const_iterator anIt = theLabels.begin();
375 anIt != theLabels.end(); ++anIt)
376 theValues.push_back((*anIt)->value());
379 void PartSet_WidgetBSplinePoints::storeCurentValue()
381 myValueIsCashed = true;
382 myIsFeatureVisibleInCash = XGUI_Displayer::isVisible(
383 XGUI_Tools::workshop(myWorkshop)->displayer(), myFeature);
385 storeArray(myXSpin, myXValueInCash);
386 storeArray(myYSpin, myYValueInCash);
387 storeArray(myWeightSpin, myWeightInCash);
390 static void restoreArray(std::vector<double>& theCacheValues,
391 std::vector<ModuleBase_LabelValue*>& theLabels)
393 std::vector<double>::iterator aCIt = theCacheValues.begin();
394 std::vector<ModuleBase_LabelValue*>::iterator anIt = theLabels.begin();
395 for (; anIt != theLabels.end(); ++anIt) {
396 if (aCIt != theCacheValues.end())
397 (*anIt)->setValue(*aCIt++);
399 (*anIt)->setValue(0.0);
401 theCacheValues.clear();
404 bool PartSet_WidgetBSplinePoints::restoreCurentValue()
406 bool aRestoredAndHidden = true;
408 bool isVisible = myIsFeatureVisibleInCash;
410 myValueIsCashed = false;
411 myIsFeatureVisibleInCash = true;
412 // fill the control widgets by the cashed value
413 restoreArray(myXValueInCash, myXSpin);
414 restoreArray(myYValueInCash, myYSpin);
415 restoreArray(myWeightInCash, myWeightSpin);
417 // store value to the model
420 setValueState(Stored);
421 aRestoredAndHidden = false;
424 aRestoredAndHidden = true;
426 return aRestoredAndHidden;
429 QList<QWidget*> PartSet_WidgetBSplinePoints::getControls() const
431 QList<QWidget*> aControls;
432 std::vector<ModuleBase_LabelValue*>::const_iterator aXIt = myXSpin.begin();
433 std::vector<ModuleBase_LabelValue*>::const_iterator aYIt = myYSpin.begin();
434 std::vector<ModuleBase_LabelValue*>::const_iterator aWIt = myWeightSpin.begin();
435 for (; aXIt != myXSpin.end() && aYIt != myYSpin.end() && aWIt != myWeightSpin.end();
436 ++aXIt, ++aYIt, ++aWIt) {
437 aControls.append(*aXIt);
438 aControls.append(*aYIt);
439 aControls.append(*aWIt);
444 void PartSet_WidgetBSplinePoints::selectionModes(int& theModuleSelectionModes, QIntList& theModes)
446 theModuleSelectionModes = -1;
447 theModes << TopAbs_VERTEX;
448 theModes << TopAbs_EDGE;
451 void PartSet_WidgetBSplinePoints::deactivate()
453 // the value of the control should be stored to model if it was not
454 // initialized yet. It is important when we leave this control by Tab key.
455 // It should not be performed by the widget activation as the preview
456 // is visualized with default value. Line point is moved to origin.
457 AttributePtr anAttribute = myFeature->data()->attribute(attributeID());
458 if (anAttribute && !anAttribute->isInitialized())
461 ModuleBase_ModelWidget::deactivate();
464 void PartSet_WidgetBSplinePoints::mouseReleased(ModuleBase_IViewWindow* theWindow,
465 QMouseEvent* theEvent)
467 // the contex menu release by the right button should not be processed by this widget
468 if (theEvent->button() != Qt::LeftButton)
471 ModuleBase_ISelection* aSelection = myWorkshop->selection();
472 Handle(V3d_View) aView = theWindow->v3dView();
474 QList<ModuleBase_ViewerPrsPtr> aList = aSelection->getSelected(ModuleBase_ISelection::Viewer);
475 ModuleBase_ViewerPrsPtr aFirstValue =
476 aList.size() > 0 ? aList.first() : ModuleBase_ViewerPrsPtr();
477 if (!aFirstValue.get() && myPreSelected.get()) {
478 aFirstValue = myPreSelected;
481 TopoDS_Shape aSelectedShape;
482 ObjectPtr aSelectedObject;
484 // if we have selection and use it
485 if (aFirstValue.get() && isValidSelectionCustom(aFirstValue) &&
486 aFirstValue->shape().get()) { // Trihedron Axis may be selected, but shape is empty
487 GeomShapePtr aGeomShape = aFirstValue->shape();
488 aSelectedShape = aGeomShape->impl<TopoDS_Shape>();
489 aSelectedObject = aFirstValue->object();
491 FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(aSelectedObject);
492 std::shared_ptr<SketchPlugin_Feature> aSPFeature;
493 if (aSelectedFeature.get())
494 aSPFeature = std::dynamic_pointer_cast<SketchPlugin_Feature>(aSelectedFeature);
496 bool isSketchExternalFeature = aSPFeature.get() && aSPFeature->isExternal();
497 if ((!aSPFeature && !aSelectedShape.IsNull()) || isSketchExternalFeature) {
498 ObjectPtr aFixedObject =
499 PartSet_Tools::findFixedObjectByExternal(aSelectedShape, aSelectedObject, mySketch);
501 aSelectedObject = aFixedObject;
502 else if (!isSketchExternalFeature) {
503 FeaturePtr aCreatedFeature;
504 aSelectedObject = PartSet_Tools::createFixedObjectByExternal(
505 aGeomShape, aSelectedObject, mySketch, false, aCreatedFeature);
509 // The selection could be a center of an external circular object
510 else if (aFirstValue.get() && (!aFirstValue->interactive().IsNull())) {
511 Handle(PartSet_CenterPrs) aAIS =
512 Handle(PartSet_CenterPrs)::DownCast(aFirstValue->interactive());
513 if (!aAIS.IsNull()) {
514 gp_Pnt aPntComp = aAIS->Component()->Pnt();
515 GeomVertexPtr aVertPtr(new GeomAPI_Vertex(aPntComp.X(), aPntComp.Y(), aPntComp.Z()));
516 aSelectedShape = aVertPtr->impl<TopoDS_Shape>();
519 PartSet_Tools::findFixedObjectByExternal(aSelectedShape, aAIS->object(), mySketch);
520 if (!aSelectedObject.get())
522 FeaturePtr aCreatedFeature;
523 aSelectedObject = PartSet_Tools::createFixedByExternalCenter(aAIS->object(), aAIS->edge(),
524 aAIS->centerType(), mySketch, false, aCreatedFeature);
529 GeomPnt2dPtr aSelectedPoint = PartSet_Tools::getPnt2d(aView, aSelectedShape, mySketch);
530 if (aSelectedPoint) {
531 // nullify selected object to add reference to attribute instead of its owner
532 aSelectedObject = ObjectPtr();
535 aSelectedPoint = PartSet_Tools::getPnt2d(theEvent, theWindow, mySketch);
536 setValueState(Stored); // in case of edge selection, Apply state should also be updated
539 fillRefAttribute(aSelectedObject);
541 fillRefAttribute(aSelectedPoint, aFirstValue);
543 // next pole of B-spline
547 void PartSet_WidgetBSplinePoints::mouseMoved(ModuleBase_IViewWindow* theWindow,
548 QMouseEvent* theEvent)
550 PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
552 if (myFinished || isEditingMode() || aModule->sketchReentranceMgr()->isInternalEditActive())
555 gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWindow->v3dView());
557 double aX = 0, aY = 0;
558 PartSet_Tools::convertTo2D(aPoint, mySketch, theWindow->v3dView(), aX, aY);
559 if (myState != ModifiedInViewer)
561 // we need to block the value state change
562 bool isBlocked = blockValueState(true);
564 blockValueState(isBlocked);
565 setValueState(ModifiedInViewer);
568 bool PartSet_WidgetBSplinePoints::processEscape()
570 bool isProcessed = !isEditingMode();
572 // remove widgets corrsponding to the last pole/weight of B-spline
576 emit focusOutWidget(this);
581 bool PartSet_WidgetBSplinePoints::useSelectedShapes() const
586 AttributeRefAttrListPtr PartSet_WidgetBSplinePoints::attributeRefAttrList() const
588 if (myRefAttribute.empty())
589 return AttributeRefAttrListPtr();
591 AttributePtr anAttributeRef = feature()->attribute(myRefAttribute);
592 if (!anAttributeRef.get())
593 return AttributeRefAttrListPtr();
595 return std::dynamic_pointer_cast<ModelAPI_AttributeRefAttrList>(anAttributeRef);
598 void PartSet_WidgetBSplinePoints::fillRefAttribute(GeomPnt2dPtr theClickedPoint,
599 const std::shared_ptr<ModuleBase_ViewerPrs>& theValue)
601 AttributeRefAttrListPtr aRefAttrList = attributeRefAttrList();
602 if (!aRefAttrList.get())
605 FeaturePtr aFeature = feature();
606 std::string anAttribute = attributeID();
608 if (aFeature.get()) {
609 AttributePoint2DPtr aClickedFeaturePoint =
610 PartSet_WidgetPoint2D::findFirstEqualPointInSketch(mySketch, aFeature, theClickedPoint);
611 if (aClickedFeaturePoint.get())
612 aRefAttrList->append(aClickedFeaturePoint);
614 fillRefAttribute(theValue);
618 void PartSet_WidgetBSplinePoints::fillRefAttribute(const ModuleBase_ViewerPrsPtr& theValue)
622 anObject = getGeomSelection(theValue);
623 fillRefAttribute(anObject);
626 void PartSet_WidgetBSplinePoints::fillRefAttribute(const ObjectPtr& theObject)
628 AttributeRefAttrListPtr aRefAttrList = attributeRefAttrList();
629 if (aRefAttrList.get())
630 aRefAttrList->append(theObject);
633 ObjectPtr PartSet_WidgetBSplinePoints::getGeomSelection(const ModuleBase_ViewerPrsPtr& theValue)
637 ModuleBase_ISelection* aSelection = myWorkshop->selection();
638 anObject = aSelection->getResult(theValue);
639 aShape = aSelection->getShape(theValue);
640 myExternalObjectMgr->getGeomSelection(theValue, anObject, aShape, myWorkshop, sketch(), true);