1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_WidgetPoint2D.cpp
4 // Created: 25 Apr 2014
5 // Author: Natalia ERMOLAEVA
7 #include "PartSet_WidgetPoint2d.h"
8 #include <PartSet_Tools.h>
9 #include <PartSet_Module.h>
11 #include <ModuleBase_ParamSpinBox.h>
12 #include <ModuleBase_Tools.h>
13 #include <ModuleBase_IViewer.h>
14 #include <ModuleBase_IViewWindow.h>
15 #include <ModuleBase_ISelection.h>
17 #include <Config_Keywords.h>
18 #include <Config_WidgetAPI.h>
20 #include <Events_Loop.h>
21 #include <ModelAPI_Events.h>
23 #include <ModelAPI_Feature.h>
24 #include <ModelAPI_Data.h>
25 #include <ModelAPI_Object.h>
26 #include <GeomDataAPI_Point2D.h>
27 #include <GeomAPI_Pnt2d.h>
29 #include <SketchPlugin_Feature.h>
30 #include <SketchPlugin_ConstraintCoincidence.h>
31 #include <SketchPlugin_Line.h>
32 #include <SketchPlugin_Arc.h>
33 #include <SketchPlugin_Circle.h>
34 #include <SketchPlugin_Point.h>
37 #include <QGridLayout>
40 #include <QMouseEvent>
41 #include <QApplication>
44 #include <TopoDS_Vertex.hxx>
45 #include <BRep_Tool.hxx>
50 const double MaxCoordinate = 1e12;
52 static QStringList MyFeaturesForCoincedence;
54 PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
55 ModuleBase_IWorkshop* theWorkshop,
56 const Config_WidgetAPI* theData,
57 const std::string& theParentId)
58 : ModuleBase_ModelWidget(theParent, theData, theParentId), myWorkshop(theWorkshop)
60 if (MyFeaturesForCoincedence.isEmpty()) {
61 MyFeaturesForCoincedence << SketchPlugin_Line::ID().c_str()
62 << SketchPlugin_Arc::ID().c_str()
63 << SketchPlugin_Point::ID().c_str()
64 << SketchPlugin_Circle::ID().c_str();
67 // the control should accept the focus, so the boolean flag is corrected to be true
68 myIsObligatory = true;
69 //myOptionParam = theData->getProperty(PREVIOUS_FEATURE_PARAM);
70 QString aPageName = QString::fromStdString(theData->getProperty(CONTAINER_PAGE_NAME));
71 myGroupBox = new QGroupBox(aPageName, theParent);
72 myGroupBox->setFlat(false);
74 bool aAcceptVariables = theData->getBooleanAttribute(DOUBLE_WDG_ACCEPT_EXPRESSIONS, true);
76 QGridLayout* aGroupLay = new QGridLayout(myGroupBox);
77 ModuleBase_Tools::adjustMargins(aGroupLay);
78 aGroupLay->setSpacing(2);
79 aGroupLay->setColumnStretch(1, 1);
81 QLabel* aLabel = new QLabel(myGroupBox);
82 aLabel->setText(tr("X "));
83 aGroupLay->addWidget(aLabel, 0, 0);
85 myXSpin = new ModuleBase_ParamSpinBox(myGroupBox);
86 myXSpin->setAcceptVariables(aAcceptVariables);
87 myXSpin->setMinimum(-DBL_MAX);
88 myXSpin->setMaximum(DBL_MAX);
89 myXSpin->setToolTip(tr("X"));
90 aGroupLay->addWidget(myXSpin, 0, 1);
92 connect(myXSpin, SIGNAL(valueChanged(const QString&)), this, SIGNAL(valuesModified()));
95 QLabel* aLabel = new QLabel(myGroupBox);
96 aLabel->setText(tr("Y "));
97 aGroupLay->addWidget(aLabel, 1, 0);
99 myYSpin = new ModuleBase_ParamSpinBox(myGroupBox);
100 myYSpin->setAcceptVariables(aAcceptVariables);
101 myYSpin->setMinimum(-DBL_MAX);
102 myYSpin->setMaximum(DBL_MAX);
103 myYSpin->setToolTip(tr("Y"));
104 aGroupLay->addWidget(myYSpin, 1, 1);
106 connect(myYSpin, SIGNAL(valueChanged(const QString&)), this, SIGNAL(valuesModified()));
108 QVBoxLayout* aLayout = new QVBoxLayout(this);
109 ModuleBase_Tools::zeroMargins(aLayout);
110 aLayout->addWidget(myGroupBox);
114 bool PartSet_WidgetPoint2D::resetCustom()
117 if (!isUseReset() || isComputedDefault() || myXSpin->hasVariable() || myYSpin->hasVariable()) {
122 double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk);
123 // it is important to block the spin box control in order to do not through out the
124 // locking of the validating state.
125 ModuleBase_Tools::setSpinValue(myXSpin, isOk ? aDefValue : 0.0);
126 ModuleBase_Tools::setSpinValue(myYSpin, isOk ? aDefValue : 0.0);
133 PartSet_WidgetPoint2D::~PartSet_WidgetPoint2D()
137 bool PartSet_WidgetPoint2D::setSelection(QList<ModuleBase_ViewerPrs>& theValues,
138 const bool theToValidate)
141 if (theValues.empty())
144 ModuleBase_ViewerPrs aValue = theValues.takeFirst();
145 TopoDS_Shape aShape = aValue.shape();
146 if (!aShape.IsNull()) {
147 Handle(V3d_View) aView = myWorkshop->viewer()->activeView();
149 if (getPoint2d(aView, aShape, aX, aY)) {
150 isDone = setPoint(aX, aY);
151 PartSet_Tools::setConstraints(mySketch, feature(), attributeID(), aX, aY);
154 else if (canBeActivatedByMove()) {
155 if (feature()->getKind() == SketchPlugin_Line::ID()) {
156 FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(aValue.object());
157 // Initialize new line with first point equal to end of previous
158 if (aFeature.get()) {
159 std::shared_ptr<ModelAPI_Data> aData = aFeature->data();
160 std::shared_ptr<GeomDataAPI_Point2D> aPoint =
161 std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
162 aData->attribute(SketchPlugin_Line::END_ID()));
164 setPoint(aPoint->x(), aPoint->y());
165 PartSet_Tools::setConstraints(mySketch, feature(), attributeID(), aPoint->x(),
175 void PartSet_WidgetPoint2D::selectContent()
177 myXSpin->selectAll();
180 bool PartSet_WidgetPoint2D::setPoint(double theX, double theY)
182 if (fabs(theX) >= MaxCoordinate)
184 if (fabs(theY) >= MaxCoordinate)
187 ModuleBase_Tools::setSpinValue(myXSpin, theX);
188 ModuleBase_Tools::setSpinValue(myYSpin, theY);
194 bool PartSet_WidgetPoint2D::storeValueCustom() const
196 std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
197 if (!aData) // can be on abort of sketcher element
199 std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
200 aData->attribute(attributeID()));
202 PartSet_WidgetPoint2D* that = (PartSet_WidgetPoint2D*) this;
203 bool isBlocked = that->blockSignals(true);
204 bool isImmutable = aPoint->setImmutable(true);
206 // if text is not empty then setValue will be ignored
207 // so we should set the text at first
208 aPoint->setText(myXSpin->hasVariable() ? myXSpin->text().toStdString() : "",
209 myYSpin->hasVariable() ? myYSpin->text().toStdString() : "");
210 aPoint->setValue(!myXSpin->hasVariable() ? myXSpin->value() : aPoint->x(),
211 !myYSpin->hasVariable() ? myYSpin->value() : aPoint->y());
213 // after movement the solver will call the update event: optimization
214 moveObject(myFeature);
215 aPoint->setImmutable(isImmutable);
216 that->blockSignals(isBlocked);
221 bool PartSet_WidgetPoint2D::restoreValueCustom()
223 std::shared_ptr<ModelAPI_Data> aData = myFeature->data();
224 std::shared_ptr<GeomDataAPI_Point2D> aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
225 aData->attribute(attributeID()));
226 QString aTextX = QString::fromStdString(aPoint->textX());
227 QString aTextY = QString::fromStdString(aPoint->textY());
229 bool isDouble = false;
231 if (aTextX.isEmpty()) {
232 ModuleBase_Tools::setSpinValue(myXSpin, aPoint->x());
234 aVal = aTextX.toDouble(&isDouble);
236 ModuleBase_Tools::setSpinValue(myXSpin, aVal);
238 ModuleBase_Tools::setSpinText(myXSpin, aTextX);
240 if (aTextY.isEmpty()) {
241 ModuleBase_Tools::setSpinValue(myYSpin, aPoint->y());
243 aVal = aTextY.toDouble(&isDouble);
245 ModuleBase_Tools::setSpinValue(myYSpin, aVal);
247 ModuleBase_Tools::setSpinText(myYSpin, aTextY);
249 //if (aTextX.empty() || aTextY.empty()) {
250 // ModuleBase_Tools::setSpinValue(myXSpin, aPoint->x());
251 // ModuleBase_Tools::setSpinValue(myYSpin, aPoint->y());
253 // ModuleBase_Tools::setSpinText(myXSpin, QString::fromStdString(aTextX));
254 // ModuleBase_Tools::setSpinText(myYSpin, QString::fromStdString(aTextY));
259 QList<QWidget*> PartSet_WidgetPoint2D::getControls() const
261 QList<QWidget*> aControls;
262 aControls.append(myXSpin);
263 aControls.append(myYSpin);
268 void PartSet_WidgetPoint2D::activateCustom()
270 ModuleBase_IViewer* aViewer = myWorkshop->viewer();
271 connect(aViewer, SIGNAL(mouseMove(ModuleBase_IViewWindow*, QMouseEvent*)),
272 this, SLOT(onMouseMove(ModuleBase_IViewWindow*, QMouseEvent*)));
273 connect(aViewer, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)),
274 this, SLOT(onMouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)));
277 aModes << TopAbs_VERTEX;
278 aModes << TopAbs_EDGE;
279 myWorkshop->activateSubShapesSelection(aModes);
282 bool PartSet_WidgetPoint2D::canBeActivatedByMove()
284 bool aCanBeActivated = false;
285 if (feature()->getKind() == SketchPlugin_Line::ID() &&
286 attributeID() == SketchPlugin_Line::START_ID())
287 aCanBeActivated = true;
289 return aCanBeActivated;
292 void PartSet_WidgetPoint2D::deactivate()
294 // the value of the control should be stored to model if it was not
295 // initialized yet. It is important when we leave this control by Tab key.
296 // It should not be performed by the widget activation as the preview
297 // is visualized with default value. Line point is moved to origin.
298 AttributePtr anAttribute = myFeature->data()->attribute(attributeID());
299 if (anAttribute && !anAttribute->isInitialized())
302 ModuleBase_ModelWidget::deactivate();
303 ModuleBase_IViewer* aViewer = myWorkshop->viewer();
304 disconnect(aViewer, SIGNAL(mouseMove(ModuleBase_IViewWindow*, QMouseEvent*)),
305 this, SLOT(onMouseMove(ModuleBase_IViewWindow*, QMouseEvent*)));
306 disconnect(aViewer, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)),
307 this, SLOT(onMouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)));
309 myWorkshop->deactivateSubShapesSelection();
312 bool PartSet_WidgetPoint2D::getPoint2d(const Handle(V3d_View)& theView,
313 const TopoDS_Shape& theShape,
314 double& theX, double& theY) const
316 if (!theShape.IsNull()) {
317 if (theShape.ShapeType() == TopAbs_VERTEX) {
318 const TopoDS_Vertex& aVertex = TopoDS::Vertex(theShape);
319 if (!aVertex.IsNull()) {
320 // A case when point is taken from existing vertex
321 gp_Pnt aPoint = BRep_Tool::Pnt(aVertex);
322 PartSet_Tools::convertTo2D(aPoint, mySketch, theView, theX, theY);
330 void PartSet_WidgetPoint2D::setConstraintWith(const ObjectPtr& theObject)
332 // Create point-edge coincedence
333 FeaturePtr aFeature = mySketch->addFeature(SketchPlugin_ConstraintCoincidence::ID());
334 std::shared_ptr<ModelAPI_Data> aData = aFeature->data();
336 std::shared_ptr<ModelAPI_AttributeRefAttr> aRef1 = std::dynamic_pointer_cast<
337 ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
338 AttributePtr aThisAttr = feature()->data()->attribute(attributeID());
339 std::shared_ptr<GeomDataAPI_Point2D> aThisPoint =
340 std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aThisAttr);
341 aRef1->setAttr(aThisPoint);
343 std::shared_ptr<ModelAPI_AttributeRefAttr> aRef2 = std::dynamic_pointer_cast<
344 ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
345 aRef2->setObject(theObject);
350 void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
352 // the contex menu release by the right button should not be processed by this widget
353 if (theEvent->button() != Qt::LeftButton)
356 ModuleBase_ISelection* aSelection = myWorkshop->selection();
357 Handle(V3d_View) aView = theWnd->v3dView();
358 // TODO: This fragment doesn't work because bug in OCC Viewer. It can be used after fixing.
359 NCollection_List<TopoDS_Shape> aShapes;
360 std::list<ObjectPtr> aObjects;
361 aSelection->selectedShapes(aShapes, aObjects);
362 // if we have selection and use it
363 if (aShapes.Extent() > 0 && useSelectedShapes()) {
364 TopoDS_Shape aShape = aShapes.First();
365 ObjectPtr aObject = aObjects.front();
366 FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(aObject);
367 bool anExternal = false;
368 std::shared_ptr<SketchPlugin_Feature> aSPFeature;
369 if (aSelectedFeature.get() != NULL)
370 aSPFeature = std::dynamic_pointer_cast<SketchPlugin_Feature>(aSelectedFeature);
371 if ((!aSPFeature && !aShape.IsNull()) ||
372 (aSPFeature.get() && aSPFeature->isExternal())) {
374 ResultPtr aFixedObject = PartSet_Tools::findFixedObjectByExternal(aShape, aObject, mySketch);
375 if (!aFixedObject.get())
376 aFixedObject = PartSet_Tools::createFixedObjectByExternal(aShape, aObject, mySketch);
379 if (getPoint2d(aView, aShape, aX, aY) && isFeatureContainsPoint(myFeature, aX, aY)) {
380 // do not create a constraint to the point, which already used by the feature
381 // if the feature contains the point, focus is not switched
385 if (getPoint2d(aView, aShape, aX, aY))
388 setValueState(Stored); // in case of edge selection, Apply state should also be updated
389 bool anOrphanPoint = aShape.ShapeType() == TopAbs_VERTEX ||
390 isOrphanPoint(aSelectedFeature, mySketch, aX, aY);
392 anOrphanPoint = true; // we should not stop reentrant operation on external objects because
393 // they are not participate in the contour creation excepting external vertices
394 if (aShape.ShapeType() == TopAbs_VERTEX) {
395 FeaturePtr aFixedFeature = ModelAPI_Feature::feature(aFixedObject);
396 if (aFixedFeature.get() && aFixedFeature->getKind() == SketchPlugin_Point::ID()) {
397 anOrphanPoint = isOrphanPoint(aFixedFeature, mySketch, aX, aY, true);
402 setConstraintWith(aFixedObject);
403 // fignal updated should be flushed in order to visualize possible created external objects
404 // e.g. selection of trihedron axis when input end arc point
405 updateObject(feature());
408 emit vertexSelected(); // it stops the reentrant operation
410 emit focusOutWidget(this);
415 bool isProcessed = false;
416 if (getPoint2d(aView, aShape, aX, aY) && isFeatureContainsPoint(myFeature, aX, aY)) {
417 // when the point is selected, the coordinates of the point should be set into the attribute
418 // if the feature contains the point, focus is not switched
422 bool anOrphanPoint = isOrphanPoint(aSelectedFeature, mySketch, aX, aY);
423 // do not set a coincidence constraint in the attribute if the feature contains a point
424 // with the same coordinates. It is important for line creation in order to do not set
425 // the same constraints for the same points, oterwise the result line has zero length.
426 if (getPoint2d(aView, aShape, aX, aY)) {
428 PartSet_Tools::setConstraints(mySketch, feature(), attributeID(), aX, aY);
430 else if (aShape.ShapeType() == TopAbs_EDGE) {
431 if (MyFeaturesForCoincedence.contains(myFeature->getKind().c_str())) {
432 setConstraintWith(aObject);
433 setValueState(Stored); // in case of edge selection, Apply state should also be updated
436 // it is important to perform updateObject() in order to the current value is
437 // processed by Sketch Solver. Test case: line is created from a previous point
438 // to some distance, but in the area of the highlighting of the point. Constraint
439 // coincidence is created, after the solver is performed, the distance between the
440 // points of the line becomes less than the tolerance. Validator of the line returns
441 // false, the line will be aborted, but sketch stays valid.
442 updateObject(feature());
443 if (!anOrphanPoint && !anExternal)
444 emit vertexSelected();
445 emit focusOutWidget(this);
449 // End of Bug dependent fragment
451 // A case when point is taken from mouse event
452 gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWnd->v3dView());
454 PartSet_Tools::convertTo2D(aPoint, mySketch, aView, aX, anY);
456 // if the feature contains the point, focus is not switched
457 if (!setPoint(aX, anY) || isFeatureContainsPoint(myFeature, aX, anY))
460 /// Start alternative code
461 //std::shared_ptr<GeomDataAPI_Point2D> aFeaturePoint = std::dynamic_pointer_cast<
462 // GeomDataAPI_Point2D>(feature()->data()->attribute(attributeID()));
463 //QList<FeaturePtr> aIgnore;
464 //aIgnore.append(feature());
466 //double aTolerance = aView->Convert(7);
467 //std::shared_ptr<GeomDataAPI_Point2D> aAttrPnt =
468 // PartSet_Tools::findAttributePoint(mySketch, aX, anY, aTolerance, aIgnore);
469 //if (aAttrPnt.get() != NULL) {
470 // aFeaturePoint->setValue(aAttrPnt->pnt());
471 // PartSet_Tools::createConstraint(mySketch, aAttrPnt, aFeaturePoint);
472 // emit vertexSelected();
474 /// End alternative code
475 emit focusOutWidget(this);
480 void PartSet_WidgetPoint2D::onMouseMove(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
485 gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWnd->v3dView());
488 PartSet_Tools::convertTo2D(aPoint, mySketch, theWnd->v3dView(), aX, anY);
489 // we need to block the value state change
490 bool isBlocked = blockValueState(true);
492 blockValueState(isBlocked);
493 setValueState(ModifiedInViewer);
496 double PartSet_WidgetPoint2D::x() const
498 return myXSpin->value();
501 double PartSet_WidgetPoint2D::y() const
503 return myYSpin->value();
507 bool PartSet_WidgetPoint2D::isFeatureContainsPoint(const FeaturePtr& theFeature,
508 double theX, double theY)
510 bool aPointIsFound = false;
512 if (feature()->getKind() != SketchPlugin_Line::ID())
513 return aPointIsFound;
515 AttributePtr aWidgetAttribute = myFeature->attribute(attributeID());
517 std::shared_ptr<GeomAPI_Pnt2d> aPnt2d =
518 std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(theX, theY));
519 std::list<AttributePtr> anAttributes =
520 myFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
521 std::list<AttributePtr>::iterator anIter = anAttributes.begin();
522 for(; anIter != anAttributes.end() && !aPointIsFound; anIter++) {
523 AttributePoint2DPtr aPoint2DAttribute =
524 std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anIter);
525 if (aPoint2DAttribute == aWidgetAttribute)
527 if (aPoint2DAttribute.get() && aPoint2DAttribute->isInitialized()) {
528 aPointIsFound = aPoint2DAttribute->pnt()->isEqual(aPnt2d);
531 return aPointIsFound;
534 void PartSet_WidgetPoint2D::initializeValueByActivate()
538 /*void PartSet_WidgetPoint2D::onValuesChanged()
540 emit valuesChanged();
543 bool PartSet_WidgetPoint2D::processEnter()
545 bool isModified = getValueState() == ModifiedInPP;
547 bool isXModified = myXSpin->hasFocus();
548 emit valuesChanged();
550 myXSpin->selectAll();
552 myYSpin->selectAll();
557 bool PartSet_WidgetPoint2D::useSelectedShapes() const
562 bool PartSet_WidgetPoint2D::isOrphanPoint(const FeaturePtr& theFeature,
563 const CompositeFeaturePtr& theSketch,
564 double theX, double theY, const bool theSearchInResults)
566 bool anOrphanPoint = false;
567 if (theFeature.get()) {
568 std::shared_ptr<GeomDataAPI_Point2D> aPointAttr;
569 std::string aFeatureKind = theFeature->getKind();
570 if (aFeatureKind == SketchPlugin_Point::ID())
571 aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
572 theFeature->attribute(SketchPlugin_Point::COORD_ID()));
573 else if (aFeatureKind == SketchPlugin_Circle::ID())
574 aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
575 theFeature->attribute(SketchPlugin_Circle::CENTER_ID()));
577 else if (aFeatureKind == SketchPlugin_Arc::ID())
578 aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
579 theFeature->attribute(SketchPlugin_Arc::CENTER_ID()));
581 /// check that the geometry point with the given coordinates is the checked point
582 /// e.g. in arc the (x,y) point can not coicide to the center point and it automatically
583 /// means that this point is not an orphant one.
584 if (aPointAttr.get()) {
585 std::shared_ptr<GeomAPI_Pnt2d> aCheckedPoint = std::shared_ptr<GeomAPI_Pnt2d>(
586 new GeomAPI_Pnt2d(theX, theY));
587 if (!aCheckedPoint->isEqual(aPointAttr->pnt()))
588 return anOrphanPoint;
591 if (aPointAttr.get()) {
592 std::shared_ptr<GeomAPI_Pnt2d> aPoint = aPointAttr->pnt();
593 // we need to find coincidence features in results also, because external object(point)
594 // uses refs to me in another feature.
595 FeaturePtr aCoincidence = PartSet_Tools::findFirstCoincidence(theFeature, aPoint, theSearchInResults);
596 anOrphanPoint = true;
597 // if there is at least one concident line to the point, the point is not an orphant
598 if (aCoincidence.get()) {
599 QList<FeaturePtr> aCoinsideLines;
600 PartSet_Tools::findCoincidences(aCoincidence, aCoinsideLines,
601 SketchPlugin_ConstraintCoincidence::ENTITY_A());
602 PartSet_Tools::findCoincidences(aCoincidence, aCoinsideLines,
603 SketchPlugin_ConstraintCoincidence::ENTITY_B());
604 QList<FeaturePtr>::const_iterator anIt = aCoinsideLines.begin(),
605 aLast = aCoinsideLines.end();
606 for (; anIt != aLast && anOrphanPoint; anIt++) {
607 anOrphanPoint = (*anIt)->getKind() != SketchPlugin_Line::ID();
612 return anOrphanPoint;