couple of tests and fix to avoid crash on selected edge

This commit is contained in:
Sergo
2017-03-17 02:21:41 -04:00
committed by wmayer
parent d23e603b4e
commit 02166ed4be
2 changed files with 49 additions and 3 deletions

View File

@@ -1041,7 +1041,10 @@ Base::Vector3d ProfileBased::getProfileNormal() const {
}
else {
TopoDS_Shape shape = getVerifiedFace(true);
if(shape.ShapeType() == TopAbs_FACE) {
if (shape == TopoDS_Shape())
return SketchVector;
if (shape.ShapeType() == TopAbs_FACE) {
BRepAdaptor_Surface adapt(TopoDS::Face(shape));
double u = adapt.FirstUParameter() + (adapt.LastUParameter() - adapt.FirstUParameter())/2.;
double v = adapt.FirstVParameter() + (adapt.LastVParameter() - adapt.FirstVParameter())/2.;