Sketcher: BSpline point-on-object - unsupported

This commit is contained in:
Abdullah Tahiri 2017-01-15 22:29:21 +01:00
parent c1decd3bb4
commit f935f33345

View File

@ -1362,6 +1362,16 @@ void CmdSketcherConstrainPointOnObject::activated(int iMsg)
}
if (points[iPnt].GeoId == curves[iCrv].GeoId)
continue; //constraining a point of an element onto the element is a bad idea...
const Part::Geometry *geom = Obj->getGeometry(curves[iCrv].GeoId);
if( geom && geom->getTypeId() == Part::GeomBSplineCurve::getClassTypeId() ){
// unsupported until normal to BSpline at any point implemented.
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Point on BSpline edge currently unsupported."));
continue;
}
cnt++;
Gui::Command::doCommand(
Doc,"App.ActiveDocument.%s.addConstraint(Sketcher.Constraint('PointOnObject',%d,%d,%d)) ",