Sketcher: BSpline - Informing the user of non-supported tangencies
This commit is contained in:
parent
e53dc90c9a
commit
340d33f3a5
|
@ -2340,6 +2340,15 @@ void CmdSketcherConstrainTangent::activated(int iMsg)
|
||||||
QObject::tr("Cannot add a tangency constraint at an unconnected point!"));
|
QObject::tr("Cannot add a tangency constraint at an unconnected point!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Part::Geometry *geom2 = Obj->getGeometry(GeoId2);
|
||||||
|
|
||||||
|
if( geom2 && geom2->getTypeId() == Part::GeomBSplineCurve::getClassTypeId() ){
|
||||||
|
// unsupported until tangent to BSpline at any point implemented.
|
||||||
|
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||||
|
QObject::tr("Tangency to BSpline edge currently unsupported."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
openCommand("add tangent constraint");
|
openCommand("add tangent constraint");
|
||||||
Gui::Command::doCommand(
|
Gui::Command::doCommand(
|
||||||
|
@ -2361,6 +2370,17 @@ void CmdSketcherConstrainTangent::activated(int iMsg)
|
||||||
const Part::Geometry *geom1 = Obj->getGeometry(GeoId1);
|
const Part::Geometry *geom1 = Obj->getGeometry(GeoId1);
|
||||||
const Part::Geometry *geom2 = Obj->getGeometry(GeoId2);
|
const Part::Geometry *geom2 = Obj->getGeometry(GeoId2);
|
||||||
|
|
||||||
|
if( geom1 && geom2 &&
|
||||||
|
( geom1->getTypeId() == Part::GeomBSplineCurve::getClassTypeId() ||
|
||||||
|
geom2->getTypeId() == Part::GeomBSplineCurve::getClassTypeId() )){
|
||||||
|
|
||||||
|
// unsupported until tangent to BSpline at any point implemented.
|
||||||
|
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
|
||||||
|
QObject::tr("Tangency to BSpline edge currently unsupported."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if( geom1 && geom2 &&
|
if( geom1 && geom2 &&
|
||||||
( geom1->getTypeId() == Part::GeomEllipse::getClassTypeId() ||
|
( geom1->getTypeId() == Part::GeomEllipse::getClassTypeId() ||
|
||||||
geom2->getTypeId() == Part::GeomEllipse::getClassTypeId() )){
|
geom2->getTypeId() == Part::GeomEllipse::getClassTypeId() )){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user