AttributePoint2DPtr aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
data()->attribute(ENTITY_POINT()));
std::shared_ptr<GeomAPI_Pnt2d> anAttributePnt2d = aPoint->pnt();
- std::shared_ptr<GeomAPI_Pnt> anAttributePnt = sketch()->to3D(anAttributePnt2d->x(), anAttributePnt2d->y());
+ std::shared_ptr<GeomAPI_Pnt> anAttributePnt = sketch()->to3D(anAttributePnt2d->x(),
+ anAttributePnt2d->y());
if (myCashedShapes.find(aBaseObject) == myCashedShapes.end())
fillObjectShapes(aBaseObject);
ModelAPI_Feature::feature(aResult2));
// get the point not lying on the splitting feature
for (int i = 0; i < CONSTRAINT_ATTR_SIZE; ++i) {
- AttributeRefAttrPtr aRefAttr = aCoincidenceFeature->refattr(SketchPlugin_Trim::BASE_OBJECT());
+ AttributeRefAttrPtr aRefAttr = aCoincidenceFeature->refattr(
+ SketchPlugin_Trim::BASE_OBJECT());
if (!aRefAttr || aRefAttr->isObject())
continue;
AttributePoint2DPtr aPoint =
}
}
if (aTangentPoint.get()) {
- //FeaturePtr aFeature1 = ModelAPI_Feature::feature(aResult1);
- //std::string anAttributeToBeModified = aFeature1 == aBaseFeature
- // ? SketchPlugin_Constraint::ENTITY_A() : SketchPlugin_Constraint::ENTITY_B();
- //theTangentFeatures[aRefFeature] = std::make_pair(anAttributeToBeModified, aTangentPoint);
+ // collect tangent feaures
}
else /// there is not coincident point between tangent constraint
theFeaturesToDelete.insert(aRefFeature);
aModifiedAttribute->setValue(thePoint);
#ifdef DEBUG_TRIM
- std::cout << "<fillPointAttribute> => Pnt2d - [" << thePoint->x() << ", " << thePoint->y() << "]" << std::endl;
+ std::cout << "<fillPointAttribute> => Pnt2d - [" << thePoint->x() << ", "
+ << thePoint->y() << "]" << std::endl;
#endif
}
}
}
else if (anAttributeType == ModelAPI_AttributeRefAttr::typeId()) {
AttributeRefAttrPtr aRefAttributeToFill = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(
- theModifiedAttribute);
+ theModifiedAttribute);
AttributeRefAttrPtr aSourceRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(
theSourceAttribute);
if (!aSourceRefAttr.get())
AttributePoint2DPtr aPoint = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
data()->attribute(ENTITY_POINT()));
std::shared_ptr<GeomAPI_Pnt2d> anAttributePnt2d = aPoint->pnt();
- std::shared_ptr<GeomAPI_Pnt> anAttributePnt = sketch()->to3D(anAttributePnt2d->x(), anAttributePnt2d->y());
+ std::shared_ptr<GeomAPI_Pnt> anAttributePnt = sketch()->to3D(anAttributePnt2d->x(),
+ anAttributePnt2d->y());
if (myCashedShapes.find(aBaseObject) == myCashedShapes.end())
fillObjectShapes(aBaseObject);
SessionPtr aMgr = ModelAPI_Session::get();
ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
- AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
+ AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>
+ (theAttribute);
bool isObject = aRefAttr->isObject();
if (!isObject) {
// an attribute is a point. A point value is valid always for the distance
std::list<std::shared_ptr<ModelAPI_Object> > > > PointToRefsMap;
PointToRefsMap aPointsInfo;
- //std::list<std::shared_ptr<GeomAPI_Pnt> > aPoints;
- //std::map<std::shared_ptr<GeomDataAPI_Point2D>, std::shared_ptr<GeomAPI_Pnt> >
- // aPointToAttributes;
- //std::map<std::shared_ptr<GeomAPI_Pnt>,
- // std::list< std::shared_ptr<GeomDataAPI_Point2D> > > aPointToAttributes;
ModelGeomAlgo_Point2D::getPointsInsideShape(anAttrShape, aRefAttributes, aC->pnt(),
- aX->dir(), aDirY, aPointsInfo);//aPoints, aPointToAttributes);
-
- int aCoincidentToFeature = (int)aPointsInfo.size();//aPoints.size();
+ aX->dir(), aDirY, aPointsInfo);
+ int aCoincidentToFeature = (int)aPointsInfo.size();
if (aKind == SketchPlugin_Circle::ID())
aValid = aCoincidentToFeature >= 2;
else