void SketchPlugin_IntersectionPoint::initDerivedClassAttributes()
{
data()->addAttribute(EXTERNAL_LINE_ID(), ModelAPI_AttributeSelection::typeId());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), AUXILIARY_ID());
SketchPlugin_Point::initDerivedClassAttributes();
}
std::shared_ptr<GeomAPI_Edge> anEdge;
if(aLineAttr && aLineAttr->value() && aLineAttr->value()->isEdge()) {
anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aLineAttr->value()));
- } else if(aLineAttr->context() && aLineAttr->context()->shape() && aLineAttr->context()->shape()->isEdge()) {
+ } else if(aLineAttr->context() && aLineAttr->context()->shape() &&
+ aLineAttr->context()->shape()->isEdge()) {
anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(aLineAttr->context()->shape()));
}
if(!anEdge.get())
if (!anIntersection)
return;
- std::shared_ptr<GeomDataAPI_Point2D> aCoordAttr =
+ std::shared_ptr<GeomDataAPI_Point2D> aCoordAttr =
std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(COORD_ID()));
aCoordAttr->setValue(sketch()->to2D(anIntersection));
}