1. cash for attribute point 2d to projected point to avoid repeated geometrical calculations
2. restart of split operation: highlight sub-shapes
const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
const std::shared_ptr<GeomAPI_Dir>& theDirX,
const std::shared_ptr<GeomAPI_Dir>& theDirY,
- std::set<std::shared_ptr<GeomAPI_Pnt> >& thePoints)
+ std::set<std::shared_ptr<GeomAPI_Pnt> >& thePoints,
+ std::map<std::shared_ptr<GeomDataAPI_Point2D>,
+ std::shared_ptr<GeomAPI_Pnt> >& theAttributeToPoint)
{
std::set<std::shared_ptr<GeomDataAPI_Point2D> >::const_iterator anIt = theAttributes.begin(),
aLast = theAttributes.end();
std::shared_ptr<GeomAPI_Pnt2d> aPnt2d = anAttribute->pnt();
std::shared_ptr<GeomAPI_Pnt> aPoint = aPnt2d->to3D(theOrigin, theDirX, theDirY);
std::shared_ptr<GeomAPI_Pnt> aProjectedPoint;
- if (isPointOnEdge(theBaseShape, aPoint, aProjectedPoint))
+ if (isPointOnEdge(theBaseShape, aPoint, aProjectedPoint)) {
thePoints.insert(aProjectedPoint);
+ theAttributeToPoint[anAttribute] = aProjectedPoint;
+ }
}
}
#include <memory>
#include <string>
#include <set>
+#include <map>
namespace ModelGeomAlgo_Point2D {
const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
const std::shared_ptr<GeomAPI_Dir>& theDirX,
const std::shared_ptr<GeomAPI_Dir>& theDirY,
- std::set<std::shared_ptr<GeomAPI_Pnt> >& thePoints);
+ std::set<std::shared_ptr<GeomAPI_Pnt> >& thePoints,
+ std::map<std::shared_ptr<GeomDataAPI_Point2D>,
+ std::shared_ptr<GeomAPI_Pnt> >& theAttributeToPoint);
/// Finds projected point to the given shape line
/// \param theBaseShape a shape of check
/// \param theTypes a selection modes to be extended\r
virtual void customSubShapesSelectionModes(QIntList& theTypes) {}\r
\r
+ /// Return true if the custom presentation is activated\r
+ /// \param theFlag a flag of level of customization, which means that only part of sub-elements\r
+ /// \return boolean value\r
+ virtual bool isCustomPrsActivated(const ModuleBase_CustomizeFlag& theFlag) const { return false; };\r
+\r
/// Activate custom presentation for the object. Default realization is empty.\r
/// \param theFeature a feature instance\r
/// \param theFlag a flag of level of customization, which means that only part of sub-elements\r
ModuleBase_Operation* aOperation = myWorkshop->currentOperation();
if (aOperation) {
ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
- anActiveWidget = aPanel->activeWidget();
+ anActiveWidget = aPanel ? aPanel->activeWidget() : 0;
}
}
return anActiveWidget;
aDisplayer->updateViewer();
}
+bool PartSet_Module::isCustomPrsActivated(const ModuleBase_CustomizeFlag& theFlag) const
+{
+ return myCustomPrs->isActive(theFlag);
+}
+
void PartSet_Module::activateCustomPrs(const FeaturePtr& theFeature, const ModuleBase_CustomizeFlag& theFlag,
const bool theUpdateViewer)
{
/// \param theFeature a feature
void setCustomized(const FeaturePtr& theFeature);
+ /// Return true if the custom presentation is activated
+ /// \param theFlag a flag of level of customization, which means that only part of sub-elements
+ /// \return boolean value
+ virtual bool isCustomPrsActivated(const ModuleBase_CustomizeFlag& theFlag) const;
+
/// Activate custom presentation for the object
/// \param theFeature a feature instance
/// \param theFlag a flag of level of customization, which means that only part of sub-elements
theObjectShapes.clear();
QList<ModuleBase_ViewerPrsPtr> aValues;
- ModuleBase_IPropertyPanel* aPanel = theWorkshop->propertyPanel();
- if (aPanel) {
- ModuleBase_ModelWidget* aWidget = aPanel->activeWidget();
- if (aWidget) {
- aWidget->getHighlighted(aValues);
- }
- }
+ ModuleBase_ModelWidget* anActiveWidget = theWorkshop->module()->activeWidget();
+ if (anActiveWidget)
+ anActiveWidget->getHighlighted(aValues);
QList<GeomShapePtr> aShapes;
QList<ModuleBase_ViewerPrsPtr>::const_iterator anIIt = aValues.begin(),
// 1. perform the widget mouse move functionality and display the presentation
// the mouse move should be processed in the widget, if it can in order to visualize correct
// presentation. These widgets correct the feature attribute according to the mouse position
- ModuleBase_ModelWidget* anActiveWidget = getActiveWidget();
+ ModuleBase_ModelWidget* anActiveWidget = myModule->activeWidget();
PartSet_MouseProcessor* aProcessor = dynamic_cast<PartSet_MouseProcessor*>(anActiveWidget);
if (aProcessor)
aProcessor->mouseMoved(theWnd, theEvent);
ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
if (anOperation) {
ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel();
- ModuleBase_ModelWidget* anActiveWidget = aPanel->activeWidget();
- if (myIsInternalEditOperation && (!anActiveWidget || !anActiveWidget->isViewerSelector()))
- aWidget = myInternalActiveWidget;
+ if (aPanel) { // check for case when the operation is started but property panel is not filled
+ ModuleBase_ModelWidget* anActiveWidget = aPanel->activeWidget();
+ if (myIsInternalEditOperation && (!anActiveWidget || !anActiveWidget->isViewerSelector()))
+ aWidget = myInternalActiveWidget;
+ }
}
return aWidget;
}
resetFlags();
}
-bool PartSet_SketcherReetntrantMgr::processMouseMoved(ModuleBase_IViewWindow* /* theWnd*/,
- QMouseEvent* /* theEvent*/)
+bool PartSet_SketcherReetntrantMgr::processMouseMoved(ModuleBase_IViewWindow* theWnd,
+ QMouseEvent* theEvent)
{
bool aProcessed = false;
if (!isActiveMgr())
if (aLastFeature) {
ModuleBase_ModelWidget* anActiveWidget = module()->activeWidget();
ModuleBase_IPropertyPanel* aPanel = myWorkshop->currentOperation()->propertyPanel();
- bool aWidgetIsFilled = false;
FeaturePtr aCurrentFeature = aFOperation->feature();
bool isLineFeature = false, isArcFeature = false;
anActiveWidget = module()->activeWidget();
aCurrentFeature = anActiveWidget->feature();
aProcessed = true;
- if (isLineFeature || isArcFeature)
- aWidgetIsFilled = true;
- }
- if (aWidgetIsFilled)
aPanel->activateNextWidget(anActiveWidget);
+ } else {
+ // processing mouse move in active widget of restarted operation
+ ModuleBase_ModelWidget* anActiveWidget = module()->activeWidget();
+ PartSet_MouseProcessor* aProcessor = dynamic_cast<PartSet_MouseProcessor*>(anActiveWidget);
+ if (aProcessor)
+ aProcessor->mouseMoved(theWnd, theEvent);
+ }
}
}
return aProcessed;
const std::set<GeomShapePtr>& aShapes = myCashedShapes[anObject];
if (!aShapes.empty()) {
gp_Pnt aPnt = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWindow->v3dView());
- std::shared_ptr<GeomAPI_Pnt> aPoint(new GeomAPI_Pnt(aPnt.X(), aPnt.Y(), aPnt.Z()));
+ double aX, anY;
+ Handle(V3d_View) aView = theWindow->v3dView();
+ PartSet_Tools::convertTo2D(aPnt, mySketch, aView, aX, anY);
+ std::shared_ptr<GeomAPI_Pnt> aPoint = PartSet_Tools::convertTo3D(aX, anY, mySketch);
std::set<GeomShapePtr>::const_iterator anIt = aShapes.begin(), aLast = aShapes.end();
for (; anIt != aLast; anIt++) {
myCurrentSubShape->shape() != aBaseShape) {
myCurrentSubShape->setObject(anObject);
myCurrentSubShape->setShape(aBaseShape);
- myWorkshop->module()->customizeObject(myFeature,
+
+ ModuleBase_IModule* aModule = myWorkshop->module();
+
+
+ if (!aModule->isCustomPrsActivated(ModuleBase_IModule::CustomizeHighlightedObjects))
+ aModule->activateCustomPrs(myFeature,
+ ModuleBase_IModule::CustomizeHighlightedObjects, true);
+ aModule->customizeObject(myFeature,
ModuleBase_IModule::CustomizeHighlightedObjects, true);
}
else
QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
const bool theToValidate)
{
- //if (theToValidate)
- // bool aResult = ModuleBase_WidgetShapeSelector::setSelection(theValues, theToValidate);
- //else {
- // the sub-shape is selected, initial shape is not highlighted/selected, we need to use
- // the sub-shape to fill attribute;
ObjectPtr aBaseObject = myCurrentSubShape->object();
GeomShapePtr aBaseShape = myCurrentSubShape->shape();
bool aResult = aBaseObject.get() && aBaseShape.get();
}
// secondly fill additional attributes
if (aResult) {
+ aResult = false;
if (aBaseShape->shapeType() == GeomAPI_Shape::EDGE) {
std::shared_ptr<GeomAPI_Edge> anEdge(new GeomAPI_Edge(aBaseShape));
std::shared_ptr<GeomAPI_Pnt> aFirstPnt = anEdge->firstPoint();
std::shared_ptr<GeomAPI_Pnt> aLastPnt = anEdge->lastPoint();
- std::shared_ptr<GeomAPI_Pnt2d> aFirstPnt2D = PartSet_Tools::convertTo2D(mySketch, aFirstPnt);
- std::shared_ptr<GeomAPI_Pnt2d> aLastPnt2D = PartSet_Tools::convertTo2D(mySketch, aLastPnt);
-
+ std::shared_ptr<GeomDataAPI_Point2D> aFirstPointAttr, aLastPointAttr;
/// find the points in feature attributes
FeaturePtr aBaseFeature = ModelAPI_Feature::feature(aBaseObject);
std::list<AttributePtr> a2DPointAttributes = aBaseFeature->data()->attributes(
GeomDataAPI_Point2D::typeId());
std::list<AttributePtr>::const_iterator anIt = a2DPointAttributes.begin(),
aLast = a2DPointAttributes.end();
- std::shared_ptr<GeomDataAPI_Point2D> aFirstPointAttr, aLastPointAttr;
for (; anIt != aLast; anIt++) {
std::shared_ptr<GeomDataAPI_Point2D> anAttributePoint =
std::dynamic_pointer_cast<GeomDataAPI_Point2D>(*anIt);
- if (aFirstPnt2D->isEqual(anAttributePoint->pnt()))
+ std::shared_ptr<GeomAPI_Pnt2d> aPoint2D = anAttributePoint->pnt();
+ std::shared_ptr<GeomAPI_Pnt> aPoint3D = PartSet_Tools::convertTo3D(aPoint2D->x(),
+ aPoint2D->y(), mySketch);
+ if (aFirstPnt->isEqual(aPoint3D))
aFirstPointAttr = anAttributePoint;
- else if (aLastPnt2D->isEqual(anAttributePoint->pnt()))
+ else if (aLastPnt->isEqual(aPoint3D))
aLastPointAttr = anAttributePoint;
}
+
/// find the points in coincident features
- if (!aFirstPointAttr.get() || !aLastPointAttr.get()) {
- std::set<std::shared_ptr<GeomDataAPI_Point2D> > aRefAttributes = myCashedReferences[aBaseObject];
- std::set<std::shared_ptr<GeomDataAPI_Point2D> >::const_iterator aRefIt = aRefAttributes.begin(),
- aRefLast = aRefAttributes.end();
- for (; aRefIt != aRefLast; aRefIt++) {
- std::shared_ptr<GeomDataAPI_Point2D> anAttributePoint = *aRefIt;
- double anX = anAttributePoint->x();
- double anY = anAttributePoint->y();
- if (!aFirstPointAttr.get() && aFirstPnt2D->isEqual(anAttributePoint->pnt()))
- aFirstPointAttr = anAttributePoint;
- if (!aLastPointAttr.get() && aLastPnt2D->isEqual(anAttributePoint->pnt()))
- aLastPointAttr = anAttributePoint;
- if (aFirstPointAttr.get() && aLastPointAttr.get())
- break;
- }
+ PntToAttributesMap aRefAttributes = myCashedReferences[aBaseObject];
+ PntToAttributesMap::const_iterator aRIt = aRefAttributes.begin(), aRLast = aRefAttributes.end();
+ for (; aRIt != aRLast; aRIt++) {
+ std::shared_ptr<GeomDataAPI_Point2D> anAttribute = aRIt->first;
+ std::shared_ptr<GeomAPI_Pnt> aPoint = aRIt->second;
+ if (!aFirstPointAttr.get() && aFirstPnt->isEqual(aPoint))
+ aFirstPointAttr = anAttribute;
+ if (!aLastPointAttr.get() && aLastPnt->isEqual(aPoint))
+ aLastPointAttr = anAttribute;
+ if (aFirstPointAttr.get() && aLastPointAttr.get())
+ break;
}
-
if (!aFirstPointAttr.get() || !aLastPointAttr)
return false;
aFeature->attribute(SketchPlugin_Constraint::ENTITY_B()));
anAPointAttr->setAttr(aFirstPointAttr);
aBPointAttr->setAttr(aLastPointAttr);
+ aResult = true;
}
}
- //}
return aResult;
}
void PartSet_WidgetSubShapeSelector::fillObjectShapes(const ObjectPtr& theObject)
{
std::set<std::shared_ptr<GeomAPI_Shape> > aShapes;
+ std::map<std::shared_ptr<GeomDataAPI_Point2D>, std::shared_ptr<GeomAPI_Pnt> > aPointToAttributes;
std::set<std::shared_ptr<GeomDataAPI_Point2D> > aRefAttributes;
-
// current feature
FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
std::set<GeomShapePtr> anEdgeShapes;
std::shared_ptr<GeomAPI_Dir> aY(new GeomAPI_Dir(aNorm->dir()->cross(aX->dir())));
std::set<std::shared_ptr<GeomAPI_Pnt> > aPoints;
ModelGeomAlgo_Point2D::getPointsInsideShape(aFeatureShape, aRefAttributes, aC->pnt(),
- aX->dir(), aY, aPoints);
+ aX->dir(), aY, aPoints, aPointToAttributes);
GeomAlgoAPI_ShapeTools::splitShape(aFeatureShape, aPoints, aShapes);
}
myCashedShapes[theObject] = aShapes;
- myCashedReferences[theObject] = aRefAttributes;
-}
-
-//********************************************************************
-/*bool PartSet_WidgetSubShapeSelector::activateSelectionAndFilters(bool toActivate)
-{
- bool aHasSelectionFilter = ModuleBase_WidgetShapeSelector::activateSelectionAndFilters
- (toActivate);
- if (!myUseSketchPlane) {
- XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop);
- PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(aWorkshop->module());
- bool isUsePlaneFilterOnly = !toActivate;
- aModule->sketchMgr()->activatePlaneFilter(isUsePlaneFilterOnly);
- }
- return aHasSelectionFilter;
+ myCashedReferences[theObject] = aPointToAttributes;
}
-//********************************************************************
-bool PartSet_WidgetSubShapeSelector::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs)
-{
- bool aValid = ModuleBase_WidgetShapeSelector::isValidSelectionCustom(thePrs);
- if (aValid) {
- ObjectPtr anObject = myWorkshop->selection()->getResult(thePrs);
- aValid = myExternalObjectMgr->isValidObject(anObject);
- }
- return aValid;
-}
-
-void PartSet_WidgetSubShapeSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr& thePrs,
- ObjectPtr& theObject,
- GeomShapePtr& theShape)
-{
- ModuleBase_WidgetShapeSelector::getGeomSelection(thePrs, theObject, theShape);
-
- FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(theObject);
- std::shared_ptr<SketchPlugin_Feature> aSPFeature =
- std::dynamic_pointer_cast<SketchPlugin_Feature>(aSelectedFeature);
- // there is no a sketch feature is selected, but the shape exists, try to create an exernal object
- // TODO: unite with the same functionality in PartSet_WidgetSubShapeSelector
- if (aSPFeature.get() == NULL) {
- ObjectPtr anExternalObject = ObjectPtr();
- if (myExternalObjectMgr->useExternal()) {
- GeomShapePtr aShape = theShape;
- if (!aShape.get()) {
- ResultPtr aResult = myWorkshop->selection()->getResult(thePrs);
- if (aResult.get())
- aShape = aResult->shape();
- }
- if (aShape.get() != NULL && !aShape->isNull())
- anExternalObject = myExternalObjectMgr->externalObject(theObject, aShape, sketch(), myIsInValidate);
- }
- /// the object is null if the selected feature is "external"(not sketch entity feature of the
- /// current sketch) and it is not created by object manager
- theObject = anExternalObject;
- }
-}
-
-//********************************************************************
-void PartSet_WidgetSubShapeSelector::restoreAttributeValue(const AttributePtr& theAttribute,
- const bool theValid)
-{
- ModuleBase_WidgetShapeSelector::restoreAttributeValue(theAttribute, theValid);
- myExternalObjectMgr->removeExternal(sketch(), myFeature, myWorkshop, true);
-}
-*/
#define PartSet_WidgetSubShapeSelector_H
#include "PartSet.h"
+#include "PartSet_MouseProcessor.h"
#include <ModuleBase_WidgetShapeSelector.h>
-#include <PartSet_MouseProcessor.h>
#include <ModelAPI_CompositeFeature.h>
-#include <GeomDataAPI_Point2D.h>
#include <QObject>
class ModuleBase_IViewWindow;
class ModuleBase_ViewerPrs;
+class GeomAPI_Pnt;
+class GeomDataAPI_Point2D;
+
class QWidget;
class QMouseEvent;
protected:
std::shared_ptr<ModuleBase_ViewerPrs> myCurrentSubShape;
std::map<ObjectPtr, std::set<GeomShapePtr> > myCashedShapes;
- std::map<ObjectPtr, std::set<AttributePoint2DPtr> > myCashedReferences;
+
+ typedef std::map<std::shared_ptr<GeomDataAPI_Point2D>,
+ std::shared_ptr<GeomAPI_Pnt> > PntToAttributesMap;
+ std::map<ObjectPtr, PntToAttributesMap> myCashedReferences;
/// Pointer to a sketch
CompositeFeaturePtr mySketch;
//#include <ModelAPI_AttributeRefList.h>
#include <ModelAPI_AttributeRefAttr.h>
+#include <ModelAPI_Validator.h>
+#include <ModelAPI_Session.h>
+
#include <SketchPlugin_Line.h>
#include <SketchPlugin_Arc.h>
#include <SketchPlugin_Circle.h>
arrangePoints(aStartPointAttr, anEndPointAttr, aFirstPointAttr, aSecondPointAttr);
/// split feature
- theSplitFeature = aSketch->addFeature(aFeatureKind);
- theSplitFeature->string(SketchPlugin_Arc::ARC_TYPE())->setValue(
- SketchPlugin_Arc::ARC_TYPE_CENTER_START_END());
- fillAttribute(theSplitFeature->attribute(SketchPlugin_Arc::CENTER_ID()),
- aBaseFeature->attribute(SketchPlugin_Arc::CENTER_ID()));
- fillAttribute(theSplitFeature->attribute(SketchPlugin_Arc::START_ID()), aFirstPointAttr);
- fillAttribute(theSplitFeature->attribute(SketchPlugin_Arc::END_ID()), aSecondPointAttr);
- theSplitFeature->execute(); /// to use result of the feature in constraint
+ theSplitFeature = createArcFeature(aBaseFeature, aFirstPointAttr, aSecondPointAttr);
+ static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators();
+ aFactory->validate(theSplitFeature); // need to be validated to update the "Apply" state if not previewed
+ std::string anError = theSplitFeature->error();
if (!aStartPointAttr->pnt()->isEqual(aFirstPointAttr->pnt())) {
theBeforeFeature = aBaseFeature; ///< use base feature to store all constraints here
if (!aSecondPointAttr->pnt()->isEqual(anEndPointAttr->pnt())) {
if (!theBeforeFeature) {
theAfterFeature = aBaseFeature; ///< use base feature to store all constraints here
- fillAttribute(theBeforeFeature->attribute(SketchPlugin_Arc::START_ID()), aSecondPointAttr);
- }
- else {
- theAfterFeature = aSketch->addFeature(aFeatureKind);
- theAfterFeature->string(SketchPlugin_Arc::ARC_TYPE())->setValue(
- SketchPlugin_Arc::ARC_TYPE_CENTER_START_END());
- fillAttribute(theAfterFeature->attribute(SketchPlugin_Arc::CENTER_ID()),
- aBaseFeature->attribute(SketchPlugin_Arc::CENTER_ID()));
fillAttribute(theAfterFeature->attribute(SketchPlugin_Arc::START_ID()), aSecondPointAttr);
- fillAttribute(theAfterFeature->attribute(SketchPlugin_Arc::END_ID()), anEndPointAttr);
- theAfterFeature->execute(); /// to use result of the feature in constraint
}
+ else
+ theAfterFeature = createArcFeature(aBaseFeature, aSecondPointAttr, anEndPointAttr);
+
createConstraint(SketchPlugin_ConstraintCoincidence::ID(),
theSplitFeature->attribute(SketchPlugin_Arc::END_ID()),
theAfterFeature->attribute(SketchPlugin_Arc::START_ID()));
aSourceAttribute->setValue(aModifiedAttribute->pnt());
}
+FeaturePtr SketchPlugin_ConstraintSplit::createArcFeature(const FeaturePtr& theBaseFeature,
+ const AttributePtr& theFirstPointAttr,
+ const AttributePtr& theSecondPointAttr)
+{
+ FeaturePtr aFeature;
+ SketchPlugin_Sketch* aSketch = sketch();
+ if (!aSketch || !theBaseFeature.get())
+ return aFeature;
+
+ aFeature = aSketch->addFeature(theBaseFeature->getKind());
+ // update fillet arc: make the arc correct for sure, so, it is not needed to process the "attribute updated"
+ // by arc; moreover, it may cause cyclicity in hte mechanism of updater
+ aFeature->data()->blockSendAttributeUpdated(true);
+
+ aFeature->string(SketchPlugin_Arc::ARC_TYPE())->setValue(
+ SketchPlugin_Arc::ARC_TYPE_CENTER_START_END());
+ fillAttribute(aFeature->attribute(SketchPlugin_Arc::CENTER_ID()),
+ theBaseFeature->attribute(SketchPlugin_Arc::CENTER_ID()));
+ fillAttribute(aFeature->attribute(SketchPlugin_Arc::START_ID()), theFirstPointAttr);
+ fillAttribute(aFeature->attribute(SketchPlugin_Arc::END_ID()), theSecondPointAttr);
+ aFeature->data()->blockSendAttributeUpdated(false);
+ aFeature->execute();
+
+ return aFeature;
+}
+
void SketchPlugin_ConstraintSplit::createConstraint(const std::string& theConstraintId,
const AttributePtr& theFirstAttribute,
const AttributePtr& theSecondAttribute)
void fillAttribute(const AttributePtr& theModifiedAttribute,
const AttributePtr& theSourceAttribute);
+ /// Creates an arc feature filled by center of base feature and given points
+ /// \param theBaseFeature another arc feature
+ /// \param theFirstAttribute an attribute with coordinates for the start point
+ /// \param theSecondAttribute an attribute with coordinates for the end point
+ FeaturePtr createArcFeature(const FeaturePtr& theBaseFeature,
+ const AttributePtr& theFirstPointAttr,
+ const AttributePtr& theSecondPointAttr);
+
/// Add feature coincidence constraint between given attributes
/// \param theConstraintId a constraint index
/// \param theFirstAttribute an attribute of further coincidence
- /// \param theFirstAttribute an attribute of further coincidence
+ /// \param theSecondAttribute an attribute of further coincidence
void createConstraint(const std::string& theConstraintId,
const std::shared_ptr<ModelAPI_Attribute>& theFirstAttribute,
const std::shared_ptr<ModelAPI_Attribute>& theSecondAttribute);
std::shared_ptr<GeomAPI_Dir> aDirY(new GeomAPI_Dir(aNorm->dir()->cross(aX->dir())));
std::set<std::shared_ptr<GeomAPI_Pnt> > aPoints;
-
+ std::map<std::shared_ptr<GeomDataAPI_Point2D>, std::shared_ptr<GeomAPI_Pnt> > aPointToAttributes;
ModelGeomAlgo_Point2D::getPointsInsideShape(anAttrShape, aRefAttributes, aC->pnt(),
- aX->dir(), aDirY, aPoints);
+ aX->dir(), aDirY, aPoints, aPointToAttributes);
int aCoincidentToFeature = (int)aPoints.size();
if (aKind == SketchPlugin_Circle::ID())