PartDesign: Hole: fallback to getProfileNormal when a non-cylindrical surface is used
This commit is contained in:
@@ -2266,12 +2266,10 @@ Base::Vector3d Hole::guessNormalDirection(const TopoShape& profileshape) const
|
||||
// the middle of the face
|
||||
if (profileshape.hasSubShape(TopAbs_FACE)) {
|
||||
BRepAdaptor_Surface sf(TopoDS::Face(profileshape.getSubShape(TopAbs_FACE, 1)));
|
||||
|
||||
if (sf.GetType() != GeomAbs_Cylinder) {
|
||||
throw Base::Exception("Cannot create hole from non cylindrical face");
|
||||
|
||||
if (sf.GetType() == GeomAbs_Cylinder) {
|
||||
return Base::convertTo<Base::Vector3d>(sf.Cylinder().Axis().Direction());
|
||||
}
|
||||
|
||||
return Base::convertTo<Base::Vector3d>(sf.Cylinder().Axis().Direction());
|
||||
}
|
||||
|
||||
return getProfileNormal();
|
||||
|
||||
Reference in New Issue
Block a user