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);
281 if (!isEditingMode()) {
282 FeaturePtr aFeature = feature();
283 if (aFeature.get() && aFeature->getKind() == SketchPlugin_Point::ID())
288 bool PartSet_WidgetPoint2D::canBeActivatedByMove()
290 bool aCanBeActivated = false;
291 if (feature()->getKind() == SketchPlugin_Line::ID() &&
292 attributeID() == SketchPlugin_Line::START_ID())
293 aCanBeActivated = true;
295 return aCanBeActivated;
298 void PartSet_WidgetPoint2D::deactivate()
300 // the value of the control should be stored to model if it was not
301 // initialized yet. It is important when we leave this control by Tab key.
302 // It should not be performed by the widget activation as the preview
303 // is visualized with default value. Line point is moved to origin.
304 AttributePtr anAttribute = myFeature->data()->attribute(attributeID());
305 if (anAttribute && !anAttribute->isInitialized())
308 ModuleBase_ModelWidget::deactivate();
309 ModuleBase_IViewer* aViewer = myWorkshop->viewer();
310 disconnect(aViewer, SIGNAL(mouseMove(ModuleBase_IViewWindow*, QMouseEvent*)),
311 this, SLOT(onMouseMove(ModuleBase_IViewWindow*, QMouseEvent*)));
312 disconnect(aViewer, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)),
313 this, SLOT(onMouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)));
315 myWorkshop->deactivateSubShapesSelection();
318 bool PartSet_WidgetPoint2D::getPoint2d(const Handle(V3d_View)& theView,
319 const TopoDS_Shape& theShape,
320 double& theX, double& theY) const
322 if (!theShape.IsNull()) {
323 if (theShape.ShapeType() == TopAbs_VERTEX) {
324 const TopoDS_Vertex& aVertex = TopoDS::Vertex(theShape);
325 if (!aVertex.IsNull()) {
326 // A case when point is taken from existing vertex
327 gp_Pnt aPoint = BRep_Tool::Pnt(aVertex);
328 PartSet_Tools::convertTo2D(aPoint, mySketch, theView, theX, theY);
336 void PartSet_WidgetPoint2D::setConstraintWith(const ObjectPtr& theObject)
338 // Create point-edge coincedence
339 FeaturePtr aFeature = mySketch->addFeature(SketchPlugin_ConstraintCoincidence::ID());
340 std::shared_ptr<ModelAPI_Data> aData = aFeature->data();
342 std::shared_ptr<ModelAPI_AttributeRefAttr> aRef1 = std::dynamic_pointer_cast<
343 ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
344 AttributePtr aThisAttr = feature()->data()->attribute(attributeID());
345 std::shared_ptr<GeomDataAPI_Point2D> aThisPoint =
346 std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aThisAttr);
347 aRef1->setAttr(aThisPoint);
349 std::shared_ptr<ModelAPI_AttributeRefAttr> aRef2 = std::dynamic_pointer_cast<
350 ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
351 aRef2->setObject(theObject);
356 void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
358 // the contex menu release by the right button should not be processed by this widget
359 if (theEvent->button() != Qt::LeftButton)
362 ModuleBase_ISelection* aSelection = myWorkshop->selection();
363 Handle(V3d_View) aView = theWnd->v3dView();
364 // TODO: This fragment doesn't work because bug in OCC Viewer. It can be used after fixing.
365 NCollection_List<TopoDS_Shape> aShapes;
366 std::list<ObjectPtr> aObjects;
367 aSelection->selectedShapes(aShapes, aObjects);
368 // if we have selection and use it
369 if (aShapes.Extent() > 0 && useSelectedShapes()) {
370 TopoDS_Shape aShape = aShapes.First();
371 ObjectPtr aObject = aObjects.front();
372 FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(aObject);
373 bool anExternal = false;
374 std::shared_ptr<SketchPlugin_Feature> aSPFeature;
375 if (aSelectedFeature.get() != NULL)
376 aSPFeature = std::dynamic_pointer_cast<SketchPlugin_Feature>(aSelectedFeature);
377 if ((!aSPFeature && !aShape.IsNull()) ||
378 (aSPFeature.get() && aSPFeature->isExternal())) {
380 ResultPtr aFixedObject = PartSet_Tools::findFixedObjectByExternal(aShape, aObject, mySketch);
381 if (!aFixedObject.get())
382 aFixedObject = PartSet_Tools::createFixedObjectByExternal(aShape, aObject, mySketch);
385 if (getPoint2d(aView, aShape, aX, aY) && isFeatureContainsPoint(myFeature, aX, aY)) {
386 // do not create a constraint to the point, which already used by the feature
387 // if the feature contains the point, focus is not switched
391 if (getPoint2d(aView, aShape, aX, aY))
394 setValueState(Stored); // in case of edge selection, Apply state should also be updated
395 bool anOrphanPoint = aShape.ShapeType() == TopAbs_VERTEX ||
396 isOrphanPoint(aSelectedFeature, mySketch, aX, aY);
398 anOrphanPoint = true; // we should not stop reentrant operation on external objects because
399 // they are not participate in the contour creation excepting external vertices
400 if (aShape.ShapeType() == TopAbs_VERTEX) {
401 FeaturePtr aFixedFeature = ModelAPI_Feature::feature(aFixedObject);
402 if (aFixedFeature.get() && aFixedFeature->getKind() == SketchPlugin_Point::ID()) {
403 anOrphanPoint = isOrphanPoint(aFixedFeature, mySketch, aX, aY, true);
408 setConstraintWith(aFixedObject);
409 // fignal updated should be flushed in order to visualize possible created external objects
410 // e.g. selection of trihedron axis when input end arc point
411 updateObject(feature());
414 emit vertexSelected(); // it stops the reentrant operation
416 emit focusOutWidget(this);
421 bool isProcessed = false;
422 if (getPoint2d(aView, aShape, aX, aY) && isFeatureContainsPoint(myFeature, aX, aY)) {
423 // when the point is selected, the coordinates of the point should be set into the attribute
424 // if the feature contains the point, focus is not switched
428 bool anOrphanPoint = isOrphanPoint(aSelectedFeature, mySketch, aX, aY);
429 // do not set a coincidence constraint in the attribute if the feature contains a point
430 // with the same coordinates. It is important for line creation in order to do not set
431 // the same constraints for the same points, oterwise the result line has zero length.
432 if (getPoint2d(aView, aShape, aX, aY)) {
434 PartSet_Tools::setConstraints(mySketch, feature(), attributeID(), aX, aY);
436 else if (aShape.ShapeType() == TopAbs_EDGE) {
437 if (MyFeaturesForCoincedence.contains(myFeature->getKind().c_str())) {
438 setConstraintWith(aObject);
439 setValueState(Stored); // in case of edge selection, Apply state should also be updated
442 // it is important to perform updateObject() in order to the current value is
443 // processed by Sketch Solver. Test case: line is created from a previous point
444 // to some distance, but in the area of the highlighting of the point. Constraint
445 // coincidence is created, after the solver is performed, the distance between the
446 // points of the line becomes less than the tolerance. Validator of the line returns
447 // false, the line will be aborted, but sketch stays valid.
448 updateObject(feature());
449 if (!anOrphanPoint && !anExternal)
450 emit vertexSelected();
451 emit focusOutWidget(this);
455 // End of Bug dependent fragment
457 // A case when point is taken from mouse event
458 gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWnd->v3dView());
460 PartSet_Tools::convertTo2D(aPoint, mySketch, aView, aX, anY);
462 // if the feature contains the point, focus is not switched
463 if (!setPoint(aX, anY) || isFeatureContainsPoint(myFeature, aX, anY))
466 /// Start alternative code
467 //std::shared_ptr<GeomDataAPI_Point2D> aFeaturePoint = std::dynamic_pointer_cast<
468 // GeomDataAPI_Point2D>(feature()->data()->attribute(attributeID()));
469 //QList<FeaturePtr> aIgnore;
470 //aIgnore.append(feature());
472 //double aTolerance = aView->Convert(7);
473 //std::shared_ptr<GeomDataAPI_Point2D> aAttrPnt =
474 // PartSet_Tools::findAttributePoint(mySketch, aX, anY, aTolerance, aIgnore);
475 //if (aAttrPnt.get() != NULL) {
476 // aFeaturePoint->setValue(aAttrPnt->pnt());
477 // PartSet_Tools::createConstraint(mySketch, aAttrPnt, aFeaturePoint);
478 // emit vertexSelected();
480 /// End alternative code
481 emit focusOutWidget(this);
486 void PartSet_WidgetPoint2D::onMouseMove(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
491 gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWnd->v3dView());
494 PartSet_Tools::convertTo2D(aPoint, mySketch, theWnd->v3dView(), aX, anY);
495 // we need to block the value state change
496 bool isBlocked = blockValueState(true);
498 blockValueState(isBlocked);
499 setValueState(ModifiedInViewer);
502 double PartSet_WidgetPoint2D::x() const
504 return myXSpin->value();
507 double PartSet_WidgetPoint2D::y() const
509 return myYSpin->value();
513 bool PartSet_WidgetPoint2D::isFeatureContainsPoint(const FeaturePtr& theFeature,
514 double theX, double theY)
516 bool aPointIsFound = false;
518 if (feature()->getKind() != SketchPlugin_Line::ID())
519 return aPointIsFound;
521 AttributePtr aWidgetAttribute = myFeature->attribute(attributeID());
523 std::shared_ptr<GeomAPI_Pnt2d> aPnt2d =
524 std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(theX, theY));
525 std::list<AttributePtr> anAttributes =
526 myFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
527 std::list<AttributePtr>::iterator anIter = anAttributes.begin();
528 for(; anIter != anAttributes.end() && !aPointIsFound; anIter++) {
529 AttributePoint2DPtr aPoint2DAttribute =
530 std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anIter);
531 if (aPoint2DAttribute == aWidgetAttribute)
533 if (aPoint2DAttribute.get() && aPoint2DAttribute->isInitialized()) {
534 aPointIsFound = aPoint2DAttribute->pnt()->isEqual(aPnt2d);
537 return aPointIsFound;
540 void PartSet_WidgetPoint2D::initializeValueByActivate()
544 /*void PartSet_WidgetPoint2D::onValuesChanged()
546 emit valuesChanged();
549 bool PartSet_WidgetPoint2D::processEnter()
551 bool isModified = getValueState() == ModifiedInPP;
553 bool isXModified = myXSpin->hasFocus();
554 emit valuesChanged();
556 myXSpin->selectAll();
558 myYSpin->selectAll();
563 bool PartSet_WidgetPoint2D::useSelectedShapes() const
568 bool PartSet_WidgetPoint2D::isOrphanPoint(const FeaturePtr& theFeature,
569 const CompositeFeaturePtr& theSketch,
570 double theX, double theY, const bool theSearchInResults)
572 bool anOrphanPoint = false;
573 if (theFeature.get()) {
574 std::shared_ptr<GeomDataAPI_Point2D> aPointAttr;
575 std::string aFeatureKind = theFeature->getKind();
576 if (aFeatureKind == SketchPlugin_Point::ID())
577 aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
578 theFeature->attribute(SketchPlugin_Point::COORD_ID()));
579 else if (aFeatureKind == SketchPlugin_Circle::ID())
580 aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
581 theFeature->attribute(SketchPlugin_Circle::CENTER_ID()));
583 else if (aFeatureKind == SketchPlugin_Arc::ID())
584 aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
585 theFeature->attribute(SketchPlugin_Arc::CENTER_ID()));
587 /// check that the geometry point with the given coordinates is the checked point
588 /// e.g. in arc the (x,y) point can not coicide to the center point and it automatically
589 /// means that this point is not an orphant one.
590 if (aPointAttr.get()) {
591 std::shared_ptr<GeomAPI_Pnt2d> aCheckedPoint = std::shared_ptr<GeomAPI_Pnt2d>(
592 new GeomAPI_Pnt2d(theX, theY));
593 if (!aCheckedPoint->isEqual(aPointAttr->pnt()))
594 return anOrphanPoint;
597 if (aPointAttr.get()) {
598 std::shared_ptr<GeomAPI_Pnt2d> aPoint = aPointAttr->pnt();
599 // we need to find coincidence features in results also, because external object(point)
600 // uses refs to me in another feature.
601 FeaturePtr aCoincidence = PartSet_Tools::findFirstCoincidence(theFeature, aPoint, theSearchInResults);
602 anOrphanPoint = true;
603 // if there is at least one concident line to the point, the point is not an orphant
604 if (aCoincidence.get()) {
605 QList<FeaturePtr> aCoinsideLines;
606 PartSet_Tools::findCoincidences(aCoincidence, aCoinsideLines,
607 SketchPlugin_ConstraintCoincidence::ENTITY_A());
608 PartSet_Tools::findCoincidences(aCoincidence, aCoinsideLines,
609 SketchPlugin_ConstraintCoincidence::ENTITY_B());
610 QList<FeaturePtr>::const_iterator anIt = aCoinsideLines.begin(),
611 aLast = aCoinsideLines.end();
612 for (; anIt != aLast && anOrphanPoint; anIt++) {
613 anOrphanPoint = (*anIt)->getKind() != SketchPlugin_Line::ID();
618 return anOrphanPoint;